mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge branch 'master' into refactor/webpack
This commit is contained in:
commit
3039e4150c
@ -6,4 +6,22 @@ template: overrides/main.html
|
||||
|
||||
**MIT License**
|
||||
|
||||
--8<-- "LICENSE"
|
||||
Copyright (c) 2016-2021 Martin Donath
|
||||
|
||||
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
|
||||
IN THE SOFTWARE.
|
||||
|
@ -19,7 +19,7 @@ or another destination should be used.
|
||||
:octicons-milestone-24: Default: [`Roboto`][3]
|
||||
|
||||
The _regular font_ is used for all body copy, headlines, and essentially
|
||||
everything that does not need to be proportionally spaced. It can be set to any
|
||||
everything that does not need to be monospaced. It can be set to any
|
||||
valid [Google Font][1] with:
|
||||
|
||||
``` yaml
|
||||
@ -33,12 +33,12 @@ The typeface will be loaded in 300, 400, _400i_ and __700__.
|
||||
[2]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html
|
||||
[3]: https://fonts.google.com/specimen/Roboto
|
||||
|
||||
### Proportional font
|
||||
### Monospaced font
|
||||
|
||||
[:octicons-file-code-24: Source][2] ·
|
||||
:octicons-milestone-24: Default: [`Roboto Mono`][4]
|
||||
|
||||
The _proportional font_ is used for code blocks and can be configured separately.
|
||||
The _monospaced font_ is used for code blocks and can be configured separately.
|
||||
Just like the regular font, it can be set to any valid [Google Font][1] via
|
||||
`mkdocs.yml` with:
|
||||
|
||||
@ -88,7 +88,7 @@ corresponding `@font-face` definition:
|
||||
```
|
||||
|
||||
The font can then be applied to specific elements, e.g. only headlines, or
|
||||
globally to be used as the site-wide regular or proportional font:
|
||||
globally to be used as the site-wide regular or monospaced font:
|
||||
|
||||
=== "Regular font"
|
||||
|
||||
@ -98,7 +98,7 @@ globally to be used as the site-wide regular or proportional font:
|
||||
}
|
||||
```
|
||||
|
||||
=== "Proportional font"
|
||||
=== "Monospaced font"
|
||||
|
||||
``` css
|
||||
pre, code, kbd {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16883
package-lock.json
generated
16883
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -40,7 +40,7 @@ input {
|
||||
-apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
// Define proportionally spaced fonts
|
||||
// Define monospaced fonts
|
||||
code,
|
||||
pre,
|
||||
kbd {
|
||||
|
@ -22,8 +22,19 @@
|
||||
|
||||
import * as chokidar from "chokidar"
|
||||
import * as fs from "fs/promises"
|
||||
import { Observable, from, fromEvent, identity } from "rxjs"
|
||||
import { mapTo, mergeWith, switchMap } from "rxjs/operators"
|
||||
import {
|
||||
Observable,
|
||||
from,
|
||||
fromEvent,
|
||||
identity,
|
||||
EMPTY
|
||||
} from "rxjs"
|
||||
import {
|
||||
catchError,
|
||||
mapTo,
|
||||
mergeWith,
|
||||
switchMap
|
||||
} from "rxjs/operators"
|
||||
import glob from "tiny-glob"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@ -87,6 +98,7 @@ export function resolve(
|
||||
): Observable<string> {
|
||||
return from(glob(pattern, options))
|
||||
.pipe(
|
||||
catchError(() => EMPTY),
|
||||
switchMap(files => from(files)),
|
||||
options?.watch
|
||||
? mergeWith(watch(pattern, options))
|
||||
|
Loading…
Reference in New Issue
Block a user