mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed development environment and overrides
This commit is contained in:
parent
c62ff2c283
commit
6a1b86e8c6
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["src/.overrides/assets/stylesheets/custom/_typeset.scss","../../../../src/.overrides/assets/stylesheets/custom.scss","src/assets/stylesheets/utilities/_break.scss","src/.overrides/assets/stylesheets/custom/layout/_banner.scss","src/.overrides/assets/stylesheets/custom/layout/_hero.scss","src/.overrides/assets/stylesheets/custom/layout/_iconsearch.scss","src/.overrides/assets/stylesheets/custom/layout/_sponsorship.scss"],"names":[],"mappings":"AA2BA,iBACE,cAIE,kBC7BF,CDgCA,QAEE,qBC/BF,CACF,CD0CE,qBACE,aCxCJ,CD4CE,uBACE,UC1CJ,CD6CI,8BAGE,QAAA,CACA,sBAAA,CAHA,iBAAA,CACA,UCzCN,CD+CI,8BAOE,WAAA,CAFA,WAAA,CAFA,MAAA,CAGA,eAAA,CALA,iBAAA,CACA,KAAA,CAEA,UC1CN,CDkDE,uBACE,2BChDJ,CDoDE,0BACE,aClDJ,CDsDE,+BACE,cAAA,CACA,uBCpDJ,CDuDI,0EAEE,WCtDN,CD0DI,oCAGE,2CAAA,CADA,gCAAA,CADA,aCtDN,CD6DE,4BACE,UAAA,CACA,uBC3DJ,CD8DI,2EAEE,SC7DN,CDqEI,wDAEE,cCnEN,CC2JI,wCF1FA,wDAMI,eClEN,CACF,CDsEI,4BACE,kBCpEN,CDyEE,wBACE,YAAA,CACA,gBCvEJ,CD0EI,4BAEE,kBAAA,CADA,WCvEN,CD+EM,sCACE,aAAA,CACA,kBC7ER,CDiFM,+BACE,aC/ER,CEnDE,mDAGE,kBFsDJ,CElDE,kBACE,kBFoDJ,CEhDE,8BACE,gBFkDJ,CEnDE,8BACE,iBFkDJ,CGlEA,eAEE,uYACE,CAFF,gBHsEF,CG3DE,4CACE,yYH6DJ,CG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,cAAA,CACA,sBLgMN,CK7LM,wCACE,aAAA,CACA,aL+LR,CKtLI,mCACE,YLwLN,CKrLM,yCAEE,UAAA,CACA,UAAA,CAFA,aLyLR,CKlLI,6CAEE,UL2LN,CK7LI,6CAEE,WL2LN,CK7LI,mCAOE,kBAAA,CANA,aAAA,CAGA,aAAA,CACA,YAAA,CACA,eAAA,CAEA,kBAAA,CACA,sCACE,CAPF,YL0LN,CK/KM,kFAEE,oBLgLR,CK7KQ,0FACE,mBL+KV,CK1KM,4CAME,+CAAA,CALA,yCAAA,CAEA,eAAA,CADA,eAAA,CAEA,kBAAA,CACA,iBL6KR,CKxKM,uCACE,aAAA,CAGA,mCAAA,CADA,WAAA,CAEA,uBAAA,CAHA,UL6KR,CKpKE,oCACE,eLsKJ,CKlKE,sEAEE,eLoKJ","file":"custom.css"}
|
@ -3,7 +3,7 @@
|
||||
-#}
|
||||
{% extends "base.html" %}
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{{ 'overrides/assets/stylesheets/main.7073df5a.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/custom.7073df5a.min.css' | url }}">
|
||||
{% endblock %}
|
||||
{% block announce %}
|
||||
<a href="https://twitter.com/squidfunk">
|
||||
@ -16,5 +16,5 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.d665d539.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/custom.525be7f2.min.js' | url }}"></script>
|
||||
{% endblock %}
|
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["src/overrides/assets/stylesheets/main/_typeset.scss","../../../../src/overrides/assets/stylesheets/main.scss","src/assets/stylesheets/utilities/_break.scss","src/overrides/assets/stylesheets/main/layout/_banner.scss","src/overrides/assets/stylesheets/main/layout/_hero.scss","src/overrides/assets/stylesheets/main/layout/_iconsearch.scss","src/overrides/assets/stylesheets/main/layout/_sponsorship.scss"],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ADA,WAAA,CAEA,uBAAA,CAHA,UL6KR,CKpKE,oCACE,eLsKJ,CKlKE,sEAEE,eLoKJ","file":"main.css"}
|
@ -34,9 +34,9 @@
|
||||
{% if not config.theme.palette is mapping %}
|
||||
<form class="md-header__option" data-md-component="palette">
|
||||
{% for option in config.theme.palette %}
|
||||
{% set scheme = option.scheme | d("default", true) %}
|
||||
{% set primary = option.primary | d("indigo", true) %}
|
||||
{% set accent = option.accent | d("indigo", true) %}
|
||||
{% set scheme = option.scheme | d("default", true) %}
|
||||
{% set primary = option.primary %}
|
||||
{% set accent = option.accent %}
|
||||
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ scheme | replace(' ', '-') }}" data-md-color-primary="{{ primary | replace(' ', '-') }}" data-md-color-accent="{{ accent | replace(' ', '-') }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}">
|
||||
{% if option.toggle %}
|
||||
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
|
||||
|
@ -36,7 +36,7 @@ copyright: Copyright © 2016 - 2022 Martin Donath
|
||||
# Configuration
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: material/overrides
|
||||
custom_dir: material/.overrides
|
||||
features:
|
||||
# - announce.dismiss
|
||||
- content.code.annotate
|
||||
|
@ -68,4 +68,4 @@ include = ["/material"]
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["/material", "/package.json", "/requirements.txt"]
|
||||
exclude = ["/material/overrides"]
|
||||
exclude = ["/material/.overrides"]
|
||||
|
@ -80,7 +80,7 @@ export function mountIconSearch(
|
||||
): Observable<Component<IconSearch>> {
|
||||
const config = configuration()
|
||||
const index$ = requestJSON<IconSearchIndex>(
|
||||
new URL("overrides/assets/javascripts/iconsearch_index.json", config.base)
|
||||
new URL("assets/javascripts/iconsearch_index.json", config.base)
|
||||
)
|
||||
|
||||
/* Retrieve query and result components */
|
@ -36,11 +36,9 @@
|
||||
|
||||
@import "config";
|
||||
|
||||
@import "main/typeset";
|
||||
@import "custom/typeset";
|
||||
|
||||
@import "main/layout/banner";
|
||||
@import "main/layout/hero";
|
||||
@import "main/layout/iconsearch";
|
||||
@import "main/layout/sponsorship";
|
||||
|
||||
@import "main/shame";
|
||||
@import "custom/layout/banner";
|
||||
@import "custom/layout/hero";
|
||||
@import "custom/layout/iconsearch";
|
||||
@import "custom/layout/sponsorship";
|
@ -28,7 +28,7 @@
|
||||
<!-- Extra style sheets (can't be set in mkdocs.yml due to content hash) -->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ 'overrides/assets/stylesheets/main.css' | url }}"
|
||||
href="{{ 'assets/stylesheets/custom.css' | url }}"
|
||||
/>
|
||||
{% endblock %}
|
||||
|
||||
@ -48,5 +48,5 @@
|
||||
{{ super() }}
|
||||
|
||||
<!-- Extra JavaScript (can't be set in mkdocs.yml due to content hash) -->
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/custom.js' | url }}"></script>
|
||||
{% endblock %}
|
@ -159,9 +159,9 @@
|
||||
{% if not palette is mapping %}
|
||||
{% set palette = palette | first %}
|
||||
{% endif %}
|
||||
{% set scheme = palette.scheme | d("default", true) %}
|
||||
{% set primary = palette.primary | d("indigo", true) %}
|
||||
{% set accent = palette.accent | d("indigo", true) %}
|
||||
{% set scheme = palette.scheme | d("default", true) %}
|
||||
{% set primary = palette.primary %}
|
||||
{% set accent = palette.accent %}
|
||||
<body
|
||||
dir="{{ direction }}"
|
||||
data-md-color-scheme="{{ scheme | replace(' ', '-') }}"
|
||||
|
@ -1,25 +0,0 @@
|
||||
////
|
||||
/// Copyright (c) 2016-2022 Martin Donath <martin.donath@squidfunk.com>
|
||||
///
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
/// copy of this software and associated documentation files (the "Software"),
|
||||
/// to deal in the Software without restriction, including without limitation
|
||||
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
/// and/or sell copies of the Software, and to permit persons to whom the
|
||||
/// Software is furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
/// DEALINGS
|
||||
////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Nothing to see here, move along
|
||||
// ----------------------------------------------------------------------------
|
@ -73,9 +73,9 @@
|
||||
{% if not config.theme.palette is mapping %}
|
||||
<form class="md-header__option" data-md-component="palette">
|
||||
{% for option in config.theme.palette %}
|
||||
{% set scheme = option.scheme | d("default", true) %}
|
||||
{% set primary = option.primary | d("indigo", true) %}
|
||||
{% set accent = option.accent | d("indigo", true) %}
|
||||
{% set scheme = option.scheme | d("default", true) %}
|
||||
{% set primary = option.primary %}
|
||||
{% set accent = option.accent %}
|
||||
<input
|
||||
class="md-option"
|
||||
data-md-color-media="{{ option.media }}"
|
||||
|
@ -49,6 +49,7 @@ import glob from "tiny-glob"
|
||||
interface ResolveOptions {
|
||||
cwd: string /* Working directory */
|
||||
watch?: boolean /* Watch mode */
|
||||
dot?: boolean /* Hidden files or directories */
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,7 +107,7 @@ function now() {
|
||||
export function resolve(
|
||||
pattern: string, options?: ResolveOptions
|
||||
): Observable<string> {
|
||||
return from(glob(pattern, options))
|
||||
return from(glob(pattern, { ...options, dot: true }))
|
||||
.pipe(
|
||||
catchError(() => EMPTY),
|
||||
concatAll(),
|
||||
|
@ -169,7 +169,7 @@ const sources$ = copyAll("**/*.py", {
|
||||
const stylesheets$ = resolve("**/[!_]*.scss", { cwd: "src" })
|
||||
.pipe(
|
||||
mergeMap(file => zip(
|
||||
of(ext(file, ".css")),
|
||||
of(ext(file, ".css").replace(".overrides/", "")),
|
||||
transformStyle({
|
||||
from: `src/${file}`,
|
||||
to: ext(`${base}/${file}`, ".css")
|
||||
@ -178,10 +178,10 @@ const stylesheets$ = resolve("**/[!_]*.scss", { cwd: "src" })
|
||||
)
|
||||
|
||||
/* Transform scripts */
|
||||
const javascripts$ = resolve("**/{bundle,search}.ts", { cwd: "src" })
|
||||
const javascripts$ = resolve("**/{custom,bundle,search}.ts", { cwd: "src" })
|
||||
.pipe(
|
||||
mergeMap(file => zip(
|
||||
of(ext(file, ".js")),
|
||||
of(ext(file, ".js").replace(".overrides/", "")),
|
||||
transformScript({
|
||||
from: `src/${file}`,
|
||||
to: ext(`${base}/${file}`, ".js")
|
||||
@ -209,7 +209,10 @@ const manifest$ = merge(
|
||||
.pipe(
|
||||
scan((prev, mapping) => (
|
||||
mapping.reduce((next, [key, value]) => (
|
||||
next.set(key, value.replace(`${base}/`, ""))
|
||||
next.set(key, value.replace(
|
||||
new RegExp(`${base}\\/(\.overrides\\/)?`),
|
||||
""
|
||||
))
|
||||
), prev)
|
||||
), new Map<string, string>()),
|
||||
)
|
||||
@ -222,6 +225,7 @@ const templates$ = manifest$
|
||||
to: base,
|
||||
watch: process.argv.includes("--watch"),
|
||||
transform: async data => {
|
||||
console.log(manifest)
|
||||
const metadata = require("../../package.json")
|
||||
const banner =
|
||||
"{#-\n" +
|
||||
@ -300,7 +304,7 @@ const index$ = zip(icons$, emojis$)
|
||||
} as IconSearchIndex
|
||||
}),
|
||||
switchMap(data => write(
|
||||
`${base}/overrides/assets/javascripts/iconsearch_index.json`,
|
||||
`${base}/.overrides/assets/javascripts/iconsearch_index.json`,
|
||||
JSON.stringify(data)
|
||||
))
|
||||
)
|
||||
|
@ -20,7 +20,7 @@
|
||||
"noUnusedParameters": true,
|
||||
"paths": {
|
||||
"~/*": ["./assets/javascripts/*"],
|
||||
"_/*": ["./overrides/assets/javascripts/*"]
|
||||
"_/*": ["./.overrides/assets/javascripts/*"]
|
||||
},
|
||||
"removeComments": false,
|
||||
"sourceMap": true,
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"include": [
|
||||
"src/assets/javascripts",
|
||||
"src/overrides/assets/javascripts",
|
||||
"src/.overrides/assets/javascripts",
|
||||
"tools",
|
||||
"typings"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user