Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f81a0c578a | ||
|
|
96168d05d8 | ||
|
|
c691fff501 | ||
|
|
c101debc8c | ||
|
|
65d725f260 | ||
|
|
040d3a303c | ||
|
|
823b24aa9c | ||
|
|
e3ac58a7c6 | ||
|
|
e0855d4002 | ||
|
|
b54813ffd8 | ||
|
|
5593f99c14 | ||
|
|
a463798593 | ||
|
|
c55cf5cba9 | ||
|
|
5257fe67a6 | ||
|
|
180da60770 | ||
|
|
7fd5811bf1 | ||
|
|
eea4ebdaf4 | ||
|
|
7b653fac4e | ||
|
|
7178bb4180 | ||
|
|
87bc1c8ef9 | ||
|
|
99b057a9ae | ||
|
|
9633f69b74 | ||
|
|
7661631e3e | ||
|
|
2ba776bb0e | ||
|
|
e37f517240 | ||
|
|
c0fe88004a | ||
|
|
6f324afb37 | ||
|
|
cf17f3b71e | ||
|
|
9ecc9aa8c9 | ||
|
|
4086c2c973 | ||
|
|
364309d47a | ||
|
|
f850641437 | ||
|
|
0a08b2b1cd | ||
|
|
57d2a4e4a5 | ||
|
|
23be61a803 | ||
|
|
b894452360 | ||
|
|
c7ace3eba9 | ||
|
|
6e0f5799b4 | ||
|
|
a4b8bba3e0 | ||
|
|
e5831239e2 | ||
|
|
c61a6179f0 | ||
|
|
ce9ca56142 | ||
|
|
1a32e9b7e3 | ||
|
|
b32084bf8b | ||
|
|
2dbf60affd | ||
|
|
cecd1f1d7c | ||
|
|
6033519d15 | ||
|
|
6696f09444 | ||
|
|
bfca02762d | ||
|
|
7a6db53801 | ||
|
|
fcbe7f6384 | ||
|
|
a2ff959ab3 | ||
|
|
7fd950872c | ||
|
|
cb9a563a78 | ||
|
|
3568043dea | ||
|
|
6136fc905f | ||
|
|
cb5d51e7c1 | ||
|
|
82b8c71059 | ||
|
|
660844cb3c | ||
|
|
8a8fe982e2 | ||
|
|
b5a7759b0a | ||
|
|
0258fe6bcf | ||
|
|
07f3440f42 | ||
|
|
59605d0e0c | ||
|
|
6d01f17193 | ||
|
|
03604c5e27 | ||
|
|
46474cc7c0 | ||
|
|
efff866b62 | ||
|
|
aca699f2cb | ||
|
|
ebff8b795b | ||
|
|
d53945a89a | ||
|
|
60624bfa82 | ||
|
|
f37bb76d18 | ||
|
|
fde28c3f47 | ||
|
|
56207162fe | ||
|
|
41121cf582 | ||
|
|
4d4e869f02 | ||
|
|
42d6525c50 | ||
|
|
b273c429d9 | ||
|
|
33c183754c | ||
|
|
45208dea73 | ||
|
|
f56b070909 | ||
|
|
01054414c8 | ||
|
|
0198e5e98e | ||
|
|
e3fa0ebd87 | ||
|
|
29f96ca61f | ||
|
|
ddd7e33581 | ||
|
|
9617716652 | ||
|
|
b22e571f31 | ||
|
|
06076d2ab5 | ||
|
|
510c0fdf5e | ||
|
|
6806139d38 | ||
|
|
c6946350a9 | ||
|
|
5f5a82e718 | ||
|
|
1e590ba872 | ||
|
|
983e5bbf72 | ||
|
|
344ce1f4fa | ||
|
|
9e6d347db0 | ||
|
|
232e997ddc | ||
|
|
425daf1156 | ||
|
|
3bc52f0b53 | ||
|
|
662a2d3343 | ||
|
|
59281d63f2 | ||
|
|
9f71d0a220 | ||
|
|
ca0de52b45 | ||
|
|
8e51451366 | ||
|
|
6e69387b3d | ||
|
|
313424a521 | ||
|
|
d7ba0134a0 | ||
|
|
dc48b06500 | ||
|
|
1248237d60 | ||
|
|
763c23eebb | ||
|
|
67b2d84519 | ||
|
|
db4a8340d8 | ||
|
|
5ef3ec7aa3 | ||
|
|
9edf730873 | ||
|
|
9f8ef33545 | ||
|
|
a1105b81f1 | ||
|
|
9f3dde3957 | ||
|
|
acece94694 | ||
|
|
584a59ef8b | ||
|
|
db73d4863a | ||
|
|
3f5957bd01 | ||
|
|
4ed0b1328f | ||
|
|
9d4a8409f9 | ||
|
|
5ee95e4fe2 | ||
|
|
3222ec5a6e | ||
|
|
5e97b74471 | ||
|
|
f4c5344116 | ||
|
|
b3fcd629a3 | ||
|
|
27808a4899 | ||
|
|
1e35478b44 | ||
|
|
6364de1a2d | ||
|
|
113ba5fd8b | ||
|
|
96ae06f25c | ||
|
|
84dd88af69 | ||
|
|
e1310aa9ee | ||
|
|
be5c94128d | ||
|
|
dd59ed1f00 | ||
|
|
36ac36c56a | ||
|
|
64874a9583 | ||
|
|
02296f6605 | ||
|
|
124a6b2438 | ||
|
|
fc024da6e1 | ||
|
|
b812c54f66 | ||
|
|
5b5bc03600 | ||
|
|
127b98b009 | ||
|
|
e627f40b11 | ||
|
|
fd6ddc7eb8 | ||
|
|
406883a236 | ||
|
|
34a5779628 | ||
|
|
68b1800d38 | ||
|
|
50be5f8712 | ||
|
|
0dec429a9a | ||
|
|
e21949edc5 | ||
|
|
854fed7fb9 | ||
|
|
4ee1ee8c04 | ||
|
|
7032b7de4b | ||
|
|
51549c61ee | ||
|
|
56d252c6bb | ||
|
|
57f51f3a3d | ||
|
|
fc6b086db4 | ||
|
|
2784a4f781 | ||
|
|
62dc4c111e | ||
|
|
1a4490a39c | ||
|
|
a1a896e1bb | ||
|
|
e30b60b1e6 | ||
|
|
016b1a227d | ||
|
|
0f5c43df0c | ||
|
|
25a102f2b4 | ||
|
|
8f09451c13 | ||
|
|
eade56c912 | ||
|
|
8ab2e5eb2a | ||
|
|
d58834222d | ||
|
|
f934776af6 | ||
|
|
d2e2764bd6 | ||
|
|
aedddcbc39 |
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
# Copyright (c) 2016-2017 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
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Build files
|
||||
/build
|
||||
/material
|
||||
/site
|
||||
|
||||
# Temporary
|
||||
/tests/regression
|
||||
/lib/tasks/tests/regression
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-2017 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
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Determine current branch
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "Hook[pre-commit]: Checking branch..."
|
||||
|
||||
# If we're on master, abort commit
|
||||
if [[ "$BRANCH" == "master" ]]; then
|
||||
echo "Commits on master are only allowed via Pull Requests. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We're good
|
||||
exit 0
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -20,51 +20,32 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Check, if all changes are added to the index
|
||||
CWD_CLEAN="$(git diff-index HEAD --)"
|
||||
# Patch file to store unindexed changes
|
||||
PATCH_FILE=".working-tree.patch"
|
||||
|
||||
# This variables stores the state of the stash.
|
||||
# 0 = not restored yet.
|
||||
# 1 = stash was already reset
|
||||
STASH_POPPED=0
|
||||
|
||||
# Pop the stash in case of trap
|
||||
# Revert changes that have been registered in the patch file
|
||||
function cleanup {
|
||||
if test -n "$CWD_CLEAN"; then
|
||||
if test "$STASH_POPPED" != 1 ; then
|
||||
# Pop the changes (= stash) back to the work space
|
||||
git stash pop -q
|
||||
fi
|
||||
EXIT_CODE=$?
|
||||
if [ -f "$PATCH_FILE" ]; then
|
||||
git apply "$PATCH_FILE" 2> /dev/null
|
||||
rm "$PATCH_FILE"
|
||||
fi
|
||||
exit
|
||||
exit $EXIT_CODE
|
||||
}
|
||||
|
||||
# Register signal handler
|
||||
trap cleanup SIGHUP SIGINT SIGTERM
|
||||
# Register signal handlers
|
||||
trap cleanup EXIT SIGINT SIGHUP
|
||||
|
||||
# Stash all changes that were not added to the commit
|
||||
if test -n "$CWD_CLEAN"; then
|
||||
git stash -q --keep-index --include-untracked
|
||||
fi
|
||||
# Cancel any changes to the working tree that are not going to be committed
|
||||
git diff > "$PATCH_FILE"
|
||||
git checkout -- .
|
||||
|
||||
# Filter relevant files for linting
|
||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
|
||||
grep "\.\(js\|jsx\|scss\)$")
|
||||
|
||||
# Run the check and print indicator
|
||||
echo "Hook[pre-commit]: Running linter..."
|
||||
STD_OUT=$(npm run lint --silent)
|
||||
|
||||
# Grab exit code of check
|
||||
HAD_ERROR=$?
|
||||
|
||||
# Pop the changes (= stash) back to the work space
|
||||
if test -n "$CWD_CLEAN"; then
|
||||
git stash pop -q
|
||||
STASH_POPPED=1
|
||||
if [ "$FILES" ]; then
|
||||
echo "Hook[pre-commit]: Running linter..."
|
||||
npm run lint --silent || exit 1
|
||||
fi
|
||||
|
||||
# In case of error, print output of check
|
||||
if test "$HAD_ERROR" != 0 ; then
|
||||
echo ${STD_OUT}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Reset indicator and exit
|
||||
exit 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -18,7 +18,7 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Mac OS X internals
|
||||
# macOS internals
|
||||
.DS_Store
|
||||
|
||||
# NPM-related
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
# Copyright (c) 2016 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
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- node_modules/**
|
||||
- src/assets/stylesheets/extensions/pymdown/_arithmatex.scss
|
||||
- src/assets/stylesheets/extensions/pymdown/_inlinehilite.scss
|
||||
- src/assets/stylesheets/_shame.scss
|
||||
|
||||
options:
|
||||
merge-default-rules: true
|
||||
formatter: stylish
|
||||
|
||||
rules:
|
||||
attribute-quotes: 2
|
||||
bem-depth: 2
|
||||
border-zero: 2
|
||||
brace-style: 2
|
||||
class-name-format:
|
||||
- 2
|
||||
- convention: hyphenatedbem
|
||||
clean-import-paths: 2
|
||||
empty-args: 2
|
||||
empty-line-between-blocks: 2
|
||||
extends-before-declarations: 2
|
||||
extends-before-mixins: 2
|
||||
final-newline: 2
|
||||
function-name-format:
|
||||
- 2
|
||||
- allow-leading-underscore: false
|
||||
force-attribute-nesting: 0
|
||||
force-element-nesting: 0
|
||||
force-pseudo-nesting: 0
|
||||
hex-length:
|
||||
- 2
|
||||
- style: long
|
||||
hex-notation:
|
||||
- 2
|
||||
- style: uppercase
|
||||
id-name-format:
|
||||
- 2
|
||||
indentation: 0
|
||||
leading-zero:
|
||||
- 2
|
||||
- include: true
|
||||
mixin-name-format:
|
||||
- 2
|
||||
- convention: hyphenatedbem
|
||||
- allow-leading-underscore: false
|
||||
mixins-before-declarations:
|
||||
- 2
|
||||
- exclude:
|
||||
- break-at
|
||||
- break-at-orientation
|
||||
- break-at-ratio
|
||||
- break-at-device
|
||||
- break-from-device
|
||||
- break-to-device
|
||||
nesting-depth:
|
||||
- 2
|
||||
- max-depth: 4
|
||||
no-color-keywords: 2
|
||||
no-color-literals: 2
|
||||
no-css-comments: 2
|
||||
no-debug: 2
|
||||
no-duplicate-properties: 0
|
||||
no-empty-rulesets: 2
|
||||
no-important: 2
|
||||
no-invalid-hex: 2
|
||||
no-mergeable-selectors: 0
|
||||
no-misspelled-properties: 0
|
||||
no-qualifying-elements:
|
||||
- 2
|
||||
- allow-element-with-attribute: true
|
||||
no-trailing-zero: 0
|
||||
no-transition-all: 2
|
||||
no-url-protocols: 2
|
||||
no-vendor-prefixes: 0
|
||||
one-declaration-per-line: 2
|
||||
placeholder-name-format:
|
||||
- 2
|
||||
- convention: hyphenatedbem
|
||||
property-sort-order:
|
||||
- 2
|
||||
- order: smacss
|
||||
property-units:
|
||||
- 2
|
||||
- global: [rem, em, s, vh, mm]
|
||||
pseudo-element: 2
|
||||
quotes:
|
||||
- 2
|
||||
- style: double
|
||||
shorthand-values: 2
|
||||
single-line-per-selector: 2
|
||||
space-after-bang: 2
|
||||
space-after-colon: 2
|
||||
space-after-comma: 2
|
||||
space-around-operator: 2
|
||||
space-before-bang: 2
|
||||
space-before-brace: 2
|
||||
space-before-colon: 2
|
||||
space-between-parens: 2
|
||||
trailing-semicolon: 2
|
||||
url-quotes: 2
|
||||
variable-for-property: 2
|
||||
variable-name-format:
|
||||
- 2
|
||||
- convention: hyphenatedbem
|
||||
- allow-leading-underscore: false
|
||||
zero-unit: 2
|
||||
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"plugins": [
|
||||
"stylelint-order",
|
||||
"stylelint-scss"
|
||||
],
|
||||
"rules": {
|
||||
"at-rule-empty-line-before": null,
|
||||
"at-rule-no-vendor-prefix": true,
|
||||
"block-opening-brace-space-before": null,
|
||||
"block-closing-brace-newline-after": ["always", {
|
||||
"ignoreAtRules": [
|
||||
"if",
|
||||
"else",
|
||||
"elseif"
|
||||
]
|
||||
}],
|
||||
"color-hex-case": "upper",
|
||||
"color-hex-length": "long",
|
||||
"color-named": "never",
|
||||
"comment-empty-line-before": ["always", {
|
||||
"ignore": ["stylelint-commands"]
|
||||
}],
|
||||
"font-family-name-quotes": "always-where-recommended",
|
||||
"font-weight-notation": "numeric",
|
||||
"function-url-quotes": "always",
|
||||
"no-unknown-animations": true,
|
||||
"order/declaration-block-order": [
|
||||
"custom-properties",
|
||||
"declarations"
|
||||
],
|
||||
"order/declaration-block-properties-specified-order": [
|
||||
"display",
|
||||
"position",
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left",
|
||||
|
||||
"flex",
|
||||
"flex-basis",
|
||||
"flex-direction",
|
||||
"flex-flow",
|
||||
"flex-grow",
|
||||
"flex-shrink",
|
||||
"flex-wrap",
|
||||
"align-content",
|
||||
"align-items",
|
||||
"align-self",
|
||||
"justify-content",
|
||||
"order",
|
||||
|
||||
"width",
|
||||
"min-width",
|
||||
"max-width",
|
||||
|
||||
"height",
|
||||
"min-height",
|
||||
"max-height",
|
||||
|
||||
"margin",
|
||||
"margin-top",
|
||||
"margin-right",
|
||||
"margin-bottom",
|
||||
"margin-left",
|
||||
|
||||
"padding",
|
||||
"padding-top",
|
||||
"padding-right",
|
||||
"padding-bottom",
|
||||
"padding-left",
|
||||
|
||||
"float",
|
||||
"clear",
|
||||
"clip",
|
||||
|
||||
"columns",
|
||||
"column-gap",
|
||||
"column-fill",
|
||||
"column-rule",
|
||||
"column-span",
|
||||
"column-count",
|
||||
"column-width",
|
||||
|
||||
"transform",
|
||||
"transform-box",
|
||||
"transform-origin",
|
||||
"transform-style",
|
||||
|
||||
"transition",
|
||||
"transition-delay",
|
||||
"transition-duration",
|
||||
"transition-property",
|
||||
"transition-timing-function",
|
||||
|
||||
"border",
|
||||
"border-top",
|
||||
"border-right",
|
||||
"border-bottom",
|
||||
"border-left",
|
||||
"border-width",
|
||||
"border-top-width",
|
||||
"border-right-width",
|
||||
"border-bottom-width",
|
||||
"border-left-width",
|
||||
|
||||
"border-style",
|
||||
"border-top-style",
|
||||
"border-right-style",
|
||||
"border-bottom-style",
|
||||
"border-left-style",
|
||||
|
||||
"border-radius",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"border-bottom-right-radius",
|
||||
|
||||
"border-color",
|
||||
"border-top-color",
|
||||
"border-right-color",
|
||||
"border-bottom-color",
|
||||
"border-left-color",
|
||||
|
||||
"outline",
|
||||
"outline-color",
|
||||
"outline-offset",
|
||||
"outline-style",
|
||||
"outline-width",
|
||||
|
||||
"background",
|
||||
"background-attachment",
|
||||
"background-clip",
|
||||
"background-color",
|
||||
"background-image",
|
||||
"background-repeat",
|
||||
"background-position",
|
||||
"background-size",
|
||||
|
||||
"color",
|
||||
|
||||
"font",
|
||||
"font-family",
|
||||
"font-size",
|
||||
"font-smoothing",
|
||||
"font-style",
|
||||
"font-variant",
|
||||
"font-weight",
|
||||
|
||||
"letter-spacing",
|
||||
"line-height",
|
||||
"list-style",
|
||||
|
||||
"text-align",
|
||||
"text-decoration",
|
||||
"text-indent",
|
||||
"text-overflow",
|
||||
"text-rendering",
|
||||
"text-shadow",
|
||||
"text-transform",
|
||||
"text-wrap",
|
||||
|
||||
"white-space",
|
||||
"word-spacing",
|
||||
|
||||
"border-collapse",
|
||||
"border-spacing",
|
||||
"box-shadow",
|
||||
"caption-side",
|
||||
"content",
|
||||
"cursor",
|
||||
"empty-cells",
|
||||
"opacity",
|
||||
"overflow",
|
||||
"quotes",
|
||||
"speak",
|
||||
"table-layout",
|
||||
"vertical-align",
|
||||
"visibility",
|
||||
"z-index"
|
||||
],
|
||||
"property-no-vendor-prefix": true,
|
||||
"root-no-standard-properties": true,
|
||||
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
|
||||
"selector-descendant-combinator-no-non-space": null,
|
||||
"string-quotes": "double",
|
||||
"unit-whitelist": ["rem", "em", "deg", "s", "%", "mm", "vh"],
|
||||
"value-keyword-case": "lower",
|
||||
"value-no-vendor-prefix": true
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -27,6 +27,12 @@ node_js:
|
||||
- 5
|
||||
- 6
|
||||
|
||||
# Cache dependencies
|
||||
cache:
|
||||
pip: true
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
# Install dependencies
|
||||
before_script:
|
||||
- pip install --user -r requirements.txt
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
mkdocs-material-1.0.0 (2016-12-18)
|
||||
mkdocs-material-1.0.2 (2017-01-15)
|
||||
|
||||
The theme has been entirely rewritten from scratch to better reflect the
|
||||
idea of what a documentation theme using the Material Design guidelines
|
||||
should look like. It is heavily inspired by Google's own documentation
|
||||
theme, but doesn't copy it blindly.
|
||||
* Fixed horizontal scrollbar in content area
|
||||
|
||||
mkdocs-material-1.0.1 (2017-01-14)
|
||||
|
||||
* Fixed massive repaints happening when scrolling
|
||||
* Fixed footer back reference positions in case of overflow
|
||||
* Fixed header logo from showing when the menu icon is rendered
|
||||
* Changed scrollbar behavior to only show when content overflows
|
||||
|
||||
mkdocs-material-1.0.0 (2017-01-13)
|
||||
|
||||
* Introduced Webpack for more sophisticated JavaScript bundling
|
||||
* Introduced ESLint and SassLint for code style checks
|
||||
* Introduced ESLint and Stylelint for code style checks
|
||||
* Introduced more accurate Material Design colors and shadows
|
||||
* Introduced modular scales for harmonic font sizing
|
||||
* Introduced git-hooks for better development workflow
|
||||
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
|
||||
* Rewrite of JavaScript using ES6 and Babel as a transpiler
|
||||
* Rewrite of Admonition, Permalinks and Codehilite integration
|
||||
* Rewrite of Admonition, Permalinks and CodeHilite integration
|
||||
* Rewrite of the complete typographical system
|
||||
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
|
||||
* Removed Bower as a dependency in favor of NPM
|
||||
@@ -30,7 +36,7 @@ mkdocs-material-1.0.0 (2016-12-18)
|
||||
* Added more detailed documentation on specimen, extensions etc.
|
||||
* Added a 404.html error page for deployment on GitHub Pages
|
||||
* Fixed live reload chain in watch mode when saving a template
|
||||
* Fixed variable references to work with mkdocs 0.16
|
||||
* Fixed variable references to work with MkDocs 0.16
|
||||
|
||||
mkdocs-material-0.2.4 (2016-06-26)
|
||||
|
||||
@@ -47,7 +53,7 @@ mkdocs-material-0.2.3 (2016-05-16)
|
||||
|
||||
mkdocs-material-0.2.2 (2016-03-20)
|
||||
|
||||
* Fixed #15: Document pygments dependency for codehilite
|
||||
* Fixed #15: Document Pygments dependency for CodeHilite
|
||||
* Fixed #16: Favicon could not be set through mkdocs.yml
|
||||
* Fixed #17: Put version into own container for styling
|
||||
* Fixed #20: Fix rounded borders for tables
|
||||
@@ -90,7 +96,7 @@ mkdocs-material-0.1.1 (2016-02-11)
|
||||
* Updated NPM and Bower dependencies to most recent versions
|
||||
* Changed footer/copyright link to Material theme to GitHub pages
|
||||
* Made MkDocs building/serving in build process optional
|
||||
* Set up continuous integration with travis-ci.org
|
||||
* Set up continuous integration with Travis
|
||||
|
||||
mkdocs-material-0.1.0 (2016-02-09)
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# Contributing
|
||||
|
||||
Interested in contributing to the Material theme? Want to report a bug? Before
|
||||
you do, please read the following guidelines.
|
||||
|
||||
## Submission context
|
||||
|
||||
### Got a question or problem?
|
||||
|
||||
For quick questions there's no need to open an issue as you can reach us on
|
||||
[gitter.im][1].
|
||||
|
||||
[1]: https://gitter.im/mkdocs-material/general
|
||||
|
||||
### Found a bug?
|
||||
|
||||
If you found a bug in the source code, you can help us by submitting an issue
|
||||
to the [issue tracker][2] in our GitHub repository. Even better, you can submit
|
||||
a Pull Request with a fix. However, before doing so, please read the
|
||||
[submission guidelines][3].
|
||||
|
||||
[2]: https://github.com/squidfunk/mkdocs-material/issues
|
||||
[3]: #submission-guidelines
|
||||
|
||||
### Missing a feature?
|
||||
|
||||
You can request a new feature by submitting an issue to our GitHub Repository.
|
||||
If you would like to implement a new feature, please submit an issue with a
|
||||
proposal for your work first, to be sure that it is of use for everyone, as
|
||||
the Material theme is highly opinionated. Please consider what kind of change
|
||||
it is:
|
||||
|
||||
* For a **Major Feature**, first open an issue and outline your proposal so
|
||||
that it can be discussed. This will also allow us to better coordinate our
|
||||
efforts, prevent duplication of work, and help you to craft the change so
|
||||
that it is successfully accepted into the project.
|
||||
|
||||
* **Small Features** and bugs can be crafted and directly submitted as a Pull
|
||||
Request. However, there is no guarantee that your feature will make it into
|
||||
the master, as it's always a matter of opinion whether if benefits the
|
||||
overall functionality of the theme.
|
||||
|
||||
## Submission guidelines
|
||||
|
||||
### Submitting an issue
|
||||
|
||||
Before you submit an issue, please search the issue tracker, maybe an issue for
|
||||
your problem already exists and the discussion might inform you of workarounds
|
||||
readily available.
|
||||
|
||||
We want to fix all the issues as soon as possible, but before fixing a bug we
|
||||
need to reproduce and confirm it. In order to reproduce bugs we will
|
||||
systematically ask you to provide a minimal reproduction scenario using the
|
||||
custom issue template. Please stick to the issue template.
|
||||
|
||||
Unfortunately we are not able to investigate / fix bugs without a minimal
|
||||
reproduction scenario, so if we don't hear back from you we may close the issue.
|
||||
|
||||
### Submitting a Pull Request (PR)
|
||||
|
||||
Search GitHub for an open or closed PR that relates to your submission. You
|
||||
don't want to duplicate effort. If you do not find a related issue or PR,
|
||||
go ahead.
|
||||
|
||||
1. **Development**: Fork the project, set up the [development environment][4],
|
||||
make your changes in a separate git branch and add descriptive messages to
|
||||
your commits.
|
||||
|
||||
2. **Build**: Before submitting a pull requests, build the theme. This is a
|
||||
mandatory requirement for your PR to get accepted, as the theme should at
|
||||
all times be installable through GitHub.
|
||||
|
||||
3. **Pull Request**: After building the theme, commit the compiled output, push
|
||||
your branch to GitHub and send a PR to `mkdocs-material:master`. If we
|
||||
suggest changes, make the required updates, rebase your branch and push the
|
||||
changes to your GitHub repository, which will automatically update your PR.
|
||||
|
||||
After your PR is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository.
|
||||
|
||||
[4]: http://localhost:8000/customization/#theme-development
|
||||
@@ -0,0 +1,39 @@
|
||||
# Copyright (c) 2016-2017 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
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
FROM jfloff/alpine-python:2.7-slim
|
||||
MAINTAINER Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /docs
|
||||
|
||||
# Install packages
|
||||
COPY requirements.txt .
|
||||
RUN \
|
||||
pip install -r requirements.txt && \
|
||||
pip install mkdocs-material && \
|
||||
rm requirements.txt
|
||||
|
||||
# Expose MkDocs default port
|
||||
EXPOSE 8000
|
||||
|
||||
# Start development server by default
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -313,8 +313,8 @@ gulp.task("watch", [
|
||||
gulp.start("mkdocs:serve")
|
||||
|
||||
/* Start karma test runner */
|
||||
if (args.karma)
|
||||
gulp.start("tests:unit:watch")
|
||||
// if (args.karma)
|
||||
// gulp.start("tests:unit:watch")
|
||||
|
||||
/* Rebuild stylesheets */
|
||||
gulp.watch([
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
recursive-include material *.ico *.js *.css *.html *.svg
|
||||
recursive-exclude site *
|
||||
recursive-exclude * __pycache__
|
||||
recursive-exclude * *.py[co]
|
||||
recursive-exclude * *.py[co]
|
||||
include LICENSE
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
# Material
|
||||
[![Travis][travis-image]][travis-link]
|
||||
[![Dependencies][deps-image]][deps-link]
|
||||
[![Codacy][codacy-image]][codacy-link]
|
||||
[![Docker][docker-image]][docker-link]
|
||||
[![PyPI][pypi-image]][pypi-link]
|
||||
|
||||
[![Travis CI][travis-image]][travis-link]
|
||||
[![PyPI Downloads][pypi-dl-image]][pypi-dl-link]
|
||||
[![PyPI Version][pypi-v-image]][pypi-v-link]
|
||||
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg
|
||||
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
|
||||
[deps-image]: https://david-dm.org/squidfunk/mkdocs-material/dev-status.svg
|
||||
[deps-link]: https://david-dm.org/squidfunk/mkdocs-material?type=dev
|
||||
[codacy-image]: https://api.codacy.com/project/badge/Grade/fe07aa1fa91d453cb69711d3885c5d7e
|
||||
[codacy-link]: https://www.codacy.com/app/squidfunk/mkdocs-material?utm_source=github.com&utm_medium=referral&utm_content=squidfunk/mkdocs-material&utm_campaign=Badge_Grade
|
||||
[docker-image]: https://img.shields.io/docker/pulls/squidfunk/mkdocs-material.svg
|
||||
[docker-link]: https://hub.docker.com/r/squidfunk/mkdocs-material/
|
||||
[pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
|
||||
[pypi-link]: https://pypi.python.org/pypi/mkdocs-material
|
||||
|
||||
A material design theme for [MkDocs 0.16](http://www.mkdocs.org).
|
||||
|
||||
[](http://squidfunk.github.io/mkdocs-material/)
|
||||
# Material for MkDocs
|
||||
|
||||
A Material Design theme for [MkDocs](http://www.mkdocs.org).
|
||||
|
||||
[](http://squidfunk.github.io/mkdocs-material/)
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -29,7 +43,7 @@ http://squidfunk.github.io/mkdocs-material/
|
||||
|
||||
**MIT License**
|
||||
|
||||
Copyright (c) 2016 Martin Donath
|
||||
Copyright (c) 2016-2017 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
|
||||
@@ -48,10 +62,3 @@ 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.
|
||||
|
||||
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg
|
||||
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
|
||||
[pypi-dl-image]: https://img.shields.io/pypi/dm/mkdocs-material.png
|
||||
[pypi-dl-link]: https://pypi.python.org/pypi/mkdocs-material
|
||||
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png
|
||||
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# Contributing
|
||||
|
||||
Interested in contributing to the Material theme? Want to report a bug? Before
|
||||
you do, please read the following guidelines.
|
||||
|
||||
## Submission context
|
||||
|
||||
### Got a question or problem?
|
||||
|
||||
For quick questions there's no need to open an issue as you can reach us on
|
||||
[gitter.im][1].
|
||||
|
||||
[1]: https://gitter.im/mkdocs-material/general
|
||||
|
||||
### Found a bug?
|
||||
|
||||
If you found a bug in the source code, you can help us by submitting an issue
|
||||
to the [issue tracker][2] in our GitHub repository. Even better, you can submit
|
||||
a Pull Request with a fix. However, before doing so, please read the
|
||||
[submission guidelines][3].
|
||||
|
||||
[2]: https://github.com/squidfunk/mkdocs-material/issues
|
||||
[3]: #submission-guidelines
|
||||
|
||||
### Missing a feature?
|
||||
|
||||
You can request a new feature by submitting an issue to our GitHub Repository.
|
||||
If you would like to implement a new feature, please submit an issue with a
|
||||
proposal for your work first, to be sure that it is of use for everyone, as
|
||||
the Material theme is highly opinionated. Please consider what kind of change
|
||||
it is:
|
||||
|
||||
* For a **major feature**, first open an issue and outline your proposal so
|
||||
that it can be discussed. This will also allow us to better coordinate our
|
||||
efforts, prevent duplication of work, and help you to craft the change so
|
||||
that it is successfully accepted into the project.
|
||||
|
||||
* **Small features and bugs** can be crafted and directly submitted as a Pull
|
||||
Request. However, there is no guarantee that your feature will make it into
|
||||
the master, as it's always a matter of opinion whether if benefits the
|
||||
overall functionality of the theme.
|
||||
|
||||
## Submission guidelines
|
||||
|
||||
### Submitting an issue
|
||||
|
||||
Before you submit an issue, please search the issue tracker, maybe an issue for
|
||||
your problem already exists and the discussion might inform you of workarounds
|
||||
readily available.
|
||||
|
||||
We want to fix all the issues as soon as possible, but before fixing a bug we
|
||||
need to reproduce and confirm it. In order to reproduce bugs we will
|
||||
systematically ask you to provide a minimal reproduction scenario using the
|
||||
custom issue template. Please stick to the issue template.
|
||||
|
||||
Unfortunately we are not able to investigate / fix bugs without a minimal
|
||||
reproduction scenario, so if we don't hear back from you we may close the issue.
|
||||
|
||||
### Submitting a Pull Request (PR)
|
||||
|
||||
Search GitHub for an open or closed PR that relates to your submission. You
|
||||
don't want to duplicate effort. If you do not find a related issue or PR,
|
||||
go ahead.
|
||||
|
||||
1. **Development**: Fork the project, set up the [development environment][4],
|
||||
make your changes in a separate git branch and add descriptive messages to
|
||||
your commits.
|
||||
|
||||
2. **Build**: Before submitting a pull requests, build the theme. This is a
|
||||
mandatory requirement for your PR to get accepted, as the theme should at
|
||||
all times be installable through GitHub.
|
||||
|
||||
3. **Pull Request**: After building the theme, commit the compiled output, push
|
||||
your branch to GitHub and send a PR to `mkdocs-material:master`. If we
|
||||
suggest changes, make the required updates, rebase your branch and push the
|
||||
changes to your GitHub repository, which will automatically update your PR.
|
||||
|
||||
After your PR is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository.
|
||||
|
||||
[4]: http://localhost:8000/customization/#theme-development
|
||||
@@ -1,100 +1,238 @@
|
||||
# Customization
|
||||
|
||||
## A good starting point
|
||||
## A great starting point
|
||||
|
||||
Project documentation is as diverse as the projects themselves and the Material
|
||||
theme is a good starting point for making it look good. However, as you write
|
||||
theme is a good starting point for making it look great. However, as you write
|
||||
your documentation, you may reach some point where some small adjustments are
|
||||
necessary to preserve the style.
|
||||
|
||||
## Small tweaks
|
||||
## Adding assets
|
||||
|
||||
[MkDocs][] provides a simple way for making small adjustments, that is changing
|
||||
some margins, centering text, etc. Simply put the CSS and Javascript files that
|
||||
contain your adjustments in the `docs` directory (ideally in subdirectories of
|
||||
their own) and include them via the `extra_css` and `extra_javascript`
|
||||
variables in your `mkdocs.yml`:
|
||||
[MkDocs][1] provides several ways to interfere with themes. In order to make a
|
||||
few tweaks to an existing theme, you can just add your stylesheets and
|
||||
JavaScript files to the `docs` directory.
|
||||
|
||||
``` yaml
|
||||
extra_css: ['/stylesheets/extra.css']
|
||||
extra_javascript: ['/javascripts/extra.js']
|
||||
[1]: http://www.mkdocs.org
|
||||
|
||||
### Additional stylesheets
|
||||
|
||||
If you want to tweak some colors or change the spacing of certain elements,
|
||||
you can do this in a separate stylesheet. The easiest way is by creating a
|
||||
new stylesheet file in your `docs` directory:
|
||||
|
||||
``` sh
|
||||
mkdir docs/stylesheets
|
||||
touch docs/stylesheets/extra.css
|
||||
```
|
||||
|
||||
Further assistance on including extra CSS and Javascript can be found in the
|
||||
[MkDocs documentation][].
|
||||
Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
## Fundamental changes
|
||||
``` yaml
|
||||
extra_css:
|
||||
- 'stylesheets/extra.css'
|
||||
```
|
||||
|
||||
If you want to make larger adjustments like changing the color palette or
|
||||
typography, you should check out or download the repository of the project and
|
||||
compile the SASS sources with your changes. The project design is very modular,
|
||||
so most things can be tweaked by changing a few variables.
|
||||
Spin up the development server with `mkdocs serve` and start typing your
|
||||
changes in your additional stylesheet file – you can see them instantly after
|
||||
saving, as the MkDocs development server implements live reloading.
|
||||
|
||||
### Setup
|
||||
### Additional JavaScript
|
||||
|
||||
In order to compile the project, you need `node` with a version greater than
|
||||
`0.11` up and running.
|
||||
The same is true for additional JavaScript. If you want to integrate another
|
||||
syntax highlighter or add some custom logic to your theme, create a new
|
||||
JavaScript file in your `docs` directory:
|
||||
|
||||
The project itself is hosted on GitHub, so the next
|
||||
thing you should do is clone the project from GitHub:
|
||||
``` sh
|
||||
mkdir docs/javascripts
|
||||
touch docs/javascripts/extra.js
|
||||
```
|
||||
|
||||
Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'javascripts/extra.js'
|
||||
```
|
||||
|
||||
Further assistance can be found in the [MkDocs documentation][2].
|
||||
|
||||
[2]: http://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme
|
||||
|
||||
## Extending the theme
|
||||
|
||||
If you want to alter the HTML source (e.g. add or remove some part), you can
|
||||
extend the theme. From version 0.16 on MkDocs implements [theme extension][3],
|
||||
an easy way to override parts of a theme without forking and changing the
|
||||
main theme.
|
||||
|
||||
[3]: http://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme_dir
|
||||
|
||||
### Setup and theme structure
|
||||
|
||||
Reference the Material theme as usual in your `mkdocs.yml`, and create a
|
||||
new folder for overrides, e.g. `theme`, which you reference using `theme_dir`:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
theme_dir: 'theme'
|
||||
```
|
||||
|
||||
!!! warning "Theme extension prerequisites"
|
||||
|
||||
As the `theme_dir` variable is used for the theme extension process, the
|
||||
Material theme needs to be installed via `pip` and referenced with the
|
||||
`theme` parameter in your `mkdocs.yml`.
|
||||
|
||||
The structure in the theme directory must mirror the directory structure of the
|
||||
original theme, as any file in the theme directory will replace the file with
|
||||
the same name which is part of the original theme. Besides, further assets
|
||||
may also be put in the theme directory.
|
||||
|
||||
The directory layout of the Material theme is as follows:
|
||||
|
||||
``` sh
|
||||
.
|
||||
├─ assets/
|
||||
│ ├─ images/ # Images and icons
|
||||
│ ├─ javascripts/ # JavaScript
|
||||
│ └─ stylesheets/ # Stylesheets
|
||||
├─ partials/
|
||||
│ ├─ footer.html # Footer bar
|
||||
│ ├─ header.html # Header bar
|
||||
│ ├─ language.html # Localized labels
|
||||
│ ├─ nav-item.html # Main navigation item
|
||||
│ ├─ nav.html # Main navigation
|
||||
│ ├─ search.html # Search box
|
||||
│ ├─ social.html # Social links
|
||||
│ ├─ source.html # Repository information
|
||||
│ ├─ toc-item.html # Table of contents item
|
||||
│ └─ toc.html # Table of contents
|
||||
├─ 404.html # 404 error page
|
||||
├─ base.html # Base template
|
||||
└─ main.html # Default page
|
||||
```
|
||||
|
||||
### Overriding partials
|
||||
|
||||
In order to override the footer, we can replace the `footer.html` partial with
|
||||
our own partial. To do this, create the file `partials/footer.html` in the
|
||||
theme directory. MkDocs will now use the new partial when rendering the theme.
|
||||
This can be done with any file.
|
||||
|
||||
### Overriding template blocks
|
||||
|
||||
Besides overriding partials, one can also override so called template blocks,
|
||||
which are defined inside the Material theme and wrap specific features. To
|
||||
override a template block, create a `main.html` inside the theme directory and
|
||||
define the block, e.g.:
|
||||
|
||||
``` jinja
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block htmltitle %}
|
||||
<title>Lorem ipsum dolor sit amet</title>
|
||||
{% endblock %}
|
||||
```
|
||||
|
||||
The Material theme provides the following template blocks:
|
||||
|
||||
| Block name | Wrapped contents |
|
||||
| ------------ | ----------------------------------------------- |
|
||||
| `analytics` | Wraps the Google Analytics integration |
|
||||
| `content` | Wraps the main content |
|
||||
| `extrahead` | Empty block to define additional meta tags |
|
||||
| `fonts` | Wraps the webfont definitions |
|
||||
| `footer` | Wraps the footer with navigation and copyright |
|
||||
| `header` | Wraps the fixed header bar |
|
||||
| `htmltitle` | Wraps the `<title>` tag |
|
||||
| `libs` | Wraps the JavaScript libraries, e.g. Modernizr |
|
||||
| `repo` | Wraps the repository link in the header bar |
|
||||
| `scripts` | Wraps the JavaScript application logic |
|
||||
| `search_box` | Wraps the search form in the header bar |
|
||||
| `site_meta` | Wraps the meta tags in the document head |
|
||||
| `site_name` | Wraps the site name in the header bar |
|
||||
| `site_nav` | Wraps the site navigation and table of contents |
|
||||
| `social` | Wraps the social links in the footer |
|
||||
| `styles` | Wraps the stylesheets (also extra sources) |
|
||||
|
||||
For more on this topic refer to the [MkDocs documentation][4]
|
||||
|
||||
[4]: http://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
|
||||
|
||||
## Theme development
|
||||
|
||||
The Material theme is built on modern technologies like ES6, [Webpack][5],
|
||||
[Babel][6] and [SASS][7]. If you want to make more fundamental changes, it may
|
||||
be necessary to make the adjustments directly in the source of the Material
|
||||
theme and recompile it. This is fairly easy.
|
||||
|
||||
[5]: https://webpack.github.io/
|
||||
[6]: https://babeljs.io
|
||||
[7]: http://sass-lang.com
|
||||
|
||||
### Environment setup
|
||||
|
||||
In order to start development on the Material theme, a [Node.js][8] version of
|
||||
at least 4 is required. Clone the repository from GitHub:
|
||||
|
||||
``` sh
|
||||
git clone https://github.com/squidfunk/mkdocs-material
|
||||
```
|
||||
|
||||
Then you change the directory and install all dependencies specified in the
|
||||
`package.json` and `bower.json` with the following command:
|
||||
Next, all dependencies need to be installed, which is done with:
|
||||
|
||||
``` sh
|
||||
cd mkdocs-material
|
||||
pip install -r requirements.txt
|
||||
npm install
|
||||
```
|
||||
|
||||
### Development
|
||||
[8]: https://nodejs.org
|
||||
|
||||
The asset pipeline is contained in `Gulpfile.js`, which you can start with
|
||||
`gulp watch`. If you specify the `--mkdocs` flag, this will also run
|
||||
`mkdocs serve`, to monitor changes to the documentation. Point your browser to [localhost:8000](http://localhost:8000) and you should see this very
|
||||
documentation in front of your eyes.
|
||||
### Development mode
|
||||
|
||||
The Material theme uses a sophisticated asset pipeline using [Gulp][9] and
|
||||
Webpack which can be started with the following command:
|
||||
|
||||
``` sh
|
||||
gulp watch --mkdocs
|
||||
npm start
|
||||
```
|
||||
|
||||
For example, changing the color palette is as simple as changing the `$primary`
|
||||
and `$accent` variables in `src/assets/stylesheets/_palette.scss`:
|
||||
This will also start the MkDocs development server which will monitor changes
|
||||
on assets, templates and documentation. Point your browser to
|
||||
[localhost:8000][10] and you should see this documentation in front of you.
|
||||
|
||||
For example, changing the color palette is as simple as changing the
|
||||
`$md-color-primary` and `$md-color-accent` variables in
|
||||
`src/assets/stylesheets/_config.scss`:
|
||||
|
||||
``` css
|
||||
$primary: $red-400;
|
||||
$accent: $teal-a700;
|
||||
$md-color-primary: $clr-red-400;
|
||||
$md-color-accent: $clr-teal-a700;
|
||||
```
|
||||
|
||||
The color variables are defined by the SASS library [quantum-colors][] and
|
||||
resemble all the colors contained in the material design palette.
|
||||
[This page][material-colors] offers a really good overview of the palette.
|
||||
!!! warning "Automatically generated files"
|
||||
|
||||
### Building
|
||||
Never make any changes in the `material` directory, as the contents of this
|
||||
directory are automatically generated from the `src` directory and will be
|
||||
overriden when the theme is built.
|
||||
|
||||
[9]: http://gulpjs.com
|
||||
[10]: http://localhost:8000
|
||||
|
||||
### Build process
|
||||
|
||||
When you finished making your changes, you can build the theme by invoking:
|
||||
|
||||
``` sh
|
||||
gulp build --production
|
||||
npm run build
|
||||
```
|
||||
|
||||
The `--production` flag triggers the production-level compilation and
|
||||
minification of all CSS and Javascript sources. When the command is ready,
|
||||
the final theme is located in the `material` directory. Add the `theme_dir`
|
||||
variable pointing to the aforementioned directory in your original
|
||||
`mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
theme_dir: 'mkdocs-material/material'
|
||||
```
|
||||
This triggers the production-level compilation and minification of all
|
||||
stylesheets and JavaScript sources. When the command is ready, the final
|
||||
theme is located in the `material` directory. Add the `theme_dir` variable
|
||||
pointing to the aforementioned directory in your original `mkdocs.yml`.
|
||||
|
||||
Now you can run `mkdocs build` and you should see your documentation with your
|
||||
changes to the original Material theme.
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[MkDocs documentation]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
|
||||
[quantum-colors]: https://github.com/nkpfstr/quantum-colors
|
||||
[material-colors]: http://www.materialui.co/colors
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[Admonition][1] is an extension included in the standard Markdown library that
|
||||
makes it possible to add block-styled side content to your documentation, for
|
||||
example summaries, hints, notes or warnings.
|
||||
example summaries, notes, hints or warnings.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/admonition.html
|
||||
|
||||
@@ -18,14 +18,14 @@ markdown_extensions:
|
||||
## Usage
|
||||
|
||||
Admonition blocks follow a simple syntax: every block is started with `!!!`,
|
||||
followed by a single keyword which is used as the [type qualifier](#types) of
|
||||
the block. The content of the block then follows on the next line, indented by
|
||||
followed by a single keyword which is used as the [type qualifier][2] of the
|
||||
block. The content of the block then follows on the next line, indented by
|
||||
four spaces.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! hint
|
||||
!!! note
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -33,20 +33,23 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
!!! hint
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
[2]: #types
|
||||
|
||||
### Changing the title
|
||||
|
||||
By default, the block title will equal the type qualifier. However, it can
|
||||
easily be changed by adding a quoted string after the type qualifier.
|
||||
By default, the block title will equal the type qualifier in titlecase. However,
|
||||
it can easily be changed by adding a quoted string after the type qualifier.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! hint "Phasellus posuere in sem ut cursus"
|
||||
!!! note "Phasellus posuere in sem ut cursus"
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -54,20 +57,21 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
!!! hint "Phasellus posuere in sem ut cursus"
|
||||
!!! note "Phasellus posuere in sem ut cursus"
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
### Removing the title
|
||||
|
||||
Similar to setting a [custom title](#changing-the-title), the icon and title
|
||||
can be omitted by providing an empty string after the type qualifier:
|
||||
Similar to setting a [custom title][3], the icon and title can be omitted by
|
||||
providing an empty string after the type qualifier:
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! hint ""
|
||||
!!! note ""
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -75,27 +79,31 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
!!! hint ""
|
||||
!!! note ""
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
[3]: #changing-the-title
|
||||
|
||||
### Embedded code blocks
|
||||
|
||||
Blocks can contain all kinds of text content, including headlines, lists,
|
||||
paragraphs and other blocks – except code blocks, because the parser from the
|
||||
standard Markdown library does not account for those.
|
||||
|
||||
However, the [PyMdown Extensions][2] package adds an extension called
|
||||
[SuperFences][3], which makes it possible to nest code blocks within other
|
||||
However, the [PyMdown Extensions][4] package adds an extension called
|
||||
[SuperFences][5], which makes it possible to nest code blocks within other
|
||||
blocks.
|
||||
|
||||
[2]: https://facelessuser.github.io/pymdown-extensions
|
||||
[3]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
[4]: https://facelessuser.github.io/pymdown-extensions
|
||||
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
|
||||
Example:
|
||||
|
||||
!!! hint
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -125,14 +133,16 @@ Example:
|
||||
Admonition supports user-defined type qualifiers which may influence the style
|
||||
of the inserted block. Following is a list of type qualifiers supported by the
|
||||
Material theme, whereas the default type, and thus fallback for unknown type
|
||||
qualifiers, is [hint](#hint).
|
||||
qualifiers, is [note][6].
|
||||
|
||||
### Hint
|
||||
[6]: #note
|
||||
|
||||
### Note
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! hint
|
||||
!!! note
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -140,15 +150,16 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
!!! hint
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `hint`
|
||||
* `note`
|
||||
* `seealso`
|
||||
|
||||
### Summary
|
||||
|
||||
@@ -164,6 +175,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! summary
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -187,6 +199,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! tip
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -194,7 +207,8 @@ Result:
|
||||
Qualifiers:
|
||||
|
||||
* `tip`
|
||||
* `idea`
|
||||
* `hint`
|
||||
* `important`
|
||||
|
||||
### Success
|
||||
|
||||
@@ -210,6 +224,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! success
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -234,6 +249,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! warning
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -241,8 +257,8 @@ Result:
|
||||
Qualifiers:
|
||||
|
||||
* `warning`
|
||||
* `caution`
|
||||
* `attention`
|
||||
* `important`
|
||||
|
||||
### Failure
|
||||
|
||||
@@ -258,6 +274,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! failure
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -282,6 +299,7 @@ Example:
|
||||
Result:
|
||||
|
||||
!!! danger
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -289,14 +307,14 @@ Result:
|
||||
Qualifiers:
|
||||
|
||||
* `danger`
|
||||
* `caution`
|
||||
* `error`
|
||||
|
||||
### Error
|
||||
### Bug
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! error
|
||||
!!! bug
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
@@ -304,12 +322,12 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
!!! error
|
||||
!!! bug
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `error`
|
||||
* `bug`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# CodeHilite
|
||||
|
||||
[CodeHilite][1] is an extension that adds syntax highlighting to codeblocks and
|
||||
is included in the standard Markdown library. The highlighting process is
|
||||
[CodeHilite][1] is an extension that adds syntax highlighting to code blocks
|
||||
and is included in the standard Markdown library. The highlighting process is
|
||||
executed during compilation of the Markdown file.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/code_hilite.html
|
||||
@@ -24,6 +24,14 @@ markdown_extensions:
|
||||
- codehilite
|
||||
```
|
||||
|
||||
!!! warning "Migrating from Material 0.2.x"
|
||||
|
||||
In 0.2.x the CodeHilite extension was included with
|
||||
`codehilite(css_class=code)` which switched the CSS class from
|
||||
`.codehilite` to `.code`. The current version of the theme doesn't require
|
||||
that and defines styles for the default `.codehilite` class, so the part
|
||||
`css_class=code` needs to be removed.
|
||||
|
||||
[2]: http://pygments.org
|
||||
[3]: http://pygments.org/languages
|
||||
|
||||
@@ -157,8 +165,8 @@ Result:
|
||||
|
||||
## Supported languages <small>excerpt</small>
|
||||
|
||||
CodeHilite uses [Pygments][], a generic syntax highlighter with support for
|
||||
over [300 languages][], so the following list of examples is just an excerpt.
|
||||
CodeHilite uses [Pygments][2], a generic syntax highlighter with support for
|
||||
over [300 languages][3], so the following list of examples is just an excerpt.
|
||||
|
||||
### Bash
|
||||
|
||||
@@ -613,7 +621,7 @@ module.exports = _extends(exports['default'], exports);
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "0.2.4",
|
||||
"description": "A material design theme for MkDocs",
|
||||
"description": "A Material Design theme for MkDocs",
|
||||
"homepage": "http://squidfunk.github.io/mkdocs-material/",
|
||||
"authors": [
|
||||
"squidfunk <martin.donath@squidfunk.com>"
|
||||
|
||||
@@ -39,7 +39,7 @@ Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
|
||||
|
||||
### Inserting the content
|
||||
|
||||
The footnote content is also initiated with a label, which must match the label
|
||||
The footnote content is also declared with a label, which must match the label
|
||||
used for the footnote reference. It can be inserted at an arbitrary position in
|
||||
the document and is always rendered at the bottom of the page. Furthermore, a
|
||||
backlink is automatically added to the footnote reference.
|
||||
@@ -58,7 +58,7 @@ Result:
|
||||
|
||||
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
|
||||
|
||||
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
|
||||
#### on multiple lines
|
||||
|
||||
@@ -76,9 +76,9 @@ Example:
|
||||
|
||||
Result:
|
||||
|
||||
[^2]:
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
[^2]:
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus
|
||||
auctor massa, nec semper lorem quam in massa.
|
||||
|
||||
<a href="#fn:2">Jump to footnote at the bottom of the page</a>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Metadata
|
||||
@@ -0,0 +1,284 @@
|
||||
# PyMdown Extensions
|
||||
|
||||
[PyMdown Extensions][1] is a collection of Markdown extensions that add some
|
||||
great features to the standard Markdown library. For this reason, the
|
||||
**installation of this package is highly recommended** as it's well-integrated
|
||||
with the Material theme.
|
||||
|
||||
[1]: http://facelessuser.github.io/pymdown-extensions/
|
||||
|
||||
## Installation
|
||||
|
||||
The PyMdown Extensions package can be installed with the following command:
|
||||
|
||||
``` sh
|
||||
pip install pymdown-extensions
|
||||
```
|
||||
|
||||
The following list of extensions that are part of the PyMdown Extensions
|
||||
package are recommended to be used together with the Material theme:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.arithmatex
|
||||
- pymdownx.betterem(smart_enable=all)
|
||||
- pymdownx.caret
|
||||
- pymdownx.critic
|
||||
- pymdownx.emoji:
|
||||
emoji_generator: !!python/name:pymdownx.emoji.to_svg
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.mark
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
- pymdownx.tilde
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### GitHub Flavored Markdown
|
||||
|
||||
Most of the extensions included in the PyMdown Extensions package try to bring
|
||||
the Markdown experience closer to GitHub Flavored Markdown (GFM).
|
||||
|
||||
The PyMdown Extensions package adds a shorthand to enable all of the included
|
||||
extensions that provide the GFM experience. However, usage of the shorthand is
|
||||
discouraged, because some extensions are not supported, as the Material theme
|
||||
uses some incompatible extensions included in the standard Markdown library.
|
||||
|
||||
#### BetterEm
|
||||
|
||||
[BetterEm][2] improves the handling of emphasis markup (**bold** and *italic*)
|
||||
within Markdown by providing a more sophisticated parser for better detecting
|
||||
start and end tokens. Read the documentation for [usage notes][3].
|
||||
|
||||
[2]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
|
||||
[3]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
|
||||
|
||||
#### Emoji
|
||||
|
||||
[Emoji][4] adds the ability to insert a :shit:-load of emojis that we use in
|
||||
our daily lives. See the [EmojiOne demo][5] for a list of all available
|
||||
emojis. Happy scrolling :tada:
|
||||
|
||||
!!! warning "Legal disclaimer"
|
||||
|
||||
Material has no affiliation with [EmojiOne][6] which is released under
|
||||
[CC BY 4.0][7]. When including EmojiOne images or CSS, please read the
|
||||
[EmojiOne license][8] to ensure proper usage and attribution.
|
||||
|
||||
[4]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
|
||||
[5]: http://emojione.com/demo/
|
||||
[6]: http://emojione.com
|
||||
[7]: https://creativecommons.org/licenses/by/4.0/legalcode
|
||||
[8]: http://emojione.com/licensing/
|
||||
|
||||
#### MagicLink
|
||||
|
||||
[MagicLink][9] detects links in Markdown and auto-generates the necessary
|
||||
markup, so no special syntax is required. It auto-links `http[s]://` and
|
||||
`ftp://` links, as well as references to email addresses:
|
||||
|
||||
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
|
||||
|
||||
#### SuperFences
|
||||
|
||||
[SuperFences][10] provides the ability to nest code blocks under blockquotes,
|
||||
lists and other block elements, which the [Fenced Code Blocks][11] extension
|
||||
from the standard Markdown library doesn't parse correctly.
|
||||
|
||||
[10]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
[11]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
|
||||
|
||||
#### Tasklist
|
||||
|
||||
[Tasklist][12] adds support for styled checkbox lists. This is useful for
|
||||
keeping track of tasks and showing what has been done and has yet to be done.
|
||||
Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or
|
||||
`[x]` for filled checkboxes.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
|
||||
[12]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
|
||||
|
||||
#### Tilde
|
||||
|
||||
[Tilde][13] provides an easy way to ~~strike through~~ cross out text.
|
||||
The portion of text that should be erased must be enclosed in two tildes
|
||||
`~~...~~` and the extension will take care of the rest.
|
||||
|
||||
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
|
||||
|
||||
### More syntactic sugar
|
||||
|
||||
#### Caret
|
||||
|
||||
[Caret][14] is the sister extension of [Tilde][15] and makes it possible to
|
||||
highlight ^^inserted text^^. The portion of text that should be marked as added
|
||||
must be enclosed in two carets `^^...^^`.
|
||||
|
||||
[14]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
|
||||
[15]: #tilde
|
||||
|
||||
#### Mark
|
||||
|
||||
[Mark][16] adds the ability to ==highlight text== like it was marked with a
|
||||
==yellow text marker==. The portion of text that should be highlighted must be
|
||||
enclosed in two equal signs `==...==`.
|
||||
|
||||
[16]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
|
||||
|
||||
#### SmartSymbols
|
||||
|
||||
[SmartSymbols][17] converts markup for special characters into their
|
||||
corresponding symbols, e.g. arrows (<--, -->, <-->), trademark and copyright
|
||||
symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
|
||||
|
||||
[17]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
|
||||
|
||||
#### Critic
|
||||
|
||||
[Critic][18] implements [Critic Markup][19], a Markdown extension that enables
|
||||
the tracking of changes (additions, deletions and comments) on documents.
|
||||
During compilation of the Markdown document, changes can be rendered (default),
|
||||
accepted or rejected.
|
||||
|
||||
Text can be {--deleted--} and replacement text {++added++}. This can also be
|
||||
combined into {~~one~>a single~~} operation. {==Highlighting==} is also
|
||||
possible {>>and comments can be added inline<<}.
|
||||
|
||||
{==
|
||||
|
||||
Formatting can also be applied to blocks, by putting the opening and closing
|
||||
tags on separate lines and adding new lines between the tags and the content.
|
||||
|
||||
==}
|
||||
|
||||
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/
|
||||
[19]: http://criticmarkup.com/
|
||||
|
||||
### Arithmatex <small>MathJax</small>
|
||||
|
||||
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||
|
||||
[Arithmatex][20] integrates Material with [MathJax][21] which parses
|
||||
block-style and inline equations written in TeX markup and outputs them in
|
||||
mathematical notation. See [this thread][22] for a short introduction and quick
|
||||
reference on how to write equations in TeX syntax.
|
||||
|
||||
Besides activating the extension in the `mkdocs.yml`, the MathJax JavaScript
|
||||
runtime needs to be included. This must be done with
|
||||
[additional JavaScript][23]:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'
|
||||
```
|
||||
|
||||
If you want to override the default MathJax configuration, you can do this by
|
||||
adding another JavaScript file **before** the MathJax runtime in
|
||||
`extra_javascript` which contains your MathJax configuration, e.g.:
|
||||
|
||||
``` js
|
||||
window.MathJax = {
|
||||
tex2jax: {
|
||||
inlineMath: [ ["\\(","\\)"] ],
|
||||
displayMath: [ ["\\[","\\]"] ]
|
||||
},
|
||||
TeX: {
|
||||
TagSide: "right",
|
||||
TagIndent: ".8em",
|
||||
MultLineWidth: "85%",
|
||||
equationNumbers: {
|
||||
autoNumber: "AMS",
|
||||
},
|
||||
unicode: {
|
||||
fonts: "STIXGeneral,'Arial Unicode MS'"
|
||||
}
|
||||
},
|
||||
displayAlign: "left",
|
||||
showProcessingMessages: false,
|
||||
messageStyle: "none"
|
||||
};
|
||||
```
|
||||
|
||||
In your `mkdocs.yml`, include it with:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'javascripts/extra.js'
|
||||
- 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'
|
||||
```
|
||||
|
||||
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
|
||||
[21]: https://www.mathjax.org/
|
||||
[22]: http://meta.math.stackexchange.com/questions/5020/
|
||||
[23]: ../customization.md#additional-javascript
|
||||
|
||||
#### Blocks
|
||||
|
||||
Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
|
||||
#### Inline
|
||||
|
||||
Inline equations need to be enclosed in `:::tex $...$`:
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
|
||||
### InlineHilite
|
||||
|
||||
[InlineHilite][24] adds support for inline code highlighting. It's useful for
|
||||
short snippets included within body copy, e.g. `#!js var test = 0;` and can be
|
||||
achived by prefixing inline code with a shebang and language identifier,
|
||||
e.g. `#!js`.
|
||||
|
||||
[24]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
|
||||
@@ -1,65 +0,0 @@
|
||||
# Arithmatex <small>MathJax</small>
|
||||
|
||||
[Arithmatex][1] integrates [MathJax][2] with Markdown and is included in the
|
||||
[PyMdown Extensions][3] package. It parses block-style and inline equations
|
||||
written in TeX markup and outputs them in mathematical notation.
|
||||
|
||||
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
|
||||
[2]: https://www.mathjax.org/
|
||||
[3]: https://facelessuser.github.io/pymdown-extensions
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure that the PyMdown Extensions package [is installed][4] and add the
|
||||
following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.arithmatex
|
||||
```
|
||||
|
||||
The MathJax runtime is automatically included if the extension is enabled, so
|
||||
there is no need for extra JavaScript.
|
||||
|
||||
[4]: /extensions/pymdown/overview/#installation
|
||||
|
||||
## Usage
|
||||
|
||||
MathJax searches for `:::tex $$...$$` (blocks) and `:::tex $...$` (inline)
|
||||
equations, parses their contents and renders them in mathematical notation.
|
||||
See [this thread][5] on StackExchange for a short introduction and quick
|
||||
reference on how to write equations in TeX syntax.
|
||||
|
||||
[5]: http://meta.math.stackexchange.com/questions/5020/
|
||||
|
||||
### Blocks
|
||||
|
||||
Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
|
||||
### Inline
|
||||
|
||||
Inline equations need to be enclosed in `:::tex $...$`:
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
@@ -1,24 +0,0 @@
|
||||
# Inlinehilite
|
||||
|
||||
The [Inlinehilite][1] extension included in the [PyMdown Extensions][2] package
|
||||
adds support for inline code highlighting. It's useful for short snippets
|
||||
included with body copy.
|
||||
|
||||
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
|
||||
[2]: https://facelessuser.github.io/pymdown-extensions
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure that the PyMdown Extensions package [is installed][] and add the
|
||||
following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.inlinehilite
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Syntax is similar to usual code highlighting, with the langauge shebang followed by one space. If you need to escape the highlight (like we're about to), add a space prior to the shebang.
|
||||
|
||||
For example, `#!js var test = 0;`, which was achieved using ` #!js var test = 0;`. Alternatively, you can use the triple colon, ` :::js var test = 0;` to produce the same result, `:::js var test = 0;`.
|
||||
@@ -1,92 +0,0 @@
|
||||
# PyMdown Extensions
|
||||
|
||||
[PyMdown Extensions][] is a collection of Markdown extensions that add some
|
||||
great features to the standard Markdown library. For this reason, the
|
||||
**installation of this package is highly recommended** as it's well-integrated
|
||||
with the Material theme.
|
||||
|
||||
## Installation
|
||||
|
||||
The PyMdown Extensions package can be installed with the following command:
|
||||
|
||||
``` sh
|
||||
pip install pymdown-extensions
|
||||
```
|
||||
|
||||
## Extensions
|
||||
|
||||
### GitHub Flavored Markdown
|
||||
|
||||
Most of the extensions included in the PyMdown Extensions package try to bring
|
||||
the Markdown experience closer to GitHub Flavored Markdown (GFM):
|
||||
|
||||
- [BetterEm][] improves the handling of emphasis markup (**bold** and *italic*)
|
||||
within Markdown by providing a more sophisticated parser for better detecting
|
||||
start and end tokens. Read the documentation for usage notes.
|
||||
|
||||
- [MagicLink][] detects links in Markdown and auto-generates the necessary
|
||||
markup, so no special syntax is required. It auto-links HTTP(S) and FTP
|
||||
links, as well as references to email addresses.
|
||||
|
||||
- [GitHub Emoji][] adds the ability to insert emojis, which does not only
|
||||
include the :octocat: emojis, but also a :shit:-load of emojis that we use in
|
||||
our daily lives. See the [Emoji Cheat Sheet][] for a list of all available
|
||||
emojis. Happy scrolling :tada:
|
||||
|
||||
- [SuperFences][] provides the ability to nest code blocks under blockquotes,
|
||||
lists and other block elements, which the [Fenced Code Blocks][] extension
|
||||
from the standard Markdown library doesn't parse correctly.
|
||||
|
||||
- [Tasklist][] adds support for styled checkbox lists. This is useful for
|
||||
keeping track of tasks and showing what has been done and has yet to be done.
|
||||
The usage of this extension is documented [here][].
|
||||
|
||||
- [Tilde][] provides an easy way to ~~strike through~~ cross out text.
|
||||
The portion of text that should be erased must be enclosed in two tildes
|
||||
`~~...~~`, and the extension will take care of the rest.
|
||||
|
||||
The PyMdown Extensions package adds a shorthand to enable all of the included
|
||||
extensions that provide the GFM experience. However, usage of the shorthand is
|
||||
discouraged, because some extensions are not supported, as the Material theme
|
||||
uses the counterparts included in the standard Markdown library.
|
||||
|
||||
To enable all extensions add the following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.betterem
|
||||
- pymdownx.githubemoji
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
- pymdownx.tilde
|
||||
```
|
||||
|
||||
### Syntactic Sugar
|
||||
|
||||
There are three other extensions that add further syntactic sugar:
|
||||
|
||||
- [Caret][] is the sister extension of [Tilde][] and makes it possible to
|
||||
highlight ^^inserted text^^. The portion of text that should be marked as
|
||||
added must be enclosed in two carets `^^...^^`, the extension will do the
|
||||
rest.
|
||||
|
||||
- [Mark][] add the ability to ==mark text==.
|
||||
- SmartSymbols
|
||||
|
||||
- Inlinehilite --- own documentation file
|
||||
- Critic --- own documentation file
|
||||
|
||||
[PyMdown Extensions]: http://facelessuser.github.io/pymdown-extensions/
|
||||
[usage notes]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
|
||||
[BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
|
||||
[MagicLink]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
|
||||
[GitHub Emoji]: https://facelessuser.github.io/pymdown-extensions/extensions/githubemoji/
|
||||
[Emoji Cheat Sheet]: http://www.webpagefx.com/tools/emoji-cheat-sheet/
|
||||
[SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
[Fenced Code Blocks]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
|
||||
[Tasklist]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
|
||||
[here]: /extensions/pymdown/tasklist
|
||||
[Tilde]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
|
||||
[Caret]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
|
||||
[Mark]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
|
||||
@@ -1,56 +0,0 @@
|
||||
# Tasklist
|
||||
|
||||
The [Tasklist][1] extension included in the [PyMdown Extensions][2] package
|
||||
adds support for styled checkbox lists. This is useful for keeping track of
|
||||
tasks and showing what has been done and has yet to be done.
|
||||
|
||||
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
|
||||
[2]: https://facelessuser.github.io/pymdown-extensions
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure that the PyMdown Extensions package [is installed][3] and add the
|
||||
following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
```
|
||||
|
||||
The `custom_checkbox` flag adds additional markup for better styling, so it is
|
||||
highly recommended to add this flag, as the Material theme supports it.
|
||||
|
||||
[3]: /extensions/pymdown/overview/#installation
|
||||
|
||||
## Usage
|
||||
|
||||
Checkbox lists are like regular lists, but prefixed with `[ ]` empty or `[x]`
|
||||
filled checkboxes.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
@@ -1,122 +1,142 @@
|
||||
Title: My Document
|
||||
Summary: A brief description of my document.
|
||||
Authors: Waylan Limberg
|
||||
John Doe
|
||||
Date: October 2, 2007
|
||||
blank-value:
|
||||
base_url: http://example.com
|
||||
|
||||
# Getting started
|
||||
|
||||
## Installation
|
||||
|
||||
!!! tip "Set up Material using Docker"
|
||||
|
||||
The official [Docker image][1] for Material comes with all dependencies
|
||||
pre-installed and ready-to-use with the latest version published on PyPI,
|
||||
packaged in a very small image (27MB compressed).
|
||||
|
||||
### Installing MkDocs
|
||||
|
||||
Before installing [MkDocs][], you need to make sure you have Python and `pip`
|
||||
– the Python package manager – up and running. Assuming you are a developer and
|
||||
have a basic understanding of how things work and what StackOverflow is, we
|
||||
won't provide guidelines on setting those up. You can verify if you're already
|
||||
Before installing [MkDocs][2], you need to make sure you have Python and `pip`
|
||||
– the Python package manager – up and running. You can verify if you're already
|
||||
good to go with the following commands:
|
||||
|
||||
``` sh
|
||||
python --version
|
||||
# Python 2.7.2
|
||||
# Python 2.7.13
|
||||
pip --version
|
||||
# pip 1.5.2
|
||||
# pip 9.0.1
|
||||
```
|
||||
|
||||
Installing and verifying MkDocs is as simple as:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs && mkdocs --version
|
||||
# mkdocs, version 0.15.2
|
||||
# mkdocs, version 0.16.0
|
||||
```
|
||||
|
||||
!!! warning "MkDocs version requirements"
|
||||
|
||||
Material requires MkDocs >= 0.16.
|
||||
|
||||
Furthermore, it is highly recommended to install [Pygments][3] and the
|
||||
[PyMdown Extensions][4] to get the most out of the Material theme:
|
||||
|
||||
```sh
|
||||
pip install pygments
|
||||
pip install pymdown-extensions
|
||||
```
|
||||
|
||||
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
|
||||
[2]: http://www.mkdocs.org
|
||||
[3]: http://pygments.org
|
||||
[4]: http://facelessuser.github.io/pymdown-extensions/
|
||||
|
||||
### Installing Material
|
||||
|
||||
Next, assuming you have MkDocs up and running `mkdocs-material` can be
|
||||
installed with `pip`:
|
||||
#### using pip
|
||||
|
||||
Material can be installed with `pip`:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs-material
|
||||
```
|
||||
|
||||
## Usage
|
||||
!!! warning "Installation on macOS"
|
||||
|
||||
If you haven't already done it, creating a new documentation project is really
|
||||
simple in MkDocs:
|
||||
When you're running the pre-installed version of Python on macOS, `pip`
|
||||
tries to install packages in a folder for which your user might not have
|
||||
the adequate permissions. There are two possible solutions to this:
|
||||
|
||||
``` sh
|
||||
mkdocs new my-project
|
||||
cd my-project
|
||||
1. **Installing in user space** (recommended): Provide the `--user` flag
|
||||
to the install command and `pip` will install the package in a user-site
|
||||
location. This is the recommended way.
|
||||
|
||||
2. **Switching to a homebrewed Python**: Upgrade your Python installation
|
||||
to a self-contained solution by installing Python with Homebrew. This
|
||||
should eliminate a lot of problems you may be having with `pip`.
|
||||
|
||||
#### using choco
|
||||
|
||||
If you're on Windows you can use [Chocolatey][5] to install [Material][6]:
|
||||
|
||||
``` dos
|
||||
choco install mkdocs-material
|
||||
```
|
||||
|
||||
MkDocs will create the necessary files and base directory structure inside the
|
||||
folder `my-project`. In order to enable the theme just add the following line
|
||||
to the auto-generated `mkdocs.yml`:
|
||||
This will also install all required dependencies like [Python][7] and
|
||||
[MkDocs][8].
|
||||
|
||||
[5]: https://chocolatey.org
|
||||
[6]: https://chocolatey.org/packages/mkdocs-material
|
||||
[7]: https://chocolatey.org/packages/python
|
||||
[8]: https://chocolatey.org/packages/mkdocs
|
||||
|
||||
#### cloning from GitHub
|
||||
|
||||
Material can also be used without a system-wide installation by cloning the
|
||||
repository into a subfolder of your project's root directory:
|
||||
|
||||
``` sh
|
||||
git clone https://github.com/squidfunk/mkdocs-material.git
|
||||
```
|
||||
|
||||
This is especially useful if you want to extend the theme and override some
|
||||
parts of the theme. The theme will reside in the folder
|
||||
`mkdocs-material/material`.
|
||||
|
||||
## Usage
|
||||
|
||||
In order to enable the Material theme just add one of the following lines to
|
||||
your `mkdocs.yml`. If you installed Material using pip:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
```
|
||||
|
||||
If your project is hosted on GitHub, add the repository link to the
|
||||
configuration. If the `repo_name` equals **GitHub**, the Material theme will
|
||||
add a download and star button, and display the number of stars:
|
||||
If you cloned Material from GitHub:
|
||||
|
||||
``` yaml
|
||||
repo_name: 'GitHub'
|
||||
repo_url: 'https://github.com/my-github-handle/my-project'
|
||||
theme_dir: 'mkdocs-material/material'
|
||||
```
|
||||
|
||||
MkDocs includes a development server, so you can view your changes as you go -
|
||||
very handy. Spin it up with the following command:
|
||||
MkDocs includes a development server, so you can view your changes as you go.
|
||||
The development server can be started with the following command:
|
||||
|
||||
``` sh
|
||||
mkdocs serve
|
||||
```
|
||||
|
||||
Now you can go to [localhost:8000](http://localhost:8000) and the Material
|
||||
theme should be visible. You can now start writing your documentation, or read
|
||||
on and customize the theme through some options.
|
||||
Now you can point your browser to [localhost:8000][9] and the Material theme
|
||||
should be visible. From here on, you can start writing your documentation, or
|
||||
read on and customize the theme through some options.
|
||||
|
||||
[9]: http://localhost:8000
|
||||
|
||||
## Options
|
||||
|
||||
The Material theme adds some extra variables for configuration via your
|
||||
project's `mkdocs.yml`. See the following section for all available options.
|
||||
|
||||
### Adding a version
|
||||
|
||||
In order to add the current version next to the project banner inside the
|
||||
drawer, you can set the variable `extra.version`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
version: '0.1.0'
|
||||
```
|
||||
|
||||
This will also change the link behind the download button to point to the
|
||||
archive with the respective version on GitHub, assuming a release tagged with
|
||||
this exact version identifier.
|
||||
|
||||
### Adding a logo
|
||||
|
||||
If your project has a logo, you can add it to the drawer/navigation by defining
|
||||
the variable `extra.logo`. Ideally, the image of your logo should have
|
||||
rectangular shape with a minimum resolution of 128x128 and leave some room
|
||||
towards the edges. The logo will also be used as a web application icon on iOS.
|
||||
Simply create the folder `docs/images`, add your image and reference it via:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
logo: 'images/logo.png'
|
||||
```
|
||||
|
||||
### Changing the color palette
|
||||
|
||||
Material defines a default hue for every primary and accent color on Google's
|
||||
material design [color palette][]. This makes it very easy to change the
|
||||
overall look of the theme. Just set the variables `extra.palette.primary` and
|
||||
`extra.palette.accent` to one of the colors defined in the palette:
|
||||
Material Design [color palette][10]. This makes it very easy to change the
|
||||
overall look of the theme. Just set the primary and accent colors using the
|
||||
following variables in your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
@@ -125,72 +145,154 @@ extra:
|
||||
accent: 'light blue'
|
||||
```
|
||||
|
||||
Color names can be written upper- or lowercase but must match the names of the
|
||||
material design [color palette][]. Valid values are: _red_, _pink_, _purple_,
|
||||
_deep purple_, _indigo_, _blue_, _light blue_, _cyan_, _teal_, _green_, _light
|
||||
green_, _lime_, _yellow_, _amber_, _orange_, _deep orange_, _brown_, _grey_ and
|
||||
_blue grey_. The last three colors can only be used as a primary color.
|
||||
Color names are case-insensitive, but must match the names of the Material
|
||||
Design color palette. Valid values are: `red`, `pink`, `purple`, `deep purple`,
|
||||
`indigo`, `blue`, `light blue`, `cyan`, `teal`, `green`, `light green`, `lime`,
|
||||
`yellow`, `amber`, `orange`, `deep orange`, `brown`, `grey` and `blue grey`.
|
||||
The last three colors can only be used as a primary color.
|
||||
|
||||
If the color is set via this configuration, an additional CSS file called
|
||||
`palettes.css` is included that defines the color palettes. If you want to
|
||||
keep things lean, clone the repository and recompile the theme with your
|
||||
custom colors set. See [this article](customization.md) for more information.
|
||||
If the color is set via this configuration, an additional CSS file that
|
||||
defines the color palette is included. If you want to keep things lean, clone
|
||||
the repository and recompile the theme with your custom colors set. See the
|
||||
guide on [customization][11] for more information.
|
||||
|
||||
[10]: http://www.materialui.co/colors
|
||||
[11]: customization.md
|
||||
|
||||
#### Primary colors
|
||||
|
||||
Click on a tile to change the primary color of the theme:
|
||||
|
||||
<button data-md-color-primary="red">Red</button>
|
||||
<button data-md-color-primary="pink">Pink</button>
|
||||
<button data-md-color-primary="purple">Purple</button>
|
||||
<button data-md-color-primary="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-primary="indigo">Indigo</button>
|
||||
<button data-md-color-primary="blue">Blue</button>
|
||||
<button data-md-color-primary="light-blue">Light Blue</button>
|
||||
<button data-md-color-primary="cyan">Cyan</button>
|
||||
<button data-md-color-primary="teal">Teal</button>
|
||||
<button data-md-color-primary="green">Green</button>
|
||||
<button data-md-color-primary="light-green">Light Green</button>
|
||||
<button data-md-color-primary="lime">Lime</button>
|
||||
<button data-md-color-primary="yellow">Yellow</button>
|
||||
<button data-md-color-primary="amber">Amber</button>
|
||||
<button data-md-color-primary="orange">Orange</button>
|
||||
<button data-md-color-primary="deep-orange">Deep Orange</button>
|
||||
<button data-md-color-primary="brown">Brown</button>
|
||||
<button data-md-color-primary="grey">Grey</button>
|
||||
<button data-md-color-primary="blue-grey">Blue Grey</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-primary]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
#### Accent colors
|
||||
|
||||
Click on a tile to change the accent color of the theme:
|
||||
|
||||
<button data-md-color-accent="red">Red</button>
|
||||
<button data-md-color-accent="pink">Pink</button>
|
||||
<button data-md-color-accent="purple">Purple</button>
|
||||
<button data-md-color-accent="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-accent="indigo">Indigo</button>
|
||||
<button data-md-color-accent="blue">Blue</button>
|
||||
<button data-md-color-accent="light-blue">Light Blue</button>
|
||||
<button data-md-color-accent="cyan">Cyan</button>
|
||||
<button data-md-color-accent="teal">Teal</button>
|
||||
<button data-md-color-accent="green">Green</button>
|
||||
<button data-md-color-accent="light-green">Light Green</button>
|
||||
<button data-md-color-accent="lime">Lime</button>
|
||||
<button data-md-color-accent="yellow">Yellow</button>
|
||||
<button data-md-color-accent="amber">Amber</button>
|
||||
<button data-md-color-accent="orange">Orange</button>
|
||||
<button data-md-color-accent="deep-orange">Deep Orange</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-accent]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
### Changing the font family
|
||||
|
||||
Material uses the [Ubuntu font family][] by default, specifically the regular
|
||||
sans-serif type for text and the monospaced type for code. Both fonts are
|
||||
loaded from [Google Fonts][] and can be easily changed to other fonts, like for
|
||||
example Google's own [Roboto font][]:
|
||||
Material uses the [Roboto font family][12] by default, specifically the regular
|
||||
sans-serif type for text and the `monospaced` type for code. Both fonts are
|
||||
loaded from [Google Fonts][13] and can easily be changed to other fonts, like
|
||||
for example the [Ubuntu font family][14]:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
font:
|
||||
text: 'Roboto'
|
||||
code: 'Roboto Mono'
|
||||
text: 'Ubuntu'
|
||||
code: 'Ubuntu Mono'
|
||||
```
|
||||
|
||||
The text font will be loaded in font-weights 400 and **700**, the monospaced
|
||||
The text font will be loaded in font-weights 400 and **700**, the `monospaced`
|
||||
font in regular weight. If you want to load fonts from other destinations or
|
||||
don't want to use the Google Fonts loading magic, just set `extra.font` to
|
||||
`'none'`:
|
||||
don't want to use the Google Fonts loading magic, just set `font` to `'none'`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
font: 'none'
|
||||
```
|
||||
|
||||
### Localization
|
||||
[12]: https://fonts.google.com/specimen/Roboto
|
||||
[13]: https://fonts.google.com/
|
||||
[14]: https://fonts.google.com/specimen/Ubuntu
|
||||
|
||||
The **Previous** and **Next** labels in the footer can easily be changed by
|
||||
defining the variables `extra.i18n.prev` and `extra.i18n.next`:
|
||||
### Adding a logo
|
||||
|
||||
Material makes it easy to add your logo. Your logo should have rectangular
|
||||
shape with a minimum resolution of 128x128, leave some room towards the edges
|
||||
and be composed of high contrast areas on a transparent ground, as it will be
|
||||
placed on the colored header bar and drawer. Simply create the folder
|
||||
`docs/images`, add your logo and embed it with:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
i18n:
|
||||
prev: 'Previous'
|
||||
next: 'Next'
|
||||
logo: 'images/logo.svg'
|
||||
```
|
||||
|
||||
### Adding a GitHub and Twitter account
|
||||
### Adding social links
|
||||
|
||||
If you have a GitHub and/or Twitter account, you can add links to your
|
||||
accounts to the drawer by setting the variables `extra.author.github` and
|
||||
`extra.author.twitter` respectively:
|
||||
If you want to link your social accounts, the Material theme provides an easy
|
||||
way for doing this in the footer of the documentation using the automatically
|
||||
included [FontAwesome][15] webfont. The syntax is simple – the `type` must
|
||||
denote the name of the social service, e.g. `github`, `twitter` or `linkedin`
|
||||
and the `link` must contain the URL you want to link to:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
author:
|
||||
github: 'my-github-handle'
|
||||
twitter: 'my-twitter-handle'
|
||||
social:
|
||||
- type: 'github'
|
||||
link: 'https://github.com/squidfunk'
|
||||
- type: 'twitter'
|
||||
link: 'https://twitter.com/squidfunk'
|
||||
- type: 'linkedin'
|
||||
link: 'https://de.linkedin.com/in/martin-donath-20a95039'
|
||||
```
|
||||
|
||||
The links are generated in order and the `type` of the links must match the
|
||||
name of the FontAwesome glyph. The `fa` is automatically added, so `github`
|
||||
will result in `fa fa-github`.
|
||||
|
||||
[15]: http://fontawesome.io/icons/
|
||||
|
||||
### Google Analytics integration
|
||||
|
||||
Material makes it easy to integrate site tracking with Google Analytics.
|
||||
Besides basic tracking, clicks on all outgoing links can be tracked, clicks on
|
||||
the download and star button, as well as how site search is used. Tracking can
|
||||
be activated in your project's `mkdocs.yml`:
|
||||
MkDocs makes it easy to integrate site tracking with Google Analytics.
|
||||
Besides basic tracking, clicks on all outgoing links can be tracked as well as
|
||||
how site search is used. Tracking can be activated in your project's
|
||||
`mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
google_analytics:
|
||||
@@ -198,85 +300,69 @@ google_analytics:
|
||||
- 'auto'
|
||||
```
|
||||
|
||||
### Localization <small>L10N</small>
|
||||
|
||||
In order to localize the labels (e.g. *Previous* and *Next* in the footer),
|
||||
you can override the file `partials/language.html` to provide your own
|
||||
translations inside the macro `t`:
|
||||
|
||||
``` jinja
|
||||
{% macro t(key) %}{{ {
|
||||
"edit.link.title": "Edit this page",
|
||||
"footer.previous": "Previous",
|
||||
"footer.next": "Next",
|
||||
"search.placeholder": "Search",
|
||||
"source.link.title": "Go to repository",
|
||||
"toc.title": "Table of contents"
|
||||
}[key] }}{% endmacro %}
|
||||
```
|
||||
|
||||
Just copy the file from the original theme and make your adjustments. See the
|
||||
section on [overriding partials][16] in the customization guide.
|
||||
|
||||
!!! warning "Migrating from Material 0.2.x"
|
||||
|
||||
In 0.2.x localization was done within the `extra` configuration of your
|
||||
`mkdocs.yml`. With 1.0.0 this is no longer possible as the configuration
|
||||
will be ignored.
|
||||
|
||||
[16]: customization.md#overriding-partials
|
||||
|
||||
### More advanced customization
|
||||
|
||||
If you want to change the general appearance of the Material theme, see
|
||||
[this article](customization.md) for more information on advanced customization.
|
||||
[this article][17] for more information on advanced customization.
|
||||
|
||||
[17]: customization.md
|
||||
|
||||
## Extensions
|
||||
|
||||
MkDocs supports several [Markdown extensions][]. The following extensions are
|
||||
not enabled by default (see the link for which are enabled by default), so you
|
||||
have to switch them on explicitly.
|
||||
|
||||
### CodeHilite <small>recommended</small>
|
||||
|
||||
This extensions adds code highlighting to fenced code blocks. It might not be
|
||||
the best code highlighter, but it works without JavaScript and on the server:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- codehilite
|
||||
```
|
||||
|
||||
If you want more extensive highlighting, you can use a JavaScript library like
|
||||
[highlight.js][], which is not included in Material. See [this link][extra] for
|
||||
further instructions
|
||||
|
||||
### Permalinks <small>recommended</small>
|
||||
|
||||
In order to add [permalinks][] to the headers of your article, set the
|
||||
`markdown_extensions.toc.permalink` variable to a symbol, e.g. `¶`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: '¶'
|
||||
```
|
||||
|
||||
The symbol can be chosen freely, it can even be a WebFont icon.
|
||||
|
||||
### Admonition
|
||||
|
||||
[Admonition][] is a handy extension that adds block-styled side content to your
|
||||
documentation, for example hints, notes or warnings. It can be enabled by
|
||||
setting the variable `markdown_extensions.admonition`:
|
||||
MkDocs supports several [Markdown extensions][18]. The following extensions
|
||||
are not enabled by default (see the link for which are enabled by default)
|
||||
but highly recommended, so they should be switched on at all times:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite(guess_lang=false)
|
||||
- toc(permalink=true)
|
||||
```
|
||||
|
||||
In order to add a note, use the following syntax inside your article:
|
||||
For more information, see the following list of extensions supported by the
|
||||
Material theme including more information regarding installation and usage:
|
||||
|
||||
``` markdown
|
||||
!!! note
|
||||
Nothing to see here, move along.
|
||||
```
|
||||
* [Admonition][19]
|
||||
* [Codehilite][20]
|
||||
* [Permalinks][21]
|
||||
* [Footnotes][22]
|
||||
* [PyMdown Extensions][23]
|
||||
|
||||
This will print the following block:
|
||||
|
||||
!!! note
|
||||
Nothing to see here, move along.
|
||||
|
||||
The Material template adds a neutral color for the `note` class and a red color
|
||||
for the `warning` class. You can also add a custom title:
|
||||
|
||||
``` markdown
|
||||
!!! warning
|
||||
MkDocs supports several [Markdown extensions][]. The following extensions are
|
||||
not enabled by default (see the link for which are enabled by default), so you
|
||||
have to switch them on explicitly.
|
||||
```
|
||||
|
||||
This will print:
|
||||
|
||||
!!! warning
|
||||
MkDocs supports several [Markdown extensions][]. The following extensions are
|
||||
not enabled by default (see the link for which are enabled by default), so you
|
||||
have to switch them on explicitly.
|
||||
|
||||
More colors can be freely defined.
|
||||
[18]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
||||
[19]: extensions/admonition.md
|
||||
[20]: extensions/codehilite.md
|
||||
[21]: extensions/permalinks.md
|
||||
[22]: extensions/footnotes.md
|
||||
[23]: extensions/pymdown.md
|
||||
|
||||
## Full example
|
||||
|
||||
@@ -294,28 +380,27 @@ repo_name: 'GitHub'
|
||||
repo_url: 'https://github.com/my-github-handle/my-project'
|
||||
|
||||
# Copyright
|
||||
copyright: 'Copyright (c) 2016 John Doe'
|
||||
copyright: 'Copyright © 2016 John Doe'
|
||||
|
||||
# Documentation and theme
|
||||
docs_dir: 'docs'
|
||||
theme: 'material'
|
||||
|
||||
# Options
|
||||
extra:
|
||||
version: '0.1.0'
|
||||
logo: 'images/logo.png'
|
||||
logo: 'images/logo.svg'
|
||||
palette:
|
||||
primary: 'indigo'
|
||||
accent: 'light blue'
|
||||
accent: 'indigo'
|
||||
font:
|
||||
text: 'Roboto'
|
||||
code: 'Roboto Mono'
|
||||
i18n:
|
||||
prev: 'Previous'
|
||||
next: 'Next'
|
||||
author:
|
||||
github: 'my-github-handle'
|
||||
twitter: 'my-twitter-handle'
|
||||
social:
|
||||
- type: 'github'
|
||||
link: 'https://github.com/squidfunk'
|
||||
- type: 'twitter'
|
||||
link: 'https://twitter.com/squidfunk'
|
||||
- type: 'linkedin'
|
||||
link: 'https://de.linkedin.com/in/martin-donath-20a95039'
|
||||
|
||||
# Google Analytics
|
||||
google_analytics:
|
||||
@@ -324,19 +409,9 @@ google_analytics:
|
||||
|
||||
# Extensions
|
||||
markdown_extensions:
|
||||
- codehilite(css_class=code)
|
||||
- admonition
|
||||
- toc:
|
||||
permalink: '¶'
|
||||
- codehilite(guess_lang=false)
|
||||
- footnotes
|
||||
- meta
|
||||
- toc(permalink=true)
|
||||
```
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[color palette]: http://www.materialui.co/colors
|
||||
[Ubuntu font family]: http://font.ubuntu.com
|
||||
[Google Fonts]: https://www.google.com/fonts
|
||||
[Roboto font]: https://www.google.com/fonts/specimen/Roboto
|
||||
[Markdown extensions]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
||||
[highlight.js]: https://highlightjs.org
|
||||
[extra]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
|
||||
[permalinks]: https://en.wikipedia.org/wiki/Permalink
|
||||
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
|
||||
|
||||
|
After Width: | Height: | Size: 757 KiB |
@@ -1,20 +1,19 @@
|
||||
# Material <small>for MkDocs</small>
|
||||
|
||||
## Beautiful documentation
|
||||
## Beautiful project documentation
|
||||
|
||||
Material is a theme for [MkDocs][], an excellent static site generator geared
|
||||
towards project documentation. It is built using Google's [material design][]
|
||||
guidelines, full responsive, optimized for touch and pointer devices as well
|
||||
as all sorts of screen sizes.
|
||||
Material is a theme for [MkDocs][1], an excellent static site generator geared
|
||||
towards project documentation. It is built using Google's [Material Design][2]
|
||||
guidelines.
|
||||
|
||||
Material is very lightweight – it is built from scratch using Javascript and
|
||||
CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts
|
||||
and Analytics). Yet, it is highly customizable and degrades gracefully in older
|
||||
browsers.
|
||||
[](images/material.png)
|
||||
|
||||
[1]: http://www.mkdocs.org
|
||||
[2]: https://www.google.com/design/spec/material-design
|
||||
|
||||
## Quick start
|
||||
|
||||
Install with `pip`:
|
||||
Install the latest version of Material with `pip`:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs-material
|
||||
@@ -26,39 +25,6 @@ Add the following line to your `mkdocs.yml`:
|
||||
theme: 'material'
|
||||
```
|
||||
|
||||
## Features
|
||||
For detailed instructions see the [getting started guide][3].
|
||||
|
||||
- Beautiful, readable and very user-friendly design based on Google's material
|
||||
design guidelines, packed in a full responsive template with a well-defined
|
||||
and [easily customizable color palette][], great typography, as well as a
|
||||
beautiful search interface and footer.
|
||||
|
||||
- Well-tested and optimized Javascript and CSS including a cross-browser
|
||||
fixed/sticky header, a drawer that even works without Javascript using
|
||||
the [checkbox hack][] with fallbacks, responsive tables that scroll when
|
||||
the screen is too small and well-defined print styles.
|
||||
|
||||
- Extra configuration options like a [project logo][], links to the authors
|
||||
[GitHub and Twitter accounts][], display of the amount of stars the
|
||||
project has on GitHub and [Google Analytics integration][].
|
||||
|
||||
- Easily [extendable and customizable][] due to a well-designed asset pipeline
|
||||
built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted
|
||||
style definitions built with [SASS][].
|
||||
|
||||
- Web application capability on iOS – when the page is saved to the homescreen,
|
||||
it behaves and looks like a native application.
|
||||
|
||||
See the [getting started guide](getting-started.md) for instructions how to get
|
||||
it up and running.
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[material design]: https://www.google.com/design/spec/material-design
|
||||
[checkbox hack]: http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/
|
||||
[project logo]: getting-started.md#adding-a-logo
|
||||
[easily customizable color palette]: getting-started.md#changing-the-color-palette
|
||||
[GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account
|
||||
[Google Analytics integration]: getting-started.md#google-analytics-integration
|
||||
[extendable and customizable]: customization.md
|
||||
[Gulp]: http://gulpjs.com
|
||||
[SASS]: http://sass-lang.com
|
||||
[3]: getting-started.md
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**MIT License**
|
||||
|
||||
Copyright (c) 2016 Martin Donath
|
||||
Copyright © 2016 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
|
||||
@@ -20,4 +20,4 @@ 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.
|
||||
IN THE SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
# Release Notes
|
||||
|
||||
## Upgrading
|
||||
|
||||
To upgrade Material to the latest version, use pip:
|
||||
|
||||
``` sh
|
||||
pip install --upgrade mkdocs-material
|
||||
```
|
||||
|
||||
To determine the currently installed version, use the following command:
|
||||
|
||||
``` sh
|
||||
pip show mkdocs-material | grep -E ^Version
|
||||
# Version 1.0.0
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.0.2 <small> _ January 15, 2017</small>
|
||||
|
||||
* Fixed horizontal scrollbar in content area
|
||||
|
||||
### 1.0.1 <small> _ January 14, 2017</small>
|
||||
|
||||
* Fixed massive repaints happening when scrolling
|
||||
* Fixed footer back reference positions in case of overflow
|
||||
* Fixed header logo from showing when the menu icon is rendered
|
||||
* Changed scrollbar behavior to only show when content overflows
|
||||
|
||||
### 1.0.0 <small> _ January 13, 2017</small>
|
||||
|
||||
* Introduced Webpack for more sophisticated JavaScript bundling
|
||||
* Introduced ESLint and Stylelint for code style checks
|
||||
* Introduced more accurate Material Design colors and shadows
|
||||
* Introduced modular scales for harmonic font sizing
|
||||
* Introduced git-hooks for better development workflow
|
||||
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
|
||||
* Rewrite of JavaScript using ES6 and Babel as a transpiler
|
||||
* Rewrite of Admonition, Permalinks and CodeHilite integration
|
||||
* Rewrite of the complete typographical system
|
||||
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
|
||||
* Removed Bower as a dependency in favor of NPM
|
||||
* Removed custom icon build in favor of the Material Design iconset
|
||||
* Removed `_blank` targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
|
||||
* Removed unversioned assets from build directory
|
||||
* Restructured templates into base templates and partials
|
||||
* Added build and watch scripts in `package.json`
|
||||
* Added support for Metadata and Footnotes Markdown extensions
|
||||
* Added support for PyMdown Extensions package
|
||||
* Added support for collapsible sections in navigation
|
||||
* Added support for separate table of contents
|
||||
* Added support for better accessibility through REM-based layout
|
||||
* Added icons for GitHub, GitLab and BitBucket integrations
|
||||
* Added more detailed documentation on specimen, extensions etc.
|
||||
* Added a `404.html` error page for deployment on GitHub Pages
|
||||
* Fixed live reload chain in watch mode when saving a template
|
||||
* Fixed variable references to work with MkDocs 0.16
|
||||
|
||||
### 0.2.4 <small> _ June 26, 2016</small>
|
||||
|
||||
* Fixed improperly set default favicon
|
||||
* Fixed [#33][33]: Protocol relative URL for webfonts doesn't work with
|
||||
`file://`
|
||||
* Fixed [#34][34]: IE11 on Windows 7 doesn't honor `max-width` on `main` tag
|
||||
* Fixed [#35][35]: Add styling for blockquotes
|
||||
|
||||
[33]: https://github.com/squidfunk/mkdocs-material/issues/25
|
||||
[34]: https://github.com/squidfunk/mkdocs-material/issues/26
|
||||
[35]: https://github.com/squidfunk/mkdocs-material/issues/30
|
||||
|
||||
### 0.2.3 <small> _ May 16, 2016</small>
|
||||
|
||||
* Fixed [#25][25]: Highlight inline fenced blocks
|
||||
* Fixed [#26][26]: Better highlighting for keystrokes
|
||||
* Fixed [#30][30]: Suboptimal syntax highlighting for PHP
|
||||
|
||||
[25]: https://github.com/squidfunk/mkdocs-material/issues/25
|
||||
[26]: https://github.com/squidfunk/mkdocs-material/issues/26
|
||||
[30]: https://github.com/squidfunk/mkdocs-material/issues/30
|
||||
|
||||
### 0.2.2 <small> _ March 20, 2016</small>
|
||||
|
||||
* Fixed [#15][15]: Document Pygments dependency for CodeHilite
|
||||
* Fixed [#16][16]: Favicon could not be set through `mkdocs.yml`
|
||||
* Fixed [#17][17]: Put version into own container for styling
|
||||
* Fixed [#20][20]: Fix rounded borders for tables
|
||||
|
||||
[15]: https://github.com/squidfunk/mkdocs-material/issues/15
|
||||
[16]: https://github.com/squidfunk/mkdocs-material/issues/16
|
||||
[17]: https://github.com/squidfunk/mkdocs-material/issues/17
|
||||
[20]: https://github.com/squidfunk/mkdocs-material/issues/20
|
||||
|
||||
### 0.2.1 <small> _ March 12, 2016</small>
|
||||
|
||||
* Fixed [#10][10]: Invisible header after closing search bar with
|
||||
<kbd>ESC</kbd> key
|
||||
* Fixed [#13][13]: Table cells don't wrap
|
||||
* Fixed empty list in table of contents when no headline is defined
|
||||
* Corrected wrong path for static asset monitoring in Gulpfile.js
|
||||
* Set up tracking of site search for Google Analytics
|
||||
|
||||
[10]: https://github.com/squidfunk/mkdocs-material/issues/10
|
||||
[13]: https://github.com/squidfunk/mkdocs-material/issues/13
|
||||
|
||||
### 0.2.0 <small> _ February 24, 2016</small>
|
||||
|
||||
* Fixed [#6][6]: Include multiple color palettes via `mkdocs.yml`
|
||||
* Fixed [#7][7]: Better colors for links inside admonition notes and warnings
|
||||
* Fixed [#9][9]: Text for prev/next footer navigation should be customizable
|
||||
* Refactored templates (replaced `if`/`else` with modifiers where possible)
|
||||
|
||||
[6]: https://github.com/squidfunk/mkdocs-material/issues/6
|
||||
[7]: https://github.com/squidfunk/mkdocs-material/issues/7
|
||||
[9]: https://github.com/squidfunk/mkdocs-material/issues/9
|
||||
|
||||
### 0.1.3 <small> _ February 21, 2016</small>
|
||||
|
||||
* Fixed [#3][3]: Ordered lists within an unordered list have `::before` content
|
||||
* Fixed [#4][4]: Click on Logo/Title without Github-Repository: `"None"`
|
||||
* Fixed [#5][5]: Page without headlines renders empty list in table of contents
|
||||
* Moved Modernizr to top to ensure basic usability in IE8
|
||||
|
||||
[3]: https://github.com/squidfunk/mkdocs-material/issues/3
|
||||
[4]: https://github.com/squidfunk/mkdocs-material/issues/4
|
||||
[5]: https://github.com/squidfunk/mkdocs-material/issues/5
|
||||
|
||||
### 0.1.2 <small> _ February 16, 2016</small>
|
||||
|
||||
* Fixed styles for deep navigational hierarchies
|
||||
* Fixed webfont delivery problem when hosted in subdirectories
|
||||
* Fixed print styles in mobile/tablet configuration
|
||||
* Added option to configure fonts in `mkdocs.yml` with fallbacks
|
||||
* Changed styles for admonition notes and warnings
|
||||
* Set download link to latest version if available
|
||||
* Set up tracking of outgoing links and actions for Google Analytics
|
||||
|
||||
### 0.1.1 <small> _ February 11, 2016</small>
|
||||
|
||||
* Fixed [#1][1]: GitHub stars don't work if the repo_url ends with a `/`
|
||||
* Updated NPM and Bower dependencies to most recent versions
|
||||
* Changed footer/copyright link to Material theme to GitHub pages
|
||||
* Made MkDocs building/serving in build process optional
|
||||
* Set up continuous integration with [Travis][2]
|
||||
|
||||
[1]: https://github.com/squidfunk/mkdocs-material/issues/1
|
||||
[2]: https://travis-ci.org
|
||||
|
||||
### 0.1.0 <small> _ February 9, 2016</small>
|
||||
|
||||
* Initial release
|
||||
@@ -1,8 +1,6 @@
|
||||
# Specimen
|
||||
|
||||
## Typography
|
||||
|
||||
### Body copy
|
||||
## Body copy
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras arcu libero,
|
||||
mollis sed massa vel, *ornare viverra ex*. Mauris a ullamcorper lacus. Nullam
|
||||
@@ -16,7 +14,9 @@ eros. [Nulla aliquam](/) orci sit amet nisl posuere malesuada. Proin aliquet
|
||||
nulla velit, quis ultricies orci feugiat et. `Ut tincidunt sollicitudin`
|
||||
tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
|
||||
### Headings
|
||||
## Headings
|
||||
|
||||
### The 3rd level
|
||||
|
||||
#### The 4th level
|
||||
|
||||
@@ -24,7 +24,9 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
|
||||
###### The 6th level
|
||||
|
||||
### Headings <small>with secondary text</small>
|
||||
## Headings <small>with secondary text</small>
|
||||
|
||||
### The 3rd level <small>with secondary text</small>
|
||||
|
||||
#### The 4th level <small>with secondary text</small>
|
||||
|
||||
@@ -32,7 +34,7 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
|
||||
###### The 6th level <small>with secondary text</small>
|
||||
|
||||
### Blockquotes
|
||||
## Blockquotes
|
||||
|
||||
> Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet rutrum.
|
||||
Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Nam vehicula nunc
|
||||
@@ -40,7 +42,7 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie
|
||||
imperdiet consectetur.
|
||||
|
||||
#### Blockquote nesting
|
||||
### Blockquote nesting
|
||||
|
||||
> **Sed aliquet**, neque at rutrum mollis, neque nisi tincidunt nibh, vitae
|
||||
faucibus lacus nunc at lacus. Nunc scelerisque, quam id cursus sodales, lorem
|
||||
@@ -55,7 +57,7 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed nec leo
|
||||
bibendum, sodales mauris ut, tincidunt massa.
|
||||
|
||||
#### Other content blocks
|
||||
### Other content blocks
|
||||
|
||||
> Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
|
||||
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
|
||||
@@ -76,9 +78,9 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
vel lacinia lacus. Suspendisse rhoncus nunc non nisi iaculis ultrices.
|
||||
Donec consectetur mauris non neque imperdiet, eget volutpat libero.
|
||||
|
||||
### Lists
|
||||
## Lists
|
||||
|
||||
#### Unordered lists
|
||||
### Unordered lists
|
||||
|
||||
* Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
|
||||
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
|
||||
@@ -96,7 +98,7 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh
|
||||
lacinia sed. Aenean in finibus diam.
|
||||
|
||||
#### Ordered lists
|
||||
### Ordered lists
|
||||
|
||||
1. Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
|
||||
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
|
||||
@@ -135,9 +137,9 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis
|
||||
nulla. Vivamus a pharetra leo.
|
||||
|
||||
### Code blocks
|
||||
## Code blocks
|
||||
|
||||
#### Inline
|
||||
### Inline
|
||||
|
||||
Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
|
||||
rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
|
||||
@@ -148,7 +150,7 @@ Nam vehicula nunc `:::js return target` mauris, a ultricies libero efficitur
|
||||
sed. Sed molestie imperdiet consectetur. Vivamus a pharetra leo. Pellentesque
|
||||
eget ornare tellus, ut gravida mi. Fusce vel lacinia lacus.
|
||||
|
||||
#### Listing
|
||||
### Listing
|
||||
|
||||
#!js hl_lines="8"
|
||||
var _extends = function(target) {
|
||||
@@ -161,7 +163,7 @@ eget ornare tellus, ut gravida mi. Fusce vel lacinia lacus.
|
||||
return target;
|
||||
};
|
||||
|
||||
### Horizontal rules
|
||||
## Horizontal rules
|
||||
|
||||
Aenean in finibus diam. Duis mollis est eget nibh volutpat, fermentum aliquet
|
||||
dui mollis. Nam vulputate tincidunt fringilla. Nullam dignissim ultrices urna
|
||||
@@ -173,7 +175,7 @@ Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
|
||||
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
|
||||
consectetur feugiat sodales.
|
||||
|
||||
### Data tables
|
||||
## Data tables
|
||||
|
||||
| Sollicitudo / Pellentesi | consectetur | adipiscing | elit | arcu | sed |
|
||||
| ------------------------ | ----------- | ---------- | ------- | ---- | --- |
|
||||
@@ -224,71 +226,3 @@ sit amet laoreet nibh.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Colors
|
||||
|
||||
### Primary colors
|
||||
|
||||
Click on a tile to change the primary color of the theme:
|
||||
|
||||
<button data-md-color-primary="red">Red</button>
|
||||
<button data-md-color-primary="pink">Pink</button>
|
||||
<button data-md-color-primary="purple">Purple</button>
|
||||
<button data-md-color-primary="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-primary="indigo">Indigo</button>
|
||||
<button data-md-color-primary="blue">Blue</button>
|
||||
<button data-md-color-primary="light-blue">Light Blue</button>
|
||||
<button data-md-color-primary="cyan">Cyan</button>
|
||||
<button data-md-color-primary="teal">Teal</button>
|
||||
<button data-md-color-primary="green">Green</button>
|
||||
<button data-md-color-primary="light-green">Light Green</button>
|
||||
<button data-md-color-primary="lime">Lime</button>
|
||||
<button data-md-color-primary="yellow">Yellow</button>
|
||||
<button data-md-color-primary="amber">Amber</button>
|
||||
<button data-md-color-primary="orange">Orange</button>
|
||||
<button data-md-color-primary="deep-orange">Deep Orange</button>
|
||||
<button data-md-color-primary="brown">Brown</button>
|
||||
<button data-md-color-primary="grey">Grey</button>
|
||||
<button data-md-color-primary="blue-grey">Blue Grey</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-primary]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
### Accent colors
|
||||
|
||||
Click on a tile to change the accent color of the theme:
|
||||
|
||||
<button data-md-color-accent="red">Red</button>
|
||||
<button data-md-color-accent="pink">Pink</button>
|
||||
<button data-md-color-accent="purple">Purple</button>
|
||||
<button data-md-color-accent="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-accent="indigo">Indigo</button>
|
||||
<button data-md-color-accent="blue">Blue</button>
|
||||
<button data-md-color-accent="light-blue">Light Blue</button>
|
||||
<button data-md-color-accent="cyan">Cyan</button>
|
||||
<button data-md-color-accent="teal">Teal</button>
|
||||
<button data-md-color-accent="green">Green</button>
|
||||
<button data-md-color-accent="light-green">Light Green</button>
|
||||
<button data-md-color-accent="lime">Lime</button>
|
||||
<button data-md-color-accent="yellow">Yellow</button>
|
||||
<button data-md-color-accent="amber">Amber</button>
|
||||
<button data-md-color-accent="orange">Orange</button>
|
||||
<button data-md-color-accent="deep-orange">Deep Orange</button>
|
||||
<button data-md-color-accent="brown">Brown</button>
|
||||
<button data-md-color-accent="grey">Grey</button>
|
||||
<button data-md-color-accent="blue-grey">Blue Grey</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-accent]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -39,12 +39,13 @@ export default /* JSX */ {
|
||||
|
||||
/* Set all properties */
|
||||
if (properties)
|
||||
for (const attr of Object.keys(properties))
|
||||
Array.prototype.forEach.call(Object.keys(properties), attr => {
|
||||
el.setAttribute(attr, properties[attr])
|
||||
})
|
||||
|
||||
/* Iterate child nodes */
|
||||
const iterateChildNodes = nodes => {
|
||||
for (const node of nodes) {
|
||||
Array.prototype.forEach.call(nodes, node => {
|
||||
|
||||
/* Directly append text content */
|
||||
if (typeof node === "string" ||
|
||||
@@ -59,7 +60,7 @@ export default /* JSX */ {
|
||||
} else {
|
||||
el.appendChild(node)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* Iterate child nodes and return element */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -34,7 +34,12 @@ export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/images/**/*.svg`)
|
||||
.pipe(changed(`${config.assets.build}/images`))
|
||||
.pipe(gulpif(args.optimize, minsvg()))
|
||||
.pipe(gulpif(args.optimize,
|
||||
minsvg({
|
||||
plugins: [
|
||||
{ cleanupIDs: false }
|
||||
]
|
||||
})))
|
||||
.pipe(gulpif(args.revision, rev()))
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -39,7 +39,13 @@ export default (gulp, config, args) => {
|
||||
.pipe(
|
||||
stream({
|
||||
entry: [
|
||||
|
||||
/* Polyfills */
|
||||
"core-js/fn/promise",
|
||||
"custom-event-polyfill",
|
||||
"whatwg-fetch",
|
||||
|
||||
/* Main entry point */
|
||||
"application.js"
|
||||
],
|
||||
output: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -33,7 +33,7 @@ const eslint = new CLIEngine
|
||||
const format = eslint.getFormatter()
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: lint SASS sources
|
||||
* Task: lint JavaScript
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -20,10 +20,7 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import path from "path"
|
||||
import sasslint from "sass-lint"
|
||||
import through from "through2"
|
||||
import util from "gulp-util"
|
||||
import stylelint from "gulp-stylelint"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: lint SASS sources
|
||||
@@ -32,65 +29,11 @@ import util from "gulp-util"
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`)
|
||||
|
||||
/* Linting */
|
||||
.pipe(
|
||||
through.obj(function(file, enc, done) {
|
||||
if (file.isNull() || file.isStream())
|
||||
return done()
|
||||
|
||||
/* Lint file using .sass-lint.yml */
|
||||
file.sasslint = sasslint.lintFileText({
|
||||
text: file.contents,
|
||||
format: path.extname(file.path).replace(".", ""),
|
||||
filename: path.relative(process.cwd(), file.path)
|
||||
})
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
stylelint({
|
||||
reporters: [
|
||||
{ formatter: "string", console: true }
|
||||
]
|
||||
}))
|
||||
|
||||
/* Print errors */
|
||||
.pipe(
|
||||
through.obj(function(file, enc, done) {
|
||||
sasslint.outputResults([file.sasslint])
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
}))
|
||||
|
||||
/* Terminate on error */
|
||||
.pipe(
|
||||
(() => {
|
||||
const errors = []
|
||||
|
||||
/* Gather errors */
|
||||
return through.obj(function(file, enc, done) {
|
||||
const results = file.sasslint
|
||||
|
||||
/* Consider warnings as errors during clean compilation */
|
||||
if (results.errorCount || results.warningCount)
|
||||
errors.push(file)
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
|
||||
/* Format errors and terminate */
|
||||
}, function(done) {
|
||||
if (errors.length > 0) {
|
||||
const message = errors.map(file => {
|
||||
return file.relative
|
||||
}).join(", ")
|
||||
|
||||
/* Emit error */
|
||||
this.emit("error", new util.PluginError("eslint",
|
||||
`Terminated with errors in files: ${message}`))
|
||||
}
|
||||
done()
|
||||
})
|
||||
})())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -28,6 +28,9 @@ import child from "child_process"
|
||||
|
||||
export default () => {
|
||||
return () => {
|
||||
return child.spawnSync("mkdocs", ["build"])
|
||||
const proc = child.spawnSync("mkdocs", ["build"])
|
||||
if (proc.status)
|
||||
throw new Error(`MkDocs error:\n${proc.stderr.toString()}`)
|
||||
return proc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
import * as selenium from "./selenium"
|
||||
import path from "path"
|
||||
import Gemini from "gemini"
|
||||
|
||||
export default (gulp, config) => {
|
||||
return done => {
|
||||
selenium.start(() => {
|
||||
// const file = require(
|
||||
// path.resolve(process.cwd(),
|
||||
// config.tests.regression.geminiConfigPath,
|
||||
// ".gemini-local.json"
|
||||
// ))
|
||||
|
||||
const configx = {
|
||||
"rootUrl": "http://localhost:8000",
|
||||
"gridUrl": "http://localhost:4444/wd/hub",
|
||||
"screenshotsDir": "./tests/regression/baseline/local",
|
||||
"browsers": {
|
||||
"chrome": {
|
||||
"desiredCapabilities": {
|
||||
"browserName": "chrome"
|
||||
}
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"projectRoot": "../../../",
|
||||
"sourceRoot": "src/assets/stylesheets"
|
||||
}
|
||||
}
|
||||
|
||||
// https://www.npmjs.com/package/gemini-sauce
|
||||
|
||||
console.log("running gemini...")
|
||||
const gemini = new Gemini(configx)
|
||||
|
||||
gemini.test("tests/regression/styleguide.js", {
|
||||
reporters: ["html"]
|
||||
})
|
||||
.then(() => {
|
||||
console.log("success")
|
||||
selenium.stop()
|
||||
done()
|
||||
}, err => {
|
||||
console.log("fail")
|
||||
selenium.stop()
|
||||
throw err
|
||||
})
|
||||
})
|
||||
// selenium.start(() => {
|
||||
// const geminiConfig = require(
|
||||
// path.resolve(
|
||||
// process.cwd(),
|
||||
// config.tests.regression.geminiConfigPath,
|
||||
// ".gemini-local.json"
|
||||
// ))
|
||||
// geminiConfig.rootUrl = `http://127.0.0.1:${config.patternlabServer.port}`
|
||||
//
|
||||
// const gemini = new Gemini(geminiConfig)
|
||||
// gemini.test(config.tests.regression.patternlabToGeminiOutput, {
|
||||
// reporters: ["html"]
|
||||
// })
|
||||
// .then(() => {
|
||||
// selenium.stop()
|
||||
// done()
|
||||
// }, err => {
|
||||
// selenium.stop()
|
||||
// throw err
|
||||
// })
|
||||
// })
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 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
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import path from "path"
|
||||
import { Server } from "karma"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: start karma test runner
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return done => {
|
||||
new Server({
|
||||
configFile: path.join(process.cwd(), config.tests.unit)
|
||||
}, done).start()
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -32,18 +32,14 @@ export default () => {
|
||||
new Server({
|
||||
configFile: path.join(process.cwd(), "tests/karma.conf.js")
|
||||
}, done).start()
|
||||
|
||||
/* Register signal handler for all relevant events */
|
||||
for (const signal of ["SIGTERM", "SIGINT", "exit"])
|
||||
process.on(signal, () => {
|
||||
return stopper.stop({
|
||||
port: 9876,
|
||||
logLevel: "OFF"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Signal handler
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Register signal handler for all relevant events */
|
||||
for (const signal of ["SIGTERM", "SIGINT", "exit"])
|
||||
process.on(signal, () => {
|
||||
return stopper.stop({
|
||||
port: 9876,
|
||||
logLevel: "OFF"
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -35,15 +35,18 @@ import version from "gulp-rev-replace"
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
const metadata = require(path.join(process.cwd(), "./package.json"))
|
||||
return gulp.src(`${config.views.src}/**/*.html`)
|
||||
return gulp.src(`${config.views.src}/**/*.{html,py}`)
|
||||
.pipe(changed(config.views.build))
|
||||
.pipe(
|
||||
minhtml({
|
||||
collapseBooleanAttributes: true,
|
||||
customAttrCollapse: /(content)/,
|
||||
includeAutoGeneratedTags: false,
|
||||
minifyCSS: true,
|
||||
minifyJS: true,
|
||||
removeComments: true,
|
||||
removeScriptTypeAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
customAttrCollapse: /(content)/
|
||||
removeStyleLinkTypeAttributes: true
|
||||
}))
|
||||
.pipe(replace("$theme-name$", metadata.name))
|
||||
.pipe(replace("$theme-version$", metadata.version))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448" viewBox="0 0 352 448" id="bitbucket"><path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875 1.5q-9.75-4.25-13.375-14.5t-.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 6.875 16.875zm27.75-5.25q-3.5-26.75-28.25-41T154 165.25q-15.75 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 38-21t12.5-42zM291.25 74q-5-6.75-14-11.125t-14.5-5.5T245 54.25q-72.75-11.75-141.5.5-10.75 1.75-16.5 3t-13.75 5.5T60.75 74q7.5 7 19 11.375t18.375 5.5T120 93.75Q177 101 232 94q15.75-2 22.375-3t18.125-5.375T291.25 74zm14.25 258.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5T88.75 412 70.5 401.125t-13-15.375q-6.25-24-14.25-73l1.5-4 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 10T291.75 288q-63 31.5-152.5 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875T25 232.75q-2.25-12.5-6.625-37.5t-7-40.375T5.5 118 0 78.5Q.75 72 4.375 66.375T12.25 57t11.25-7.5T35 43.875t12-4.625q31.25-11.5 78.25-16 94.75-9.25 169 12.5Q333 47.25 348 66.25q4 5 4.125 12.75t-1.375 13.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448" viewBox="0 0 352 448"><path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875 1.5q-9.75-4.25-13.375-14.5t-.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 6.875 16.875zm27.75-5.25q-3.5-26.75-28.25-41T154 165.25q-15.75 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 38-21t12.5-42zM291.25 74q-5-6.75-14-11.125t-14.5-5.5T245 54.25q-72.75-11.75-141.5.5-10.75 1.75-16.5 3t-13.75 5.5T60.75 74q7.5 7 19 11.375t18.375 5.5T120 93.75Q177 101 232 94q15.75-2 22.375-3t18.125-5.375T291.25 74zm14.25 258.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5T88.75 412 70.5 401.125t-13-15.375q-6.25-24-14.25-73l1.5-4 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 10T291.75 288q-63 31.5-152.5 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875T25 232.75q-2.25-12.5-6.625-37.5t-7-40.375T5.5 118 0 78.5Q.75 72 4.375 66.375T12.25 57t11.25-7.5T35 43.875t12-4.625q31.25-11.5 78.25-16 94.75-9.25 169 12.5Q333 47.25 348 66.25q4 5 4.125 12.75t-1.375 13.5z"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448" viewBox="0 0 352 448"><path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875 1.5q-9.75-4.25-13.375-14.5t-.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 6.875 16.875zm27.75-5.25q-3.5-26.75-28.25-41T154 165.25q-15.75 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 38-21t12.5-42zM291.25 74q-5-6.75-14-11.125t-14.5-5.5T245 54.25q-72.75-11.75-141.5.5-10.75 1.75-16.5 3t-13.75 5.5T60.75 74q7.5 7 19 11.375t18.375 5.5T120 93.75Q177 101 232 94q15.75-2 22.375-3t18.125-5.375T291.25 74zm14.25 258.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5T88.75 412 70.5 401.125t-13-15.375q-6.25-24-14.25-73l1.5-4 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 10T291.75 288q-63 31.5-152.5 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875T25 232.75q-2.25-12.5-6.625-37.5t-7-40.375T5.5 118 0 78.5Q.75 72 4.375 66.375T12.25 57t11.25-7.5T35 43.875t12-4.625q31.25-11.5 78.25-16 94.75-9.25 169 12.5Q333 47.25 348 66.25q4 5 4.125 12.75t-1.375 13.5z" fill="#fff"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 991 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448"><path d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
|
||||
|
Before Width: | Height: | Size: 959 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448"><path d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z" fill="#fff"/></svg>
|
||||
|
Before Width: | Height: | Size: 971 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500" id="gitlab"><path fill="currentColor" d="M93.667 473.347l90.684-279.097H2.983l90.684 279.097z" transform="translate(156.198 1.16)"/><path fill="currentColor" d="M221.333 473.345L130.649 194.25H3.557l217.776 279.095z" transform="translate(28.531 1.16)" opacity=".7"/><path fill="currentColor" d="M32 195.155L4.441 279.97a18.773 18.773 0 0 0 6.821 20.99l238.514 173.29L32 195.155z" transform="translate(.089 .256)" opacity=".5"/><path fill="currentColor" d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856 0L2.667-84.844z" transform="translate(29.422 280.256)"/><path fill="currentColor" d="M2.667 473.345L93.351 194.25h127.092L2.667 473.345z" transform="translate(247.198 1.16)" opacity=".7"/><path fill="currentColor" d="M221.334 195.155l27.559 84.815a18.772 18.772 0 0 1-6.821 20.99L3.557 474.25l217.777-279.095z" transform="translate(246.307 .256)" opacity=".5"/><path fill="currentColor" d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649 15.047-8.649 17.856 0l54.618 168.098z" transform="translate(336.974 280.256)"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500"><path d="M249.865 474.507l90.684-279.097H159.18l90.684 279.097z"/><path d="M249.864 474.506L159.18 195.41H32.088l217.776 279.095z" opacity=".7"/><path d="M32.089 195.41l-27.56 84.816a18.773 18.773 0 0 0 6.822 20.99l238.514 173.29L32.089 195.41z" opacity=".5"/><path d="M32.089 195.412H159.18L104.56 27.314c-2.81-8.65-15.046-8.65-17.855 0L32.089 195.412z"/><path d="M249.865 474.506l90.684-279.095H467.64L249.865 474.506z" opacity=".7"/><path d="M467.641 195.41l27.56 84.816a18.772 18.772 0 0 1-6.822 20.99l-238.515 173.29L467.641 195.41z" opacity=".5"/><path d="M467.64 195.412H340.55l54.618-168.098c2.81-8.65 15.047-8.65 17.856 0l54.618 168.098z"/></svg>
|
||||
|
Before Width: | Height: | Size: 742 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500"><path d="M249.865 474.507l90.684-279.097H159.18l90.684 279.097z" fill="#fff"/><path d="M249.864 474.506L159.18 195.41H32.088l217.776 279.095z" fill="#fff" opacity=".7"/><path d="M32.089 195.41l-27.56 84.816a18.773 18.773 0 0 0 6.822 20.99l238.514 173.29L32.089 195.41z" fill="#fff" opacity=".5"/><path d="M32.089 195.412H159.18L104.56 27.314c-2.81-8.65-15.046-8.65-17.855 0L32.089 195.412z" fill="#fff"/><path d="M249.865 474.506l90.684-279.095H467.64L249.865 474.506z" fill="#fff" opacity=".7"/><path d="M467.641 195.41l27.56 84.816a18.772 18.772 0 0 1-6.822 20.99l-238.515 173.29L467.641 195.41z" fill="#fff" opacity=".5"/><path d="M467.64 195.412H340.55l54.618-168.098c2.81-8.65 15.047-8.65 17.856 0l54.618 168.098z" fill="#fff"/></svg>
|
||||
|
Before Width: | Height: | Size: 826 B |
@@ -1,3 +1,4 @@
|
||||
{% import "partials/language.html" as lang %}
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
<head>
|
||||
@@ -18,7 +19,7 @@
|
||||
{% else %}
|
||||
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.ico">
|
||||
{% endif %}
|
||||
<meta name="generator" content="mkdocs+mkdocs-material#1.0.0">
|
||||
<meta name="generator" content="mkdocs+mkdocs-material#1.0.1">
|
||||
{% endblock %}
|
||||
{% block htmltitle %}
|
||||
{% if page.title %}
|
||||
@@ -30,18 +31,23 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block libs %}
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-934476c231.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-facb31f4a3.js"></script>
|
||||
{% endblock %}
|
||||
{% block fonts %}
|
||||
{% if config.extra.font != "none" %}
|
||||
{% set text = config.extra.get("font", {}).text | default("Roboto") %}
|
||||
{% set code = config.extra.get("font", {}).code
|
||||
| default("Roboto Mono") %}
|
||||
{% set font = text + ':300,400,400i,700|' + code | replace(' ', '+') %}
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ font }}">
|
||||
<style>body,input{font-family:"{{ text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ code }}","Courier New",Courier,monospace}</style>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
{% if config.extra.social %}
|
||||
<link rel="stylesheet" href="https://file.myfontastic.com/n6vo44Re5QaWo8oCKShBs7/icons.css">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-15e6cafc7f.css">
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-1b8b9fdf68.css">
|
||||
{% if config.extra.palette %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-535e87ca3f.palette.css">
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
|
||||
{% endif %}
|
||||
{% for path in extra_css %}
|
||||
<link rel="stylesheet" href="{{ path }}">
|
||||
@@ -57,6 +63,18 @@
|
||||
{% else %}
|
||||
<body>
|
||||
{% endif %}
|
||||
<svg class="md-svg">
|
||||
<defs>
|
||||
{% set platform = config.extra.repo_icon or config.repo_url %}
|
||||
{% if "github" in platform %}
|
||||
{% include "assets/images/icons/github-1da075986e.svg" %}
|
||||
{% elif "gitlab" in platform %}
|
||||
{% include "assets/images/icons/gitlab-5ad3f9f9e5.svg" %}
|
||||
{% elif "bitbucket" in platform %}
|
||||
{% include "assets/images/icons/bitbucket-670608a71a.svg" %}
|
||||
{% endif %}
|
||||
</defs>
|
||||
</svg>
|
||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer">
|
||||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
|
||||
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
|
||||
@@ -88,6 +106,9 @@
|
||||
{% endblock %}
|
||||
<div class="md-content">
|
||||
<article class="md-content__inner md-typeset">
|
||||
{% if config.edit_uri %}
|
||||
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
{% if not "\x3ch1 id=" in page.content %}
|
||||
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
||||
@@ -103,64 +124,16 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
{% for extension in config.markdown_extensions %}
|
||||
{% if extension == "pymdownx.arithmatex" %}
|
||||
{% set path = "mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" %}
|
||||
<script src="https://cdn.mathjax.org/{{ path }}"></script>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<script src="{{ base_url }}/assets/javascripts/application-0df6fd955b.js"></script>
|
||||
<script>
|
||||
/* Configuration for application */
|
||||
var config = {
|
||||
url: {
|
||||
base: "{{ base_url }}",
|
||||
}
|
||||
};
|
||||
/* Initialize application */
|
||||
var app = new Application(config);
|
||||
app.initialize();
|
||||
</script>
|
||||
<script src="{{ base_url }}/assets/javascripts/application-16f434a21a.js"></script>
|
||||
<script>var config={url:{base:"{{ base_url }}"}},app=new Application(config);app.initialize()</script>
|
||||
{% for path in extra_javascript %}
|
||||
<script src="{{ path }}"></script>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% block analytics %}
|
||||
{% if config.google_analytics %}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){
|
||||
i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
|
||||
[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
|
||||
m.parentNode.insertBefore(a,m)
|
||||
})(window, document,
|
||||
"script", "https://www.google-analytics.com/analytics.js", "ga");
|
||||
/* General initialization */
|
||||
ga("create",
|
||||
"{{ config.google_analytics[0] }}",
|
||||
"{{ config.google_analytics[1] }}");
|
||||
ga("set", "anonymizeIp", true);
|
||||
ga("send", "pageview");
|
||||
/* Track outbound links */
|
||||
var links = document.getElementsByTagName("a");
|
||||
Array.prototype.map.call(links, function(item) {
|
||||
if (item.host != document.location.host) {
|
||||
item.addEventListener("click", function() {
|
||||
var action = item.getAttribute("data-action") || "follow";
|
||||
ga("send", "event", "outbound", action, item.href);
|
||||
});
|
||||
}
|
||||
});
|
||||
/* Register handler to log search on blur */
|
||||
var query = document.forms.search.query;
|
||||
query.addEventListener("blur", function() {
|
||||
if (this.value) {
|
||||
var path = document.location.pathname;
|
||||
ga("send", "pageview", path + "?q=" + this.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>!function(e,t,a,n,o,c,i){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,c=t.createElement(a),i=t.getElementsByTagName(a)[0],c.async=1,c.src=n,i.parentNode.insertBefore(c,i)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create","{{ config.google_analytics[0] }}","{{ config.google_analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var t=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",t,e.href)})});var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</body></html>
|
||||
</html>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% import "partials/language.html" as lang %}
|
||||
<footer class="md-footer">
|
||||
{% if page.previous_page or page.next_page %}
|
||||
<div class="md-footer-nav">
|
||||
@@ -5,12 +6,12 @@
|
||||
{% if page.previous_page %}
|
||||
<a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<i class="md-icon md-footer-nav__icon">arrow_back</i>
|
||||
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
||||
<span class="md-flex__ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
Previous
|
||||
{{ lang.t('footer.previous') }}
|
||||
</span>
|
||||
{{ page.previous_page.title }}
|
||||
</span>
|
||||
@@ -22,13 +23,13 @@
|
||||
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
||||
<span class="md-flex__ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
Next
|
||||
{{ lang.t('footer.next') }}
|
||||
</span>
|
||||
{{ page.next_page.title }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<i class="md-icon md-footer-nav__icon">arrow_forward</i>
|
||||
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -39,24 +40,19 @@
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
<div class="md-footer-copyright">
|
||||
{% if config.copyright %}
|
||||
<span class="md-footer-copyright__highlight">
|
||||
<div class="md-footer-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</span>
|
||||
<br>
|
||||
</div>
|
||||
{% endif %}
|
||||
powered by
|
||||
<a href="http://www.mkdocs.org">MkDocs</a>
|
||||
and the
|
||||
<a href="http://squidfunk.github.io/mkdocs-material/">Material</a>
|
||||
theme
|
||||
<a href="http://www.mkdocs.org" title="MkDocs">MkDocs</a>
|
||||
and
|
||||
<a href="http://squidfunk.github.io/mkdocs-material/" title="Material for MkDocs">
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
{% for social in config.extra.social %}
|
||||
<a href="{{ social.link }}" class="md-footer-social__link socicon-{{ social.type }}"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% block social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<nav class="md-header-nav md-grid">
|
||||
<div class="md-flex">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-icon md-header-nav__icon md-header-nav__icon--home">
|
||||
layers
|
||||
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="{% if config.extra.logo %} md-logo {% else %} md-icon md-icon--home {% endif %} md-header-nav__button">
|
||||
{% if config.extra.logo %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<label class="md-icon md-header-nav__icon md-header-nav__icon--menu" for="drawer">
|
||||
menu
|
||||
</label>
|
||||
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch">
|
||||
<span class="md-flex__ellipsis md-header-nav__title">
|
||||
@@ -27,20 +27,16 @@
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block search_box %}
|
||||
<label class="md-icon md-header-nav__icon md-header-nav__icon--search" for="search">
|
||||
search
|
||||
</label>
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
{% include "partials/search.html" %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block repo %}
|
||||
{% if config.repo_url %}
|
||||
<div class="md-header-nav__source">
|
||||
<div class="md-header-nav__source">
|
||||
{% if config.repo_url %}
|
||||
{% include "partials/source.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{% macro t(key) %}{{ {
|
||||
"edit.link.title": "Edit this page",
|
||||
"footer.previous": "Previous",
|
||||
"footer.next": "Next",
|
||||
"search.placeholder": "Search",
|
||||
"source.link.title": "Go to repository",
|
||||
"toc.title": "Table of contents"
|
||||
}[key] }}{% endmacro %}
|
||||
@@ -8,30 +8,37 @@
|
||||
<label class="md-nav__link" for="{{ path }}">
|
||||
{{ nav_item.title }}
|
||||
</label>
|
||||
<nav class="md-nav" data-md-collapse>
|
||||
<nav class="md-nav" data-md-component="collapsible">
|
||||
<label class="md-nav__title" for="{{ path }}">
|
||||
{{ nav_item.title }}
|
||||
{{ nav_item.title}}
|
||||
</label>
|
||||
<ul class="md-nav__list">
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% set base = path %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
{% set temp = path %}
|
||||
{% set path = path + "-" + loop.index | string %}
|
||||
{% include "partials/nav-item.html" %}
|
||||
{% set path = temp %}
|
||||
{% set path = base + "-" + loop.index | string %}
|
||||
{% include "partials/nav-item.html" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
{% elif nav_item == page %}
|
||||
<li class="md-nav__item">
|
||||
{% set toc_ = page.toc %}
|
||||
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
|
||||
<label class="md-nav__link md-nav__link--active" for="toc">
|
||||
{{ nav_item.title }}
|
||||
</label>
|
||||
{% if "\x3ch1 id=" in page.content %}
|
||||
{% set toc_ = (toc_ | first).children %}
|
||||
{% endif %}
|
||||
{% if toc_ and (toc_ | first) %}
|
||||
<label class="md-nav__link md-nav__link--active" for="toc">
|
||||
{{ nav_item.title }}
|
||||
</label>
|
||||
{% endif %}
|
||||
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
|
||||
{{ nav_item.title }}
|
||||
</a>
|
||||
{% include "partials/toc.html" %}
|
||||
{% if page.toc %}
|
||||
{% include "partials/toc.html" %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="md-nav__item">
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
<nav class="md-nav md-nav--primary">
|
||||
<label class="md-nav__title" for="drawer">{{ config.site_name }}</label>
|
||||
<ul class="md-nav__list">
|
||||
{% for nav_item in nav %}
|
||||
{% set path = "nav-" + loop.index | string %}
|
||||
{% include "partials/nav-item.html" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
||||
<i class="{% if config.extra.logo %} md-logo {% else %} md-icon md-icon--home {% endif %} md-nav__button">
|
||||
{% if config.extra.logo %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}">
|
||||
{% endif %}
|
||||
</i>
|
||||
{{ config.site_name }}
|
||||
</label>
|
||||
{% if config.repo_url %}
|
||||
<div class="md-nav__source">
|
||||
{% include "partials/source.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% for nav_item in nav %}
|
||||
{% set path = "nav-" + loop.index | string %}
|
||||
{% include "partials/nav-item.html" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{% import "partials/language.html" as lang %}
|
||||
<div class="md-search" data-md-component="search">
|
||||
<div class="md-search__overlay"></div>
|
||||
<div class="md-search__inner">
|
||||
<form class="md-search__form" name="search">
|
||||
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
|
||||
<input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" accesskey="s" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
|
||||
<label class="md-icon md-search__icon" for="search"></label>
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap">
|
||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||
<div class="md-search-result" data-md-component="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
{% set path = "ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" %}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/{{ path }}">
|
||||
{% for social in config.extra.social %}
|
||||
<a href="{{ social.link }}" class="md-footer-social__link fa fa-{{ social.type }}"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -1,19 +1,25 @@
|
||||
{% import "partials/language.html" as lang %}
|
||||
{% set platform = config.extra.repo_icon or config.repo_url %}
|
||||
{% if "github" in platform %}
|
||||
{% set repo_type = "github" %}
|
||||
{% set repo_icon = "md-source--github" %}
|
||||
{% elif "gitlab" in platform %}
|
||||
{% set repo_type = "gitlab" %}
|
||||
{% set repo_icon = "md-source--gitlab" %}
|
||||
{% elif "bitbucket" in platform %}
|
||||
{% set repo_type = "bitbucket" %}
|
||||
{% set repo_icon = "md-source--bitbucket" %}
|
||||
{% else %}
|
||||
{% set repo_type = "" %}
|
||||
{% set repo_icon = "" %}
|
||||
{% endif %}
|
||||
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source {{ repo_icon }}" data-md-source="{{ repo_type }}">
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
</div>
|
||||
</a>
|
||||
{% block repo %}
|
||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
</div>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{% import "partials/language.html" as lang %}
|
||||
<nav class="md-nav md-nav--secondary">
|
||||
{% set toc = page.toc %}
|
||||
{% set toc_ = page.toc %}
|
||||
{% if "\x3ch1 id=" in page.content %}
|
||||
{% set toc = (toc | first).children %}
|
||||
{% set toc_ = (toc_ | first).children %}
|
||||
{% endif %}
|
||||
{% if toc and (toc | first) %}
|
||||
<label class="md-nav__title" for="toc">Table of contents</label>
|
||||
<ul class="md-nav__list">
|
||||
{% for toc_item in toc %}
|
||||
{% if toc_ and (toc_ | first) %}
|
||||
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% for toc_item in toc_ %}
|
||||
{% include "partials/toc-item.html" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -19,18 +19,17 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Project information
|
||||
site_name: Material
|
||||
site_description: A material design theme for MkDocs
|
||||
site_name: Material for MkDocs
|
||||
site_description: A Material Design theme for MkDocs
|
||||
site_author: Martin Donath
|
||||
site_url: http://squidfunk.github.io/mkdocs-material/
|
||||
|
||||
# Repository
|
||||
repo_name: squidfunk/mkdocs-material
|
||||
repo_url: https://github.com/squidfunk/mkdocs-material
|
||||
edit_uri: edit/rework/docs/
|
||||
|
||||
# Copyright
|
||||
copyright: 'Copyright © 2016 Martin Donath'
|
||||
copyright: 'Copyright © 2016 - 2017 Martin Donath'
|
||||
|
||||
# Documentation and theme
|
||||
theme_dir: material
|
||||
@@ -40,11 +39,8 @@ extra:
|
||||
palette:
|
||||
primary: indigo
|
||||
accent: indigo
|
||||
font:
|
||||
text: Ubuntu
|
||||
mono: Ubuntu Mono
|
||||
social:
|
||||
- type: github
|
||||
- type: github-alt
|
||||
link: https://github.com/squidfunk
|
||||
- type: twitter
|
||||
link: https://twitter.com/squidfunk
|
||||
@@ -62,7 +58,8 @@ markdown_extensions:
|
||||
- pymdownx.betterem(smart_enable=all)
|
||||
- pymdownx.caret
|
||||
- pymdownx.critic
|
||||
- pymdownx.githubemoji
|
||||
- pymdownx.emoji:
|
||||
emoji_generator: !!python/name:pymdownx.emoji.to_svg
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.mark
|
||||
@@ -71,22 +68,18 @@ markdown_extensions:
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
- pymdownx.tilde
|
||||
|
||||
|
||||
# Page tree
|
||||
pages:
|
||||
- Material: index.md
|
||||
- Getting started: getting-started.md
|
||||
- Extensions:
|
||||
- Admonition: extensions/admonition.md
|
||||
- Codehilite: extensions/codehilite.md
|
||||
- CodeHilite: extensions/codehilite.md
|
||||
- Footnotes: extensions/footnotes.md
|
||||
- Metadata: extensions/metadata.md
|
||||
- Permalinks: extensions/permalinks.md
|
||||
- PyMdown:
|
||||
- Overview: extensions/pymdown/overview.md
|
||||
- Inline Hilite: extensions/pymdown/inlinehilite.md
|
||||
- Arithmatex: extensions/pymdown/arithmatex.md
|
||||
- Tasklist: extensions/pymdown/tasklist.md
|
||||
- PyMdown: extensions/pymdown.md
|
||||
- Specimen: specimen.md
|
||||
- Customization: customization.md
|
||||
- Release notes: release-notes.md
|
||||
- Contributing: contributing.md
|
||||
- License: license.md
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "1.0.0",
|
||||
"description": "A material design theme for MkDocs",
|
||||
"version": "1.0.2",
|
||||
"description": "A Material Design theme for MkDocs",
|
||||
"keywords": [
|
||||
"mkdocs",
|
||||
"documentation",
|
||||
@@ -29,67 +29,72 @@
|
||||
"start": "scripts/start",
|
||||
"test": "scripts/test"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastclick": "^1.0.6",
|
||||
"js-cookie": "^2.1.3",
|
||||
"lunr": "^0.7.1",
|
||||
"material-design-color": "^2.3.1",
|
||||
"material-shadows": "^3.0.0",
|
||||
"modularscale-sass": "^2.1.1",
|
||||
"whatwg-fetch": "^1.0.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.3.2",
|
||||
"babel-eslint": "^6.1.2",
|
||||
"babel-loader": "^6.2.4",
|
||||
"autoprefixer": "^6.6.1",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-loader": "^6.2.10",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-transform-react-jsx": "^6.8.0",
|
||||
"babel-polyfill": "^6.16.0",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"babel-register": "^6.16.3",
|
||||
"babel-root-import": "^4.1.3",
|
||||
"babel-polyfill": "^6.20.0",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-register": "^6.18.0",
|
||||
"babel-root-import": "^4.1.5",
|
||||
"chai": "^3.5.0",
|
||||
"css-mqpacker": "^4.0.0",
|
||||
"del": "^2.2.0",
|
||||
"eslint": "^3.6.1",
|
||||
"eslint-plugin-mocha": "^4.6.0",
|
||||
"git-hooks": "^1.1.6",
|
||||
"core-js": "^2.4.1",
|
||||
"css-mqpacker": "^5.0.1",
|
||||
"custom-event-polyfill": "^0.3.0",
|
||||
"del": "^2.2.2",
|
||||
"eslint": "^3.13.1",
|
||||
"eslint-plugin-mocha": "^4.8.0",
|
||||
"fastclick": "^1.0.6",
|
||||
"git-hooks": "^1.1.7",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-changed": "^1.3.2",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-cssnano": "^2.1.1",
|
||||
"gulp-htmlmin": "^1.3.0",
|
||||
"gulp-if": "^2.0.0",
|
||||
"gulp-ignore": "^2.0.1",
|
||||
"gulp-modernizr": "0.0.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-cssnano": "^2.1.2",
|
||||
"gulp-htmlmin": "^3.0.0",
|
||||
"gulp-if": "^2.0.2",
|
||||
"gulp-ignore": "^2.0.2",
|
||||
"gulp-modernizr": "1.0.0-alpha",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-postcss": "^6.1.0",
|
||||
"gulp-remove-empty-lines": "0.0.2",
|
||||
"gulp-postcss": "^6.2.0",
|
||||
"gulp-remove-empty-lines": "0.0.8",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-rev": "^7.0.0",
|
||||
"gulp-rev": "^7.1.2",
|
||||
"gulp-rev-replace": "^0.4.3",
|
||||
"gulp-sass": "^2.2.0",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
"gulp-svgmin": "^1.2.2",
|
||||
"gulp-uglify": "^1.5.2",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-sourcemaps": "^2.4.0",
|
||||
"gulp-stylelint": "^3.7.0",
|
||||
"gulp-svgmin": "^1.2.3",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"gulp-util": "^3.0.8",
|
||||
"js-cookie": "^2.1.3",
|
||||
"karma": "^1.3.0",
|
||||
"karma-chrome-launcher": "^2.0.0",
|
||||
"karma-coverage": "^1.1.1",
|
||||
"karma-mocha": "^1.2.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-notify-reporter": "^1.0.1",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-spec-reporter": "0.0.26",
|
||||
"karma-webpack": "^1.8.0",
|
||||
"mocha": "^3.1.0",
|
||||
"node-notifier": "^4.5.0",
|
||||
"sass-lint": "^1.9.1",
|
||||
"selenium-standalone": "^5.7.2",
|
||||
"through2": "^2.0.1",
|
||||
"karma-webpack": "^2.0.1",
|
||||
"lunr": "^0.7.2",
|
||||
"material-design-color": "^2.3.2",
|
||||
"material-shadows": "^3.0.1",
|
||||
"mocha": "^3.2.0",
|
||||
"modularscale-sass": "^2.1.1",
|
||||
"node-notifier": "^4.6.1",
|
||||
"selenium-standalone": "^5.9.1",
|
||||
"stylelint": "^7.7.1",
|
||||
"stylelint-config-standard": "^15.0.1",
|
||||
"stylelint-order": "^0.2.2",
|
||||
"stylelint-scss": "^1.4.1",
|
||||
"through2": "^2.0.3",
|
||||
"vinyl-paths": "^2.1.0",
|
||||
"webpack": "^1.13.1",
|
||||
"webpack": "^1.14.0",
|
||||
"webpack-stream": "^3.2.0",
|
||||
"yargs": "^3.32.0"
|
||||
"whatwg-fetch": "^2.0.1",
|
||||
"yargs": "^6.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.5.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -18,6 +18,6 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
mkdocs
|
||||
mkdocs>=0.16
|
||||
pygments
|
||||
pymdown-extensions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -31,12 +31,12 @@ fi
|
||||
`npm bin`/eslint .
|
||||
ESLINT=$?
|
||||
|
||||
# Run Sass-Lint
|
||||
`npm bin`/sass-lint -c .sass-lint.yml -vq
|
||||
SASSLINT=$?
|
||||
# Run Stylelint
|
||||
`npm bin`/stylelint `find src/assets -name *.scss`
|
||||
STYLELINT=$?
|
||||
|
||||
# If one command failed, exit with error
|
||||
if [ $ESLINT == 1 ] || [ $SASSLINT == 1 ]; then
|
||||
if [ $ESLINT -gt 0 ] || [ $STYLELINT -gt 0 ]; then
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 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
|
||||
@@ -18,23 +18,28 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
import json
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
# Load package.json contents
|
||||
with open("package.json") as data:
|
||||
package = json.load(data)
|
||||
|
||||
# Package description
|
||||
setup(
|
||||
name = 'mkdocs-material',
|
||||
version = '1.0.0',
|
||||
url = 'http://squidfunk.github.io/mkdocs-material/',
|
||||
license = 'MIT',
|
||||
description = 'A material design theme for MkDocs',
|
||||
author = 'Martin Donath',
|
||||
author_email = 'martin.donath@squidfunk.com',
|
||||
keywords = ['mkdocs', 'documentation', 'theme'],
|
||||
name = package["name"],
|
||||
version = package["version"],
|
||||
url = package["homepage"],
|
||||
license = package["license"],
|
||||
description = package["description"],
|
||||
author = package["author"]["name"],
|
||||
author_email = package["author"]["email"],
|
||||
keywords = package["keywords"],
|
||||
packages = find_packages(),
|
||||
include_package_data = True,
|
||||
entry_points = {
|
||||
'mkdocs.themes': [
|
||||
'material = material',
|
||||
"mkdocs.themes": [
|
||||
"material = material",
|
||||
]
|
||||
},
|
||||
zip_safe = False
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
Copyright (c) 2016-2017 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
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
|
||||
viewBox="0 0 352 448">
|
||||
<path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
|
||||
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
|
||||
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
|
||||
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
|
||||
38-21t12.5-42zM291.25
|
||||
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
|
||||
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
|
||||
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
|
||||
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
|
||||
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
|
||||
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
|
||||
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
|
||||
10-13.625 7.75q-63 31.5-152.5
|
||||
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
|
||||
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
|
||||
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
|
||||
12.75t-1.375 13.5z" fill="white" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,6 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
|
||||
viewBox="0 0 352 448">
|
||||
<path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
|
||||
viewBox="0 0 352 448" id="bitbucket">
|
||||
<path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
|
||||
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
|
||||
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
|
||||
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
||||
viewBox="0 0 416 448">
|
||||
<path d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
||||
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
||||
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
||||
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
||||
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
||||
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
||||
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
||||
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
||||
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
||||
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
||||
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
||||
99.5z" fill="white" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,6 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
||||
viewBox="0 0 416 448">
|
||||
<path d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
||||
viewBox="0 0 416 448" id="github">
|
||||
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,32 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
|
||||
viewBox="0 0 500 500">
|
||||
<g transform="translate(156.197863, 1.160267)">
|
||||
<path d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
|
||||
473.347L93.667,473.347z" fill="white" />
|
||||
</g>
|
||||
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
|
||||
<path d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
|
||||
473.345z" fill="white" />
|
||||
</g>
|
||||
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
|
||||
<path d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
|
||||
20.99l238.514,173.29 L32,195.155L32,195.155z" fill="white" />
|
||||
</g>
|
||||
<g transform="translate(29.421866, 280.255593)">
|
||||
<path d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
|
||||
0L2.667-84.844 L2.667-84.844z" fill="white" />
|
||||
</g>
|
||||
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
|
||||
<path d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
|
||||
473.345z" fill="white" />
|
||||
</g>
|
||||
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
|
||||
<path d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
|
||||
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z"
|
||||
fill="white" />
|
||||
</g>
|
||||
<g transform="translate(336.973725, 280.255593)">
|
||||
<path d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
|
||||
17.856,0L130.667-84.844 L130.667-84.844z" fill="white" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,31 +1,38 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
|
||||
viewBox="0 0 500 500">
|
||||
viewBox="0 0 500 500" id="gitlab">
|
||||
<g transform="translate(156.197863, 1.160267)">
|
||||
<path d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
|
||||
<path fill="currentColor"
|
||||
d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
|
||||
473.347L93.667,473.347z" />
|
||||
</g>
|
||||
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
|
||||
<path d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
|
||||
<path fill="currentColor"
|
||||
d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
|
||||
473.345z" />
|
||||
</g>
|
||||
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
|
||||
<path d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
|
||||
<path fill="currentColor"
|
||||
d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
|
||||
20.99l238.514,173.29 L32,195.155L32,195.155z" />
|
||||
</g>
|
||||
<g transform="translate(29.421866, 280.255593)">
|
||||
<path d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
|
||||
<path fill="currentColor"
|
||||
d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
|
||||
0L2.667-84.844 L2.667-84.844z" />
|
||||
</g>
|
||||
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
|
||||
<path d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
|
||||
<path fill="currentColor"
|
||||
d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
|
||||
473.345z" />
|
||||
</g>
|
||||
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
|
||||
<path d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
|
||||
<path fill="currentColor"
|
||||
d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
|
||||
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z" />
|
||||
</g>
|
||||
<g transform="translate(336.973725, 280.255593)">
|
||||
<path d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
|
||||
<path fill="currentColor"
|
||||
d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
|
||||
17.856,0L130.667-84.844 L130.667-84.844z" />
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
@@ -44,7 +44,7 @@ export default class Application {
|
||||
*/
|
||||
initialize() {
|
||||
|
||||
/* Initialize Modernizr and Fastclick */
|
||||
/* Initialize Modernizr and FastClick */
|
||||
new Material.Event.Listener(document, "DOMContentLoaded", () => {
|
||||
|
||||
/* Test for iOS */
|
||||
@@ -60,9 +60,9 @@ export default class Application {
|
||||
/* Attack FastClick to mitigate 300ms delay on touch devices */
|
||||
FastClick.attach(document.body)
|
||||
|
||||
/* Wrap all data tables */
|
||||
/* Wrap all data tables for better overflow scrolling */
|
||||
const tables = document.querySelectorAll("table:not([class])")
|
||||
for (const table of tables) {
|
||||
Array.prototype.forEach.call(tables, table => {
|
||||
const wrap = document.createElement("div")
|
||||
wrap.classList.add("md-typeset__table")
|
||||
if (table.nextSibling) {
|
||||
@@ -71,29 +71,28 @@ export default class Application {
|
||||
table.parentNode.appendChild(wrap)
|
||||
}
|
||||
wrap.appendChild(table)
|
||||
})
|
||||
|
||||
/* Force 1px scroll offset to trigger overflow scrolling */
|
||||
if (Modernizr.ios) {
|
||||
const scrollable = document.querySelectorAll("[data-md-scrollfix]")
|
||||
Array.prototype.forEach.call(scrollable, item => {
|
||||
item.addEventListener("touchstart", () => {
|
||||
const top = item.scrollTop
|
||||
|
||||
/* We're at the top of the container */
|
||||
if (top === 0) {
|
||||
item.scrollTop = 1
|
||||
|
||||
/* We're at the bottom of the container */
|
||||
} else if (top + item.offsetHeight === item.scrollHeight) {
|
||||
item.scrollTop = top - 1
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}).listen()
|
||||
|
||||
/* Cross-browser helper to dispatch/fire an event */
|
||||
const dispatch = (el, event) => {
|
||||
return document.createEvent
|
||||
? el.dispatchEvent(new Event(event))
|
||||
: el.fireEvent(`on${event}`, document.createEventObject())
|
||||
}
|
||||
|
||||
/* Truncate a string after the given number of characters - this is not
|
||||
a reasonable approach, since the summaries kind of suck. It would be
|
||||
better to create something more intelligent, highlighting the search
|
||||
occurrences and making a better summary out of it */
|
||||
const truncate = function(string, n) {
|
||||
let i = n
|
||||
if (string.length > i) {
|
||||
while (string[i] !== " " && --i > 0);
|
||||
return `${string.substring(0, i)}...`
|
||||
}
|
||||
return string
|
||||
}
|
||||
|
||||
/* Component: sidebar container */
|
||||
if (!Modernizr.csscalc)
|
||||
new Material.Event.MatchMedia("(min-width: 960px)",
|
||||
@@ -102,7 +101,7 @@ export default class Application {
|
||||
], new Material.Sidebar.Container("[data-md-component=container]")))
|
||||
|
||||
/* Component: sidebar with navigation */
|
||||
new Material.Event.MatchMedia("(min-width: 1200px)",
|
||||
new Material.Event.MatchMedia("(min-width: 1220px)",
|
||||
new Material.Event.Listener(window, [
|
||||
"scroll", "resize", "orientationchange"
|
||||
], new Material.Sidebar.Position("[data-md-component=navigation]")))
|
||||
@@ -119,11 +118,19 @@ export default class Application {
|
||||
new Material.Nav.Blur("[data-md-component=toc] .md-nav__link")))
|
||||
|
||||
/* Component: collapsible elements for navigation */
|
||||
const collapsibles = document.querySelectorAll("[data-md-collapse]")
|
||||
for (const collapse of collapsibles)
|
||||
new Material.Event.MatchMedia("(min-width: 1200px)",
|
||||
const collapsibles =
|
||||
document.querySelectorAll("[data-md-component=collapsible]")
|
||||
Array.prototype.forEach.call(collapsibles, collapse => {
|
||||
new Material.Event.MatchMedia("(min-width: 1220px)",
|
||||
new Material.Event.Listener(collapse.previousElementSibling, "click",
|
||||
new Material.Nav.Collapse(collapse)))
|
||||
})
|
||||
|
||||
/* Component: active pane monitor for iOS scrolling fixes */
|
||||
new Material.Event.MatchMedia("(max-width: 1219px)",
|
||||
new Material.Event.Listener(
|
||||
"[data-md-component=navigation] [data-md-toggle]", "change",
|
||||
new Material.Nav.Scrolling("[data-md-component=navigation] nav")))
|
||||
|
||||
/* Component: search body lock for mobile */
|
||||
new Material.Event.MatchMedia("(max-width: 959px)",
|
||||
@@ -134,19 +141,19 @@ export default class Application {
|
||||
new Material.Event.Listener(document.forms.search.query, [
|
||||
"focus", "keyup"
|
||||
], new Material.Search.Result("[data-md-component=result]", () => {
|
||||
return fetch(`${this.config_.url.base}/mkdocs/search_index.json`)
|
||||
.then(response => response.json())
|
||||
return fetch(`${this.config_.url.base}/mkdocs/search_index.json`, {
|
||||
credentials: "same-origin"
|
||||
}).then(response => response.json())
|
||||
.then(data => {
|
||||
return data.docs.map(doc => {
|
||||
doc.location = this.config_.url.base + doc.location
|
||||
doc.text = truncate(doc.text, 140)
|
||||
return doc
|
||||
})
|
||||
})
|
||||
})).listen()
|
||||
|
||||
/* Listener: prevent touches on overlay if navigation is active */
|
||||
new Material.Event.MatchMedia("(max-width: 1199px)",
|
||||
new Material.Event.MatchMedia("(max-width: 1219px)",
|
||||
new Material.Event.Listener("[data-md-component=overlay]", "touchstart",
|
||||
ev => ev.preventDefault()))
|
||||
|
||||
@@ -157,11 +164,11 @@ export default class Application {
|
||||
const toggle = document.querySelector("[data-md-toggle=drawer]")
|
||||
if (toggle.checked) {
|
||||
toggle.checked = false
|
||||
dispatch(toggle, "change")
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
}
|
||||
}))
|
||||
|
||||
/* Listener: focus input after activating search */
|
||||
/* Listener: focus input after opening search */
|
||||
new Material.Event.Listener("[data-md-toggle=search]", "change", ev => {
|
||||
setTimeout(toggle => {
|
||||
const query = document.forms.search.query
|
||||
@@ -170,26 +177,39 @@ export default class Application {
|
||||
}, 400, ev.target)
|
||||
}).listen()
|
||||
|
||||
/* Listener: activate search on focus */
|
||||
/* Listener: open search on focus */
|
||||
new Material.Event.MatchMedia("(min-width: 960px)",
|
||||
new Material.Event.Listener(document.forms.search.query, "focus", () => {
|
||||
const toggle = document.querySelector("[data-md-toggle=search]")
|
||||
if (!toggle.checked) {
|
||||
toggle.checked = true
|
||||
dispatch(toggle, "change")
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
}
|
||||
}))
|
||||
|
||||
/* Listener: disable search when clicking outside */
|
||||
/* Listener: close search when clicking outside */
|
||||
new Material.Event.MatchMedia("(min-width: 960px)",
|
||||
new Material.Event.Listener(document.body, "click", () => {
|
||||
const toggle = document.querySelector("[data-md-toggle=search]")
|
||||
if (toggle.checked) {
|
||||
toggle.checked = false
|
||||
dispatch(toggle, "change")
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
}
|
||||
}))
|
||||
|
||||
/* Listener: disable search when ESC key is pressed */
|
||||
new Material.Event.Listener(window, "keyup", ev => {
|
||||
const code = ev.keyCode || ev.which
|
||||
if (code === 27) {
|
||||
const toggle = document.querySelector("[data-md-toggle=search]")
|
||||
if (toggle.checked) {
|
||||
toggle.checked = false
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
document.forms.search.query.blur()
|
||||
}
|
||||
}
|
||||
}).listen()
|
||||
|
||||
/* Listener: fix unclickable toggle due to blur handler */
|
||||
new Material.Event.MatchMedia("(min-width: 960px)",
|
||||
new Material.Event.Listener("[data-md-toggle=search]", "click",
|
||||
@@ -200,7 +220,7 @@ export default class Application {
|
||||
new Material.Event.Listener("[data-md-component=search]", "click",
|
||||
ev => ev.stopPropagation()))
|
||||
|
||||
/* Retrieve the facts for the given repository type */
|
||||
/* Retrieve facts for the given repository type */
|
||||
;(() => {
|
||||
const el = document.querySelector("[data-md-source]")
|
||||
if (!el) return Promise.resolve([])
|
||||
@@ -212,9 +232,10 @@ export default class Application {
|
||||
/* Render repository source information */
|
||||
})().then(facts => {
|
||||
const sources = document.querySelectorAll("[data-md-source]")
|
||||
for (const source of sources)
|
||||
Array.prototype.forEach.call(sources, source => {
|
||||
new Material.Source.Repository(source)
|
||||
.initialize(facts)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
||||