fix(core): update

This commit is contained in:
Philipp Kunz 2019-05-13 19:04:33 +02:00
commit fa42015693
268 changed files with 36243 additions and 0 deletions

13
.babelrc Normal file
View File

@ -0,0 +1,13 @@
{
"presets": [
["@babel/preset-env", {
"loose": true,
"targets": " > 1%, last 2 versions"
}]
],
"plugins": [
["@babel/plugin-transform-react-jsx", {
"pragma": "JSX.createElement"
}]
]
}

40
.editorconfig Normal file
View File

@ -0,0 +1,40 @@
# Copyright (c) 2016-2019 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.
# Top-level config
root = true
# All files
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Makefiles
[*.py]
indent_size = 4
# Makefiles
[Makefile]
indent_style = tab
indent_size = 8

27
.env Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# Copyright (c) 2016-2019 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.
# Activate virtual environment
if [ -f venv/bin/activate ]; then
echo "Activating virtual environment"
source venv/bin/activate
fi

30
.eslintignore Normal file
View File

@ -0,0 +1,30 @@
# Copyright (c) 2016-2019 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.
# Python
/venv
# Files generated by build
/build
/material
/site
# Extra JavaScript
/docs/**/*.js

200
.eslintrc Normal file
View File

@ -0,0 +1,200 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"Modernizr": true,
"navigator": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"globalReturn": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": false,
"templateStrings": true,
"unicodeCodePointEscapes": true
},
"impliedStrict": true,
"sourceType": "module"
},
"plugins": [],
"rules": {
"array-callback-return": 2,
"array-bracket-spacing": 2,
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"block-scoped-var": 2,
"block-spacing": 2,
"brace-style": 2,
"camelcase": [2, {
"properties": "always"
}],
"comma-dangle": [2, "never"],
"comma-style": [2, "last"],
"complexity": 2,
"computed-property-spacing": 2,
"consistent-this": 2,
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": 2,
"func-call-spacing": 2,
"func-names": [2, "never"],
"func-style": 0,
"generator-star-spacing": 2,
"indent": [2, 2, {
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"MemberExpression": 1,
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
},
"SwitchCase": 1
}],
"init-declarations": 2,
"key-spacing": 2,
"keyword-spacing": 2,
"linebreak-style": 2,
"lines-around-comment": 2,
"lines-around-directive": 2,
"max-depth": 2,
"max-len": [1, {
"ignorePattern": "\/\/ TODO"
}],
"max-nested-callbacks": 2,
"max-params": 2,
"max-statements-per-line": 2,
"new-cap": 2,
"newline-per-chained-call": 2,
"no-array-constructor": 2,
"no-alert": 2,
"no-caller": 2,
"no-cond-assign": 0,
"no-confusing-arrow": [2, {
"allowParens": false
}],
"no-console": 1,
"no-duplicate-imports": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
"no-global-assign": 2,
"no-invalid-this": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multiple-empty-lines": [1, {
"max": 1
}],
"no-nested-ternary": 2,
"no-new": 0,
"no-new-object": 2,
"no-param-reassign": 2,
"no-prototype-builtins": 2,
"no-shadow": 2,
"no-tabs": 2,
"no-template-curly-in-string": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-undefined": 2,
"no-underscore-dangle": [2, {
"allowAfterThis": true,
"allowAfterSuper": true
}],
"no-unneeded-ternary": 2,
"no-unsafe-negation": 2,
"no-unused-expressions": 2,
"no-unused-vars": 1,
"no-use-before-define": 2,
"no-useless-call": 2,
"no-useless-computed-key": 2,
"no-useless-constructor": 2,
"no-useless-rename": 2,
"no-var": 2,
"no-whitespace-before-property": 2,
"no-with": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": 2,
"one-var-declaration-per-line": 2,
"operator-assignment": 2,
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-numeric-literals": 2,
"prefer-spread": 2,
"prefer-template": 2,
"quotes": [2, "double"],
"radix": 2,
"require-jsdoc": [1, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false
}
}],
"rest-spread-spacing": 2,
"semi": [2, "never"],
"semi-spacing": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": 2,
"space-infix-ops": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always", {
"line": {
"markers": ["/", ":"],
"exceptions": ["-", "+"]
},
"block": {
"markers": ["!"],
"exceptions": ["*"],
"balanced": true
}
}],
"strict": 2,
"template-curly-spacing": 2,
"unicode-bom": 2,
"valid-jsdoc": [1, {
"prefer": {
"arg": "param",
"argument": "param",
"class": "constructor",
"returns": "return",
"virtual": "abstract"
},
"requireParamDescription": true,
"requireReturn": false,
"requireReturnDescription": true
}],
"yield-star-spacing": 2
},
"root": true
}

34
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,34 @@
## Description
[Description of the bug]
### Expected behavior
[What you expected to happen]
### Actual behavior
[What is actually happening]
### Steps to reproduce the bug
1. [First step]
2. [Second step]
3. [and so on...]
### Package versions
* Python: `python --version`
* MkDocs: `mkdocs --version`
* Material: `pip show mkdocs-material | grep -E ^Version`
### Project configuration
``` yaml
The contents of your mkdocs.yml
```
### System information
* OS: [The operating system you're running]
* Browser: [The browser used, if relevant]

43
.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
# Copyright (c) 2016-2019 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.
# macOS internals
.DS_Store
# NPM-related
/node_modules
/npm-debug.log*
# Python-related
__pycache__
venv
# Files generated by build
/build
/material/manifest.json
/MANIFEST
/site
# Distribution files
/dist
/mkdocs_material.egg-info
# IDEs
.vscode

77
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,77 @@
# gitzone docker
image: hosttoday/ht-docker-dbase:npmci
services:
- docker:dind
stages:
- buildAndTest
- triggerPagesVerify
before_script:
- npm install -g @shipzone/npmci
- npmci docker login
buildTest:
stage: buildAndTest
script:
- npmci docker build
- npmci docker test
except:
- tags
- triggers
tags:
- lossless
- priv
buildTestRelease:
stage: buildAndTest
script:
- npmci docker build
- npmci docker test
- npmci docker push registry.gitlab.com test
- npmci docker push registry.gitlab.com
- npmci docker push docker.io
only:
- tags
- triggers
tags:
- lossless
- priv
trigger:
stage: triggerPagesVerify
script:
- npmci trigger
only:
- tags
- triggers
tags:
- lossless
- priv
pages:
stage: triggerPagesVerify
before_script:
- 'npmci -v'
image: hosttoday/ht-docker-node:npmci
script:
# - npmci command npm install -g npmpage
# - npmci command npmpage
- echo "nothing here yet until @gitzone/tsdoc is ready!"
only:
- tags
tags:
- docker
artifacts:
expire_in: 1 week
paths:
- public
verify:
stage: triggerPagesVerify
script:
- npmci docker pull registry.gitlab.com test
only:
- tags
tags:
- docker

11
.modernizr-autorc Normal file
View File

@ -0,0 +1,11 @@
{
"options": [
"addTest",
"setClasses"
],
"files": {
"src": ["src/assets/**/*.{js,scss}"]
},
"feature-detects": [],
"runOnce": true
}

22
.stylelintignore Normal file
View File

@ -0,0 +1,22 @@
# Copyright (c) 2016-2019 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.
# Don't lint shame
src/assets/stylesheets/_shame.scss

192
.stylelintrc Normal file
View File

@ -0,0 +1,192 @@
{
"extends": "stylelint-config-recommended",
"plugins": [
"stylelint-order",
"stylelint-scss"
],
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": 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-descending-specificity": null,
"no-unknown-animations": true,
"order/order": [
"custom-properties",
"declarations"
],
"order/properties-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,
"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": ["px", "em", "deg", "s", "%", "mm", "vh"],
"value-keyword-case": "lower",
"value-no-vendor-prefix": true
}
}

89
.travis.sh Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
# Copyright (c) 2016-2019 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.
# Exit, if one command fails
set -e
# # Create directory for overrides, so we don't clutter up the base theme with
# # our custom adjustments for our own hosted documentation
# mkdir -p overrides
# cat > overrides/main.html <<-EOM
# {% extends "base.html" %}
# {% block scripts %}
# {{ super() }}
# <script>
# (function(i,s,o,g,r,a,m){
# i["GinsengAnalyticsObject"]=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://ginseng.ai/analytics.js", "gx");
# </script>
# {% endblock %}
# EOM
# Deploy documentation to GitHub pages
if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
REMOTE="https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material"
# Set configuration for repository and deploy documentation
git config --global user.name "${GH_NAME}"
git config --global user.email "${GH_EMAIL}"
git remote set-url origin ${REMOTE}
# Install Material, so we can use it as a base template and add overrides
python setup.py install
# # Override theme configuration
# sed -i 's/name: null/name: material/g' mkdocs.yml
# sed -i 's/custom_dir: material/custom_dir: overrides/g' mkdocs.yml
# Build documentation with overrides and publish to GitHub pages
mkdocs gh-deploy --force
mkdocs --version
fi
# Remove overrides directory so it won't get included in the image
# rm -rf overrides
# Terminate if we're not on a release branch
echo "${TRAVIS_BRANCH}" | grep -qvE "^[0-9.]+$" && exit 0; :;
# Install dependencies for release build
pip install wheel twine
# Build and install theme and Docker image
python setup.py build sdist bdist_wheel --universal
docker build -t ${TRAVIS_REPO_SLUG} .
# Test Docker image build
docker run --rm -it -v $(pwd):/docs ${TRAVIS_REPO_SLUG} build --theme material
# Push release to PyPI
twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
# Push image to Docker Hub
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
docker tag ${TRAVIS_REPO_SLUG} ${TRAVIS_REPO_SLUG}:${TRAVIS_BRANCH}
docker tag ${TRAVIS_REPO_SLUG} ${TRAVIS_REPO_SLUG}:latest
docker push ${TRAVIS_REPO_SLUG}

52
.travis.yml Normal file
View File

@ -0,0 +1,52 @@
# Copyright (c) 2016-2019 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.
language: python
sudo: false
# Python, Node.js version and necessary services
python: "3.6"
node_js: "8"
services:
- docker
# Limit clone depth to 5, to speed up build
git:
depth: 5
# Cache dependencies
cache:
pip: true
directories:
- node_modules
# Install dependencies
install:
- npm install
- pip install -r requirements.txt
# Perform build and release
script:
- npm run lint
- npm run build
# Deploy artifacts
after_success:
- ./.travis.sh

8
.travisignore Normal file
View File

@ -0,0 +1,8 @@
.github/*
material/*
.editorconfig
.gitignore
CHANGELOG
LICENSE
*.md
git

662
CHANGELOG Normal file
View File

@ -0,0 +1,662 @@
mkdocs-material-4.2.0 (2019-04-28)
* Added Norwegian (Nynorsk) translations
* Fixed loss of focus in non-form input elements due to search hotkeys
* Fixed #1067: Search hotkeys not working for mobile/tablet screensize
* Fixed #1068: Search not correctly aligned for tablet screensize
mkdocs-material-4.1.2 (2019-04-16)
* Fixed #1072: HTML tags appearing in navigation link titles
mkdocs-material-4.1.1 (2019-03-28)
* Fixed minor CSS errors detected during validation
mkdocs-material-4.1.0 (2019-03-22)
* Fixed #1023: Search for Asian languages broken after Lunr.js update
* Fixed #1026: contenteditable elements loose focus on hotkeys
mkdocs-material-4.0.2 (2019-03-01)
* Fixed #1012: HTML character entities appear in search result titles
mkdocs-material-4.0.1 (2019-02-13)
* Fixed #762, #816: Glitch in sidebar when collapsing items
* Fixed #869: Automatically expand details before printing
mkdocs-material-4.0.0 (2019-02-13)
* Added background on hover for table rows
* Removed Google Tag Manager and reverted to Google Analytics
* Removed blocks in partials - Jinja doesn't support them
* Fixed #911: Chrome breaks layout if system language is Chinese [BREAKING]
* Fixed #976: Removed FastClick
mkdocs-material-3.3.0 (2019-01-29)
* Moved Google Analytics integration into `head` using Google Tag Manager
* Fixed #972: Unicode slugifier breaks table of contents blur on scroll
* Fixed #974: Additional links in table of contents break blur on scroll
mkdocs-material-3.2.0 (2018-12-28)
* Added support for redirects using metadata refresh
* Fixed #921: Load Google Analytics snippet asynchronously
mkdocs-material-3.1.0 (2018-11-17)
* Added support for Progressive Web App Manifest
* Fixed #915: Search bug in Safari (upgraded Lunr.js)
mkdocs-material-3.0.6 (2018-10-26)
* Added Taiwanese translations
* Fixed #906: JavaScript code blocks evaluated in search results
mkdocs-material-3.0.5 (2018-10-23)
* Added Croatian and Indonesian translations
* Fixed #899: Skip-to-content link invalid from 2nd level on
* Fixed #902: Missing URL filter in footer for FontAwesome link
mkdocs-material-3.0.4 (2018-09-03)
* Updated Dutch translations
* Fixed #856: Removed preconnect meta tag if Google Fonts are disabled
mkdocs-material-3.0.3 (2018-08-07)
* Fixed #841: Additional path levels for extra CSS and JS
mkdocs-material-3.0.2 (2018-08-06)
* Fixed #839: Lunr.js stemmer imports incorrect
mkdocs-material-3.0.1 (2018-08-05)
* Fixed #838: Search result links incorrect
mkdocs-material-3.0.0 (2018-08-05)
* Upgraded MkDocs to 1.0 [BREAKING]
* Upgraded Python in official Docker image to 3.6
* Added Serbian and Serbo-Croatian translations
mkdocs-material-2.9.4 (2018-07-29)
* Fixed build error after MkDocs upgrade
mkdocs-material-2.9.3 (2018-07-29)
* Added link to home for logo in drawer
* Fixed dependency problems between MkDocs and Tornado
mkdocs-material-2.9.2 (2018-06-29)
* Added Hindi and Czech translations
mkdocs-material-2.9.1 (2018-06-18)
* Added support for different spellings for theme color
* Fixed #799: Added support for web font minification in production
* Fixed #800: Added .highlighttable as an alias for .codehilitetable
mkdocs-material-2.9.0 (2018-06-13)
* Added support for theme color on Android
* Fixed #796: Rendering of nested tabbed code blocks
mkdocs-material-2.8.0 (2018-06-10)
* Added support for grouping code blocks with tabs
* Added Material and FontAwesome icon fonts to distribution files (GDPR)
* Added note on compliance with GDPR
* Added Slovak translations
* Fixed #790: Prefixed id attributes with "__" to avoid name clashes
mkdocs-material-2.7.3 (2018-04-26)
* Added Finnish translations
mkdocs-material-2.7.2 (2018-04-09)
* Fixed rendering issue for details on Edge
mkdocs-material-2.7.1 (2018-03-21)
* Added Galician translations
* Fixed #730: Scroll chasing error on home page if Disqus is enabled
* Fixed #736: Reset drawer and search upon back button invocation
mkdocs-material-2.7.0 (2018-03-06)
* Added ability to set absolute URL for logo
* Added Hebrew translations
mkdocs-material-2.6.6 (2018-02-22)
* Added preconnect for Google Fonts for faster loading
* Fixed #710: With tabs sidebar disappears if JavaScript is not available
mkdocs-material-2.6.5 (2018-02-22)
* Reverted --dev-addr flag removal from Dockerfile
mkdocs-material-2.6.4 (2018-02-21)
* Added Catalan translations
* Fixed incorrect margins for buttons in Firefox and Safari
* Replaced package manager yarn with npm 5.6
* Reverted GitHub stars rounding method
* Removed --dev-addr flag from Dockerfile for Windows compatibility
mkdocs-material-2.6.3 (2018-02-18)
* Added Vietnamese translations
mkdocs-material-2.6.2 (2018-02-12)
* Added Arabic translations
* Fixed incorrect rounding of amount of GitHub stars
* Fixed double-layered borders for tables
mkdocs-material-2.6.1 (2018-02-11)
* Added ability to override Disqus integration using metadata
* Fixed #690: Duplicate slashes in source file URLs
* Fixed #696: Active page highlight not working with default palette
* Adjusted German translations
mkdocs-material-2.6.0 (2018-02-02)
* Moved default search configuration to default translation (English)
* Added support to automatically set text direction from translation
* Added support to disable search stop word filter in translation
* Added support to disable search trimmer in translation
* Added Persian translations
* Fixed support for Polish search
* Fixed disappearing GitHub, GitLab and Bitbucket repository icons
mkdocs-material-2.5.5 (2018-01-31)
* Added Hungarian translations
mkdocs-material-2.5.4 (2018-01-29)
* Fixed #683: gh-deploy fails inside Docker
mkdocs-material-2.5.3 (2018-01-25)
* Added Ukrainian translations
mkdocs-material-2.5.2 (2018-01-22)
* Added default search language mappings for all localizations
* Fixed #673: Error loading non-existent search language
* Fixed #675: Uncaught reference error when search plugin disabled
mkdocs-material-2.5.1 (2018-01-20)
* Fixed permalink for main headline
* Improved missing translation handling with English as a fallback
* Improved accessibility with skip-to-content link
mkdocs-material-2.5.0 (2018-01-13)
* Added support for right-to-left languages
mkdocs-material-2.4.0 (2018-01-11)
* Added focus state for clipboard buttons
* Fixed #400: Search bar steals tab focus
* Fixed search not closing on ENTER when result is selected
* Fixed search not closing when losing focus due to TAB
* Fixed collapsed navigation links getting focus
* Fixed outline being cut off on TAB focus of navigation links
* Fixed bug with first search result navigation being ignored
* Removed search result navigation via TAB (use UP and DOWN)
* Removed outline resets for links
* Improved general tabbing behavior on desktop
mkdocs-material-2.3.0 (2018-01-09)
* Added example (synonym: snippet) style for Admonition
* Added synonym abstract for summary style for Admonition
mkdocs-material-2.2.6 (2017-12-27)
* Added Turkish translations
* Fixed unclickable area below header in case JavaScript is not available
mkdocs-material-2.2.5 (2017-12-18)
* Fixed #639: Broken default favicon
mkdocs-material-2.2.4 (2017-12-18)
* Fixed #638: Build breaks with Jinja < 2.9
mkdocs-material-2.2.3 (2017-12-13)
* Fixed #630: Admonition sets padding on any last child
* Adjusted Chinese (Traditional) translations
mkdocs-material-2.2.2 (2017-12-08)
* Added Dutch translations
* Adjusted targeted link and footnote offsets
* Simplified Admonition styles and fixed padding bug
mkdocs-material-2.2.1 (2017-12-02)
* Fixed #616: Minor styling error with title-only admonition blocks
* Removed border for table of contents and improved spacing
mkdocs-material-2.2.0 (2017-11-22)
* Added support for hero teaser
* Added Portuguese translations
* Fixed #586: Footnote backref target offset regression
* Fixed #605: Search stemmers not correctly loaded
mkdocs-material-2.1.1 (2017-11-21)
* Replaced deprecated babel-preset-es2015 with babel-preset-env
* Refactored Gulp build pipeline with Webpack
* Removed right border on sidebars
* Fixed broken color transition on header
mkdocs-material-2.1.0 (2017-11-19)
* Added support for white as a primary color
* Added support for sliding site name and title
* Fixed redundant clipboard button when using line numbers on code blocks
* Improved header appearance by making it taller
* Improved tabs appearance
* Improved CSS customizability by leveraging inheritance
* Removed scroll shadows via background-attachment
* Removed breadcrumbs from header
mkdocs-material-2.0.4 (2017-11-05)
* Fixed details not opening with footnote reference
mkdocs-material-2.0.3 (2017-11-05)
* Added Japanese translations
* Fixed #540: Jumping to anchor inside details doesn't open it
* Fixed active link colors in footer
mkdocs-material-2.0.2 (2017-11-01)
* Added Russian translations
* Fixed #542: Horizontal scrollbar between 1220px and 1234px
* Fixed #553: Metadata values only rendering first character
* Fixed #558: Flash of unstyled content
* Fixed favicon regression caused by deprecation upstream
mkdocs-material-2.0.1 (2017-10-31)
* Fixed error when initializing search
* Fixed styles for link to edit the current page
* Fixed styles on nested admonition in details
mkdocs-material-2.0.0 (2017-10-31)
* Added support for MkDocs 0.17.1 theme configuration options
* Added support for easier configuration of search tokenizer
* Added support to disable search
* Added Korean translations
* Removed support for MkDocs 0.16.x [BREAKING]
mkdocs-material-1.12.2 (2017-10-26)
* Added Italian, Norwegian, French and Chinese translations
mkdocs-material-1.12.1 (2017-10-22)
* Added Polish, Swedish and Spanish translations
* Improved downward compatibility with custom partials
* Temporarily pinned MkDocs version within Docker image to 0.16.3
* Fixed #519: Missing theme configuration file
mkdocs-material-1.12.0 (2017-10-20)
* Added support for setting language(s) via mkdocs.yml
* Added support for default localization
* Added German and Danish translations
* Fixed #374: Search bar misalignment on big screens
mkdocs-material-1.11.0 (2017-10-19)
* Added localization to clipboard
* Refactored localization logic
mkdocs-material-1.10.4 (2017-10-18)
* Improved print styles of code blocks
* Improved search UX (don't close on enter if no selection)
* Fixed #495: Vertical scrollbar on short pages
mkdocs-material-1.10.3 (2017-10-11)
* Fixed #484: Vertical scrollbar on some MathJax formulas
* Fixed #483: Footnote backref target offset regression
mkdocs-material-1.10.2 (2017-10-06)
* Fixed #468: Sidebar shows scrollbar if content is shorter (in Safari)
mkdocs-material-1.10.1 (2017-09-14)
* Fixed #455: Bold code blocks rendered with normal font weight
mkdocs-material-1.10.0 (2017-09-01)
* Added support to make logo default icon configurable
* Fixed uninitialized overflow scrolling on main pane for iOS
* Fixed error in mobile navigation in case JavaScript is not available
* Fixed incorrect color transition for nested panes in mobile navigation
* Improved checkbox styles for Tasklist from PyMdown Extension package
mkdocs-material-1.9.0 (2017-08-29)
* Added info (synonym: todo) style for Admonition
* Added question (synonym: help, faq) style for Admonition
* Added support for Details from PyMdown Extensions package
* Improved Admonition styles to match Details
* Improved styles for social links in footer
* Replaced ligatures with Unicode code points to avoid broken layout
* Upgraded PyMdown Extensions package dependency to >= 3.4
mkdocs-material-1.8.1 (2017-08-07)
* Fixed #421: Missing pagination for GitHub API
mkdocs-material-1.8.0 (2017-08-02)
* Added support for lazy-loading of search results for better performance
* Added support for customization of search tokenizer/separator
* Fixed #424: Search doesn't handle capital letters anymore
* Fixed #419: Search doesn't work on whole words
mkdocs-material-1.7.5 (2017-07-25)
* Fixed #398: Forms broken due to search shortcuts
* Improved search overall user experience
* Improved search matching and highlighting
* Improved search accessibility
mkdocs-material-1.7.4 (2017-06-21)
* Fixed functional link colors in table of contents for active palette
* Fixed #368: Compatibility issues with IE11
mkdocs-material-1.7.3 (2017-06-07)
* Fixed error when setting language to Japanese for site search
mkdocs-material-1.7.2 (2017-06-06)
* Fixed offset of search box when repo_url is not set
* Fixed non-disappearing tooltip
mkdocs-material-1.7.1 (2017-06-01)
* Fixed wrong z-index order of header, overlay and drawer
* Fixed wrong offset of targeted footnote back references
mkdocs-material-1.7.0 (2017-06-01)
* Added "copy to clipboard" buttons to code blocks
* Added support for multilingual site search
* Fixed search term highlighting for non-latin languages
mkdocs-material-1.6.4 (2017-05-24)
* Fixed #337: JavaScript error for GitHub organization URLs
mkdocs-material-1.6.3 (2017-05-16)
* Fixed #329: Broken source stats for private or unknown GitHub repos
mkdocs-material-1.6.2 (2017-05-15)
* Fixed #316: Fatal error for git clone on Windows
* Fixed #320: Chrome 58 creates double underline for abbr tags
* Fixed #323: Ligatures rendered inside code blocks
* Fixed miscalculated sidebar height due to missing margin collapse
* Changed deprecated MathJax CDN to Cloudflare
mkdocs-material-1.6.1 (2017-04-23)
* Fixed following of active/focused element if search input is focused
* Fixed layer order of search component elements
mkdocs-material-1.6.0 (2017-04-22)
* Added build test for Docker image on Travis
* Added search overlay for better user experience (focus)
* Added language from localizations to html tag
* Fixed #270: Source links broken for absolute URLs
* Fixed missing top spacing for first targeted element in content
* Fixed too small footnote divider when using larger font sizes
mkdocs-material-1.5.5 (2017-04-20)
* Fixed #282: Browser search (META+F) is hijacked
mkdocs-material-1.5.4 (2017-04-08)
* Fixed broken highlighting for two or more search terms
* Fixed missing search results when only a h1 is present
* Fixed unresponsive overlay on Android
mkdocs-material-1.5.3 (2017-04-07)
* Fixed deprecated calls for template variables
* Fixed wrong palette color for focused search result
* Fixed JavaScript errors on 404 page
* Fixed missing top spacing on 404 page
* Fixed missing right spacing on overflow of source container
mkdocs-material-1.5.2 (2017-04-05)
* Added requirements as explicit dependencies in setup.py
* Fixed non-synchronized transitions in search form
mkdocs-material-1.5.1 (2017-03-30)
* Fixed rendering and offset of targetted footnotes
* Fixed #238: Link on logo is not set to site_url
mkdocs-material-1.5.0 (2017-03-24)
* Added support for localization of search placeholder
* Added keyboard events for quick access of search
* Added keyboard events for search control
* Added opacity on hover for search buttons
* Added git hook to skip CI build on non-src changes
* Fixed non-resetting search placeholder when input is cleared
* Fixed error for unescaped parentheses in search term
* Fixed #229: Button to clear search missing
* Fixed #231: Escape key doesn't exit search
* Removed old-style figures from font feature settings
mkdocs-material-1.4.1 (2017-03-16)
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
mkdocs-material-1.4.0 (2017-03-16)
* Added support for grouping searched sections by documents
* Added support for highlighting of search terms
* Added support for localization of search results
* Fixed #216: table of contents icon doesn't show if h1 is not present
* Reworked style and layout of search results for better usability
mkdocs-material-1.3.0 (2017-03-11)
* Added support for page-specific title and description using metadata
* Added support for linking source files to documentation
* Fixed jitter and offset of sidebar when zooming browser
* Fixed incorrectly initialized tablet sidebar height
* Fixed regression for #1: GitHub stars break if the repo_url ends with a '/'
* Fixed undesired white line below copyright footer due to base font scaling
* Fixed issue with whitespace in path for scripts
* Fixed #205: support non-fixed (static) header
* Refactored footnote references for better visibility
* Reduced repaints to a minimum for non-tabs configuration
* Reduced contrast of edit button (slightly)
mkdocs-material-1.2.0 (2017-03-03)
* Added quote (synonym: cite) style for Admonition
* Added help message to build pipeline
* Fixed wrong navigation link colors when applying palette
* Fixed #197: Link missing in tabs navigation on deeply nested items
* Removed unnecessary dev dependencies
mkdocs-material-1.1.1 (2017-02-26)
* Fixed incorrectly displayed nested lists when using tabs
mkdocs-material-1.1.0 (2017-02-26)
* Added tabs navigation feature (optional)
* Added Disqus integration (optional)
* Added a high resolution Favicon with the new logo
* Added static type checking using Facebook's Flow
* Fixed #173: Dictionary elements have no bottom spacing
* Fixed #175: Tables cannot be set to 100% width
* Fixed race conditions in build related to asset revisioning
* Fixed accidentally re-introduced Permalink on top-level headline
* Fixed alignment of logo in drawer on IE11
* Refactored styles related to tables
* Refactored and automated Docker build and PyPI release
* Refactored build scripts
mkdocs-material-1.0.5 (2017-02-18)
* Fixed #153: Sidebar flows out of constrained area in Chrome 56
* Fixed #159: Footer jitter due to JavaScript if content is short
mkdocs-material-1.0.4 (2017-02-16)
* Fixed #142: Documentation build errors if h1 is defined as raw HTML
* Fixed #164: PyPI release does not build and install
* Fixed offsets of targeted headlines
* Increased sidebar font size by 0.12rem
mkdocs-material-1.0.3 (2017-01-22)
* Fixed #117: Table of contents items don't blur on fast scrolling
* Refactored sidebar positioning logic
* Further reduction of repaints
mkdocs-material-1.0.2 (2017-01-15)
* Fixed #108: 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 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
mkdocs-material-0.2.4 (2016-06-26)
* Fixed improperly set default favicon
* Fixed #33: Protocol relative URL for webfonts doesn't work with file://
* Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag
* Fixed #35: Add styling for blockquotes
mkdocs-material-0.2.3 (2016-05-16)
* Fixed #25: Highlight inline fenced blocks
* Fixed #26: Better highlighting for keystrokes
* Fixed #30: Suboptimal syntax highlighting for PHP
mkdocs-material-0.2.2 (2016-03-20)
* 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
mkdocs-material-0.2.1 (2016-03-12)
* Fixed #10: Invisible header after closing search bar with ESC key
* Fixed #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
mkdocs-material-0.2.0 (2016-02-24)
* Fixed #6: Include multiple color palettes via mkdocs.yml
* Fixed #7: Better colors for links inside admonition notes and warnings
* Fixed #9: Text for prev/next footer navigation should be customizable
* Refactored templates (replaced if/else with modifiers where possible)
mkdocs-material-0.1.3 (2016-02-21)
* Fixed #3: Ordered lists within an unordered list have ::before content
* Fixed #4: Click on Logo/Title without Github-Repository: "None"
* Fixed #5: Page without headlines renders empty list in table of contents
* Moved Modernizr to top to ensure basic usability in IE8
mkdocs-material-0.1.2 (2016-02-16)
* 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
mkdocs-material-0.1.1 (2016-02-11)
* Fixed #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
mkdocs-material-0.1.0 (2016-02-09)
* Initial release

46
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://gitter.im/squidfunk/mkdocs-material. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

82
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,82 @@
# 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/squidfunk/mkdocs-material
### 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][5]. 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]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
[5]: https://squidfunk.github.io/mkdocs-material/customization/#build-process

51
Dockerfile Normal file
View File

@ -0,0 +1,51 @@
# Copyright (c) 2016-2019 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 python:3.6.8-alpine3.9
# Set build directory
WORKDIR /tmp
# Copy files necessary for build
COPY material material
COPY MANIFEST.in MANIFEST.in
COPY package.json package.json
COPY README.md README.md
COPY requirements.txt requirements.txt
COPY setup.py setup.py
# Perform build and cleanup artifacts
RUN \
apk add --no-cache \
git \
git-fast-import \
openssh \
&& python setup.py install \
&& rm -rf /tmp/*
# Set working directory
WORKDIR /docs
# Expose MkDocs development server port
EXPOSE 8000
# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2016-2019 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.

10
MANIFEST.in Normal file
View File

@ -0,0 +1,10 @@
recursive-include material *.js *.css *.html *.svg *.png *.yml
recursive-include material *.ttf *.woff *.woff2
recursive-exclude site *
recursive-exclude src *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include LICENSE
include package.json
include README.md
include requirements.txt

71
Makefile Normal file
View File

@ -0,0 +1,71 @@
# Copyright (c) 2016-2019 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.
all: clean lint | build
# -----------------------------------------------------------------------------
# Prerequisites
# -----------------------------------------------------------------------------
# Install dependencies
node_modules:
npm install
# -----------------------------------------------------------------------------
# Targets
# -----------------------------------------------------------------------------
# Build theme for distribution with Webpack
material: $(shell find src) .babelrc webpack.config.js
$(shell npm bin)/webpack --mode production
# -----------------------------------------------------------------------------
# Rules
# -----------------------------------------------------------------------------
# Build distribution files
build: node_modules material
# Clean distribution files
clean:
rm -rf material
# Lint source files
lint: node_modules
$(shell npm bin)/eslint --max-warnings 0 .
$(shell npm bin)/stylelint `find src/assets -name *.scss`
# Rebuild theme on changes with Webpack
watch-webpack: node_modules clean
$(shell npm bin)/webpack --watch
# Serve documentation with MkDocs
watch-mkdocs: clean
while [ ! -d "./material" ]; do sleep 1; done
mkdocs serve
# Run Webpack and MkDocs in watch mode
watch: node_modules watch-webpack watch-mkdocs
# -----------------------------------------------------------------------------
# Special targets
.PHONY: .FORCE build clean lint watch watch-mkdocs watch-webpack
.FORCE:

81
README.md Normal file
View File

@ -0,0 +1,81 @@
[![Travis][travis-image]][travis-link]
[![Downloads][downloads-image]][downloads-link]
[![Gitter][gitter-image]][gitter-link]
[![PyPI][pypi-image]][pypi-link]
[![dependabot][dependabot-image]][dependabot-link]
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
[downloads-image]: https://img.shields.io/pypi/dm/mkdocs-material.svg
[downloads-link]: https://pypistats.org/packages/mkdocs-material
[gitter-image]: https://badges.gitter.im/squidfunk/mkdocs-material.svg
[gitter-link]: https://gitter.im/squidfunk/mkdocs-material
[pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
[pypi-link]: https://pypi.python.org/pypi/mkdocs-material
[dependabot-image]: https://img.shields.io/badge/dependabot-enabled-06f.svg
[dependabot-link]: https://dependabot.com
# Material for MkDocs
A Material Design theme for [MkDocs][1].
[![Material for MkDocs](https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/docs/assets/images/material.png)][2]
[1]: https://www.mkdocs.org
[2]: https://squidfunk.github.io/mkdocs-material/
## Quick start
Install the latest version of Material with `pip`:
``` sh
pip install mkdocs-material
```
Append the following line to your project's `mkdocs.yml`:
``` yaml
theme:
name: 'material'
```
## What to expect
* Responsive design and fluid layout for all kinds of screens and devices,
designed to serve your project documentation in a user-friendly way in 36
languages with optimal readability.
* Easily customizable primary and accent color, fonts, favicon and logo;
straight forward localization through theme extension; integrated with Google
Analytics, Disqus and GitHub.
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
<kbd>S</kbd>), intelligent grouping of search results, search term
highlighting and lazy loading.
For detailed installation instructions and a demo, visit
https://squidfunk.github.io/mkdocs-material/
## License
**MIT License**
Copyright (c) 2016-2019 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

22
docs/authors-notes.md Normal file
View File

@ -0,0 +1,22 @@
# Author's notes
## Hi, I'm Martin ([@squidfunk][1])
I'm a freelance polyglot software engineer and entrepreneur from Cologne,
Germany with more than 12 years of experience in full-stack web development and
system programming. If you're interested in my projects, please see my [CV][2].
[1]: https://github.com/squidfunk
[2]: https://s3.eu-central-1.amazonaws.com/squidfunk/Martin+Donath+CV.pdf
## Why another theme?
Some time ago I wanted to release a project to the open, but it was in need of
user documentation. I checked out the available tools and stuck with MkDocs,
because it was so simple and easy to use. However, none of the available
themes convinced me.
I wanted to build something that was usable on all screen sizes from the ground
up, something beautiful and practical at the same time. Google's Material Design
appeared to be the perfect fit and this something became Material, a Material
Design theme for MkDocs.

47
docs/compliance.md Normal file
View File

@ -0,0 +1,47 @@
# Compliance with GDPR
## Material does not process any personal data
Material is a theme for MkDocs, a static site generator. In itself, Material
does not perform any tracking or processing of personal data. However, some of
the third-party services that Material integrates with may actually be in breach
with the [General Data Protection Regulation][1] (GDPR) and need to be evaluated
carefully.
[1]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
## Third-party services
### Google Fonts
Material makes fonts [easily configurable][2] by relying on Google Fonts CDN.
However, embedding fonts from Google is currently within a gray area as there's
no official statement or ruling regarding GDPR compliance and the topic is still
[actively discussed][3]. For this reason, if you need to ensure GDPR compliance,
you should disable the usage of the Google Font CDN with:
``` yaml
theme:
font: false
```
When Google Fonts are disabled, Material will default to **Helvetica Neue** and
**Monaco** with their corresponding fall backs, relying on system fonts. You
could however include your own, self-hosted webfont by [overriding][4] the
`fonts` block.
The icon fonts (Material and FontAwesome) are bundled with the theme, and thus
self-hosted so there's no third-party involved.
[2]: getting-started.md#font-family
[3]: https://github.com/google/fonts/issues/1495
[4]: customization.md#overriding-template-blocks
### Google Analytics and Disqus
Material comes with [Google Analytics][5] and [Disqus][6] integrations that need
to be *enabled explicitly*. Disable both integrations in order to be in
compliance with the GDPR.
[5]: getting-started.md#google-analytics
[6]: getting-started.md#disqus

82
docs/contributing.md Normal file
View File

@ -0,0 +1,82 @@
# 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/squidfunk/mkdocs-material
### 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][5]. 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]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
[5]: https://squidfunk.github.io/mkdocs-material/customization/#build-process

241
docs/customization.md Normal file
View File

@ -0,0 +1,241 @@
# Customization
## 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 great. However, as you write
your documentation, you may reach a point where some small adjustments are
necessary to preserve the desired style.
## Adding assets
[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.
[1]: https://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
```
Then, add the following line to your `mkdocs.yml`:
``` yaml
extra_css:
- 'stylesheets/extra.css'
```
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.
### Additional JavaScript
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:
``` 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]: https://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]: https://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme-custom_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 `custom_dir`:
``` yaml
theme:
name: 'material'
custom_dir: 'theme'
```
!!! warning "Theme extension prerequisites"
As the `custom_dir` variable is used for the theme extension process, the
Material theme needs to be installed via `pip` and referenced with the
`name` 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/
│ ├─ integrations/ # 3rd-party integrations
│ ├─ language/ # Localized languages
│ ├─ footer.html # Footer bar
│ ├─ header.html # Header bar
│ ├─ hero.html # Hero teaser
│ ├─ 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
│ ├─ tabs-item.html # Tabs navigation item
│ ├─ tabs.html # Tabs navigation
│ ├─ 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 |
| `disqus` | Wraps the disqus integration |
| `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 |
| `hero` | Wraps the hero teaser |
| `htmltitle` | Wraps the `<title>` tag |
| `libs` | Wraps the JavaScript libraries, e.g. Modernizr |
| `scripts` | Wraps the JavaScript application logic |
| `source` | Wraps the linked source files |
| `site_meta` | Wraps the meta tags in the document head |
| `site_nav` | Wraps the site navigation and table of contents |
| `styles` | Wraps the stylesheets (also extra sources) |
For more on this topic refer to the [MkDocs documentation][4]
[4]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
## Theme development
The Material theme uses [Webpack][5] as a build tool to leverage modern web
technologies like [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.js.org/
[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 8 is required. First, clone the repository:
``` sh
git clone https://github.com/squidfunk/mkdocs-material
```
Next, all dependencies need to be installed, which is done with:
``` sh
cd mkdocs-material
pip install -r requirements.txt
npm install
```
[8]: https://nodejs.org
### Development mode
The development server can be started with:
``` sh
npm run watch
```
This will also start the MkDocs development server which will monitor changes
on assets, templates and documentation. Point your browser to
[localhost:8000][9] 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
$md-color-primary: $clr-red-400;
$md-color-accent: $clr-teal-a700;
```
!!! warning "Automatically generated files"
Never make any changes in the `material` directory, as the contents of this
directory are automatically generated from the `src` directory and will be
overridden when the theme is built.
[9]: http://localhost:8000
### Build process
When you've finished making your changes, you can build the theme by invoking:
``` sh
npm run build
```
This triggers the production-level compilation and minification of all
stylesheets and JavaScript sources. When the command exits, 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.

View File

@ -0,0 +1,457 @@
# Admonition
[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, notes, hints or warnings.
[1]: https://python-markdown.github.io/extensions/admonition/
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- admonition
```
## Usage
Admonition blocks follow a simple syntax: every block is started with `!!!`,
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
!!! 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.
```
Result:
!!! 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 in titlecase. However,
it can easily be changed by adding a quoted string after the type qualifier.
Example:
``` markdown
!!! 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.
```
Result:
!!! 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][3], the icon and title can be omitted by
providing an empty string after the type qualifier:
Example:
``` markdown
!!! 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.
```
Result:
!!! 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][4] package adds an extension called
[SuperFences][5], which makes it possible to nest code blocks within other
blocks, respectively Admonition blocks.
[4]: https://facelessuser.github.io/pymdown-extensions
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
Example:
!!! 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.
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
Nunc eu odio eleifend, blandit leo a, volutpat sapien. Phasellus posuere in
sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis.
Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim.
### Collapsible blocks
The [Details][6] extension which is also part of the [PyMdown Extensions][4]
package adds support for rendering collapsible Admonition blocks. This is
useful for FAQs or content that is of secondary nature.
Example:
``` markdown
??? 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.
```
Result:
??? 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.
By adding a `+` sign directly after the start marker, blocks can be rendered
open by default.
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
## Types
Admonition supports user-defined type qualifiers which may influence the style
of the inserted block. Following is a list of type qualifiers provided by the
Material theme, whereas the default type, and thus fallback for unknown type
qualifiers, is `note`.
### Note
Example:
``` markdown
!!! 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.
```
Result:
!!! 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:
* `note`
* `seealso`
### Abstract
Example:
``` markdown
!!! abstract
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.
```
Result:
!!! abstract
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:
* `abstract`
* `summary`
* `tldr`
### Info
Example:
``` markdown
!!! info
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.
```
Result:
!!! info
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:
* `info`
* `todo`
### Tip
Example:
``` markdown
!!! 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.
```
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.
Qualifiers:
* `tip`
* `hint`
* `important`
### Success
Example:
``` markdown
!!! 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.
```
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.
Qualifiers:
* `success`
* `check`
* `done`
### Question
Example:
``` markdown
!!! question
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.
```
Result:
!!! question
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:
* `question`
* `help`
* `faq`
### Warning
Example:
``` markdown
!!! 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.
```
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.
Qualifiers:
* `warning`
* `caution`
* `attention`
### Failure
Example:
``` markdown
!!! 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.
```
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.
Qualifiers:
* `failure`
* `fail`
* `missing`
### Danger
Example:
``` markdown
!!! 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.
```
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.
Qualifiers:
* `danger`
* `error`
### Bug
Example:
``` markdown
!!! 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.
```
Result:
!!! 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:
* `bug`
### Example
Example:
``` markdown
!!! example
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.
```
Result:
!!! example
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:
* `example`
* `snippet`
### Quote
Example:
``` markdown
!!! quote
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.
```
Result:
!!! quote
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:
* `quote`
* `cite`

View File

@ -0,0 +1,935 @@
# CodeHilite
[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.
!!! failure "Syntax highlighting not working?"
Please ensure that [Pygments][2] is installed. See the next section for
further directions on how to set up Pygments or use the official
[Docker image][3] with all dependencies pre-installed.
[1]: https://python-markdown.github.io/extensions/code_hilite/
[2]: http://pygments.org
[3]: https://hub.docker.com/r/squidfunk/mkdocs-material/
## Installation
CodeHilite parses code blocks and wraps them in `pre` tags. If [Pygments][2]
is installed, which is a generic syntax highlighter with support for over
[300 languages][4], CodeHilite will also highlight the code block. Pygments can
be installed with the following command:
``` sh
pip install pygments
```
To enable CodeHilite, add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite
```
[4]: http://pygments.org/languages
## Usage
### Specifying the language
The CodeHilite extension uses the same syntax as regular Markdown code blocks,
but needs to know the language of the code block. This can be done in three
different ways.
#### via Markdown syntax <small>recommended</small>
In Markdown, code blocks can be opened and closed by writing three backticks on
separate lines. To add code highlighting to those blocks, the easiest way is
to specify the language directly after the opening block.
Example:
```` markdown
``` python
import tensorflow as tf
```
````
Result:
``` python
import tensorflow as tf
```
#### via Shebang
Alternatively, if the first line of a code block contains a shebang, the
language is derived from the path referenced in the shebang. This will only
work for code blocks that are indented using four spaces, not for those
encapsulated in three backticks.
Example:
```` markdown
#!/usr/bin/python
import tensorflow as tf
````
Result:
``` python
#!/usr/bin/python
import tensorflow as tf
```
#### via three colons
If the first line starts with three colons followed by a language identifier,
the first line is stripped. This will only work for code blocks that are
indented using four spaces, not for those encapsulated in three backticks.
Example:
``` markdown
:::python
import tensorflow as tf
```
Result:
:::python
import tensorflow as tf
### Adding line numbers
Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite:
linenums: true
```
Example:
```` markdown
``` python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
### Grouping code blocks
The [SuperFences][5] extension which is part of the [PyMdown Extensions][6]
package adds support for grouping code blocks with tabs. This is especially
useful for documenting projects with multiple language bindings.
Example:
````
``` bash tab="Bash"
#!/bin/bash
echo "Hello world!"
```
``` c tab="C"
#include <stdio.h>
int main(void) {
printf("Hello world!\n");
}
```
``` c++ tab="C++"
#include <iostream>
int main() {
std::cout << "Hello world!" << std::endl;
return 0;
}
```
``` c# tab="C#"
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello world!");
}
}
```
````
Result:
``` bash tab="Bash"
#!/bin/bash
echo "Hello world!"
```
``` c tab="C"
#include <stdio.h>
int main(void) {
printf("Hello world!\n");
}
```
``` c++ tab="C++"
#include <iostream>
int main() {
std::cout << "Hello world!" << std::endl;
return 0;
}
```
``` c# tab="C#"
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello world!");
}
}
```
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[6]: https://facelessuser.github.io/pymdown-extensions
### Highlighting specific lines
Specific lines can be highlighted by passing the line numbers to the `hl_lines`
argument placed right after the language identifier. Line counts start at 1.
Example:
```` markdown
``` python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
## Supported languages <small>excerpt</small>
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
``` bash
#!/bin/bash
for OPT in "$@"
do
case "$OPT" in
'-f' ) canonicalize=1 ;;
'-n' ) switchlf="-n" ;;
esac
done
# readlink -f
function __readlink_f {
target="$1"
while test -n "$target"; do
filepath="$target"
cd `dirname "$filepath"`
target=`readlink "$filepath"`
done
/bin/echo $switchlf `pwd -P`/`basename "$filepath"`
}
if [ ! "$canonicalize" ]; then
readlink $switchlf "$@"
else
for file in "$@"
do
case "$file" in
-* ) ;;
* ) __readlink_f "$file" ;;
esac
done
fi
exit $?
```
### C
``` c
extern size_t
pb_varint_scan(const uint8_t data[], size_t left) {
assert(data && left);
left = left > 10 ? 10 : left;
#ifdef __SSE2__
/* Mapping: remaining bytes ==> bitmask */
static const int mask_map[] = {
0x0000, 0x0001, 0x0003, 0x0007,
0x000F, 0x001F, 0x003F, 0x007F,
0x00FF, 0x01FF, 0x03FF
};
/* Load buffer into 128-bit integer and create high-bit mask */
__m128i temp = _mm_loadu_si128((const __m128i *)data);
__m128i high = _mm_set1_epi8(0x80);
/* Intersect and extract mask with high-bits set */
int mask = _mm_movemask_epi8(_mm_and_si128(temp, high));
mask = (mask & mask_map[left]) ^ mask_map[left];
/* Count trailing zeroes */
return mask ? __builtin_ctz(mask) + 1 : 0;
#else
/* Linear scan */
size_t size = 0;
while (data[size++] & 0x80)
if (!--left)
return 0;
return size;
#endif /* __SSE2__ */
}
```
### C++
``` cpp
Extension::
Extension(const Descriptor *descriptor, const Descriptor *scope) :
descriptor_(descriptor),
scope_(scope) {
/* Extract full name for signature */
variables_["signature"] = descriptor_->full_name();
/* Prepare message symbol */
variables_["message"] = StringReplace(
variables_["signature"], ".", "_", true);
LowerString(&(variables_["message"]));
/* Suffix scope to identifiers, if given */
string suffix ("");
if (scope_) {
suffix = scope_->full_name();
/* Check if the base and extension types are in the same package */
if (!scope_->file()->package().compare(descriptor_->file()->package()))
suffix = StripPrefixString(suffix,
scope_->file()->package() + ".");
/* Append to signature */
variables_["signature"] += ".[" + suffix +"]";
suffix = "_" + suffix;
}
/* Prepare extension symbol */
variables_["extension"] = StringReplace(
suffix, ".", "_", true);
LowerString(&(variables_["extension"]));
}
```
### C&#35;
``` csharp
public static void Send(
Socket socket, byte[] buffer, int offset, int size, int timeout) {
int startTickCount = Environment.TickCount;
int sent = 0;
do {
if (Environment.TickCount > startTickCount + timeout)
throw new Exception("Timeout.");
try {
sent += socket.Send(buffer, offset + sent,
size - sent, SocketFlags.None);
} catch (SocketException ex) {
if (ex.SocketErrorCode == SocketError.WouldBlock ||
ex.SocketErrorCode == SocketError.IOPending ||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable) {
/* Socket buffer is probably full, wait and try again */
Thread.Sleep(30);
} else {
throw ex;
}
}
} while (sent < size);
}
```
### Clojure
``` clojure
(clojure-version)
(defn partition-when
[f]
(fn [rf]
(let [a (java.util.ArrayList.)
fval (volatile! false)]
(fn
([] (rf))
([result]
(let [result (if (.isEmpty a)
result
(let [v (vec (.toArray a))]
;; Clear first
(.clear a)
(unreduced (rf result v))))]
(rf result)))
([result input]
(if-not (and (f input) @fval)
(do
(vreset! fval true)
(.add a input)
result)
(let [v (vec (.toArray a))]
(.clear a)
(let [ret (rf result v)]
(when-not (reduced? ret)
(.add a input))
ret))))))))
(into [] (partition-when
#(.startsWith % ">>"))
["1d" "33" ">> 1" ">> 2" "22" ">> 3"])
```
### Diff
``` diff
Index: grunt.js
===================================================================
--- grunt.js (revision 31200)
+++ grunt.js (working copy)
@@ -12,6 +12,7 @@
module.exports = function (grunt) {
+ console.log('hello world');
// Project configuration.
grunt.initConfig({
lint: {
@@ -19,10 +20,6 @@
'packages/services.web/{!(test)/**/,}*.js',
'packages/error/**/*.js'
],
- scripts: [
- 'grunt.js',
- 'db/**/*.js'
- ],
browser: [
'packages/web/server.js',
'packages/web/server/**/*.js',
```
### Docker
``` docker
FROM ubuntu
# Install vnc, xvfb in order to create a 'fake' display and firefox
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
RUN mkdir ~/.vnc
# Setup a password
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Autostart firefox (might not be the best way, but it does the trick)
RUN bash -c 'echo "firefox" >> /.bashrc'
EXPOSE 5900
CMD ["x11vnc", "-forever", "-usepw", "-create"]
```
### Elixir
``` elixir
require Logger
def accept(port) do
{:ok, socket} = :gen_tcp.listen(port,
[:binary, packet: :line, active: false, reuseaddr: true])
Logger.info "Accepting connections on port #{port}"
loop_acceptor(socket)
end
defp loop_acceptor(socket) do
{:ok, client} = :gen_tcp.accept(socket)
serve(client)
loop_acceptor(socket)
end
defp serve(socket) do
socket
|> read_line()
|> write_line(socket)
serve(socket)
end
defp read_line(socket) do
{:ok, data} = :gen_tcp.recv(socket, 0)
data
end
defp write_line(line, socket) do
:gen_tcp.send(socket, line)
end
```
### Erlang
``` erlang
circular(Defs) ->
[ { { Type, Base }, Fields } ||
{ { Type, Base }, Fields } <- Defs, Type == msg, circular(Base, Defs) ].
circular(Base, Defs) ->
Fields = proplists:get_value({ msg, Base }, Defs),
circular(Defs, Fields, [Base]).
circular(_Defs, [], _Path) ->
false;
circular(Defs, [Field | Fields], Path) ->
case Field#field.type of
{ msg, Type } ->
case lists:member(Type, Path) of
false ->
Children = proplists:get_value({ msg, Type }, Defs),
case circular(Defs, Children, [Type | Path]) of
false -> circular(Defs, Fields, Path);
true -> true
end;
true ->
Type == lists:last(Path) andalso
(length(Path) == 1 orelse not is_tree(Path))
end;
_ ->
circular(Defs, Fields, Path)
end.
```
### F&#35;
``` fsharp
/// Asynchronously download retangles from the server
/// and decode the JSON format to F# Rectangle record
let [<Js>] getRectangles () : Async<Rectangle[]> = async {
let req = XMLHttpRequest()
req.Open("POST", "/get", true)
let! resp = req.AsyncSend()
return JSON.parse(resp) }
/// Repeatedly update rectangles after 0.5 sec
let [<Js>] updateLoop () = async {
while true do
do! Async.Sleep(500)
let! rects = getRectangles()
cleanRectangles()
rects |> Array.iter createRectangle }
```
### Go
``` go
package main
import "fmt"
func counter(id int, channel chan int, closer bool) {
for i := 0; i < 10000000; i++ {
fmt.Println("process", id," send", i)
channel <- 1
}
if closer { close(channel ) }
}
func main() {
channel := make(chan int)
go counter(1, channel, false)
go counter(2, channel, true)
x := 0
// receiving data from channel
for i := range channel {
fmt.Println("receiving")
x += i
}
fmt.Println(x)
}
```
### HTML
``` html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>HTML5 Boilerplate</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<p>Hello world! This is HTML5 Boilerplate.</p>
</body>
</html>
```
### Java
``` java
import java.util.LinkedList;
import java.lang.reflect.Array;
public class UnsortedHashSet<E> {
private static final double LOAD_FACTOR_LIMIT = 0.7;
private int size;
private LinkedList<E>[] con;
public UnsortedHashSet() {
con = (LinkedList<E>[])(new LinkedList[10]);
}
public boolean add(E obj) {
int oldSize = size;
int index = Math.abs(obj.hashCode()) % con.length;
if (con[index] == null)
con[index] = new LinkedList<E>();
if (!con[index].contains(obj)) {
con[index].add(obj);
size++;
}
if (1.0 * size / con.length > LOAD_FACTOR_LIMIT)
resize();
return oldSize != size;
}
private void resize() {
UnsortedHashSet<E> temp = new UnsortedHashSet<E>();
temp.con = (LinkedList<E>[])(new LinkedList[con.length * 2 + 1]);
for (int i = 0; i < con.length; i++) {
if (con[i] != null)
for (E e : con[i])
temp.add(e);
}
con = temp.con;
}
public int size() {
return size;
}
}
```
### JavaScript
``` javascript
var Math = require('lib/math');
var _extends = function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
var e = exports.e = 2.71828182846;
exports['default'] = function (x) {
return Math.exp(x);
};
module.exports = _extends(exports['default'], exports);
```
### JSON
``` json
{
"name": "mkdocs-material",
"version": "0.2.4",
"description": "A Material Design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
],
"license": "MIT",
"main": "Gulpfile.js",
"scripts": {
"start": "./node_modules/.bin/gulp watch --mkdocs",
"build": "./node_modules/.bin/gulp build --production"
}
...
}
```
### Julia
``` julia
using MXNet
mlp = @mx.chain mx.Variable(:data) =>
mx.FullyConnected(name=:fc1, num_hidden=128) =>
mx.Activation(name=:relu1, act_type=:relu) =>
mx.FullyConnected(name=:fc2, num_hidden=64) =>
mx.Activation(name=:relu2, act_type=:relu) =>
mx.FullyConnected(name=:fc3, num_hidden=10) =>
mx.SoftmaxOutput(name=:softmax)
# data provider
batch_size = 100
include(Pkg.dir("MXNet", "examples", "mnist", "mnist-data.jl"))
train_provider, eval_provider = get_mnist_providers(batch_size)
# setup model
model = mx.FeedForward(mlp, context=mx.cpu())
# optimization algorithm
optimizer = mx.SGD(lr=0.1, momentum=0.9)
# fit parameters
mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
```
### Lua
``` lua
local ffi = require("ffi")
ffi.cdef[[
void Sleep(int ms);
int poll(struct pollfd *fds, unsigned long nfds, int timeout);
]]
local sleep
if ffi.os == "Windows" then
function sleep(s)
ffi.C.Sleep(s*1000)
end
else
function sleep(s)
ffi.C.poll(nil, 0, s * 1000)
end
end
for i = 1,160 do
io.write("."); io.flush()
sleep(0.01)
end
io.write("\n")
```
### MySQL
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
### PHP
``` php
<?php
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
class LuckyController {
/**
* @Route("/lucky/number")
*/
public function numberAction() {
$number = mt_rand(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}
```
### Protocol Buffers
``` proto
syntax = "proto2";
package caffe;
// Specifies the shape (dimensions) of a Blob.
message BlobShape {
repeated int64 dim = 1 [packed = true];
}
message BlobProto {
optional BlobShape shape = 7;
repeated float data = 5 [packed = true];
repeated float diff = 6 [packed = true];
// 4D dimensions -- deprecated. Use "shape" instead.
optional int32 num = 1 [default = 0];
optional int32 channels = 2 [default = 0];
optional int32 height = 3 [default = 0];
optional int32 width = 4 [default = 0];
}
```
### Python
``` python
"""
A very simple MNIST classifier.
See extensive documentation at
http://tensorflow.org/tutorials/mnist/beginners/index.md
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Import data
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('data_dir', '/tmp/data/', 'Directory for storing data')
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
sess = tf.InteractiveSession()
# Create the model
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
```
### Ruby
``` ruby
require 'finity/event'
require 'finity/machine'
require 'finity/state'
require 'finity/transition'
require 'finity/version'
module Finity
class InvalidCallback < StandardError; end
class MissingCallback < StandardError; end
class InvalidState < StandardError; end
# Class methods to be injected into the including class upon inclusion.
module ClassMethods
# Instantiate a new state machine for the including class by accepting a
# block with state and event (and subsequent transition) definitions.
def finity options = {}, &block
@finity ||= Machine.new self, options, &block
end
# Return the names of all registered states.
def states
@finity.states.map { |name, _| name }
end
# Return the names of all registered events.
def events
@finity.events.map { |name, _| name }
end
end
# Inject methods into the including class upon inclusion.
def self.included base
base.extend ClassMethods
end
end
```
### XML
``` xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mainTag SYSTEM "some.dtd" [ENTITY % entity]>
<?oxygen RNGSchema="some.rng" type="xml"?>
<xs:main-Tag xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is a sample comment -->
<childTag attribute="Quoted Value" another-attribute='Single quoted value'
a-third-attribute='123'>
<withTextContent>Some text content</withTextContent>
<withEntityContent>Some text content with &lt;entities&gt; and
mentioning uint8_t and int32_t</withEntityContent>
<otherTag attribute='Single quoted Value'/>
</childTag>
<![CDATA[ some CData ]]>
</main-Tag>
```

View File

@ -0,0 +1,84 @@
# Footnotes
[Footnotes][1] is another extension included in the standard Markdown library.
As the name says, it adds the ability to add footnotes to your documentation.
[1]: https://python-markdown.github.io/extensions/footnotes/
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- footnotes
```
## Usage
The markup for footnotes is similar to the standard Markdown markup for links.
A reference is inserted in the text, which can then be defined at any point in
the document.
### Inserting the reference
The footnote reference is enclosed in square brackets and starts with a caret,
followed by an arbitrary label which may contain numeric identifiers [1, 2, 3,
...] or names [Granovetter et al. 1998]. The rendered references are always
consecutive superscripted numbers.
Example:
``` markdown
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
```
Result:
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
### Inserting the content
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.
#### on a single line
Short statements can be written on the same line.
Example:
``` markdown
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```
Result:
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#### on multiple lines
Paragraphs should be written on the next line. As with all Markdown blocks, the
content must be indented by four spaces.
Example:
``` markdown
[^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.
```
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.
<a href="#fn:2">Jump to footnote at the bottom of the page</a>

134
docs/extensions/metadata.md Normal file
View File

@ -0,0 +1,134 @@
hero: Metadata enables hero teaser texts
path: tree/master/docs/extensions
source: metadata.md
# Metadata
The [Metadata][1] extension makes it possible to add metadata to a document
which gives more control over the theme in a page-specific context.
[1]: https://python-markdown.github.io/extensions/meta_data/
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- meta
```
## Usage
Metadata is written as a series of key-value pairs at the beginning of the
Markdown document, delimited by a blank line which ends the metadata context.
Naturally, the metadata is stripped from the document before rendering the
actual page content and made available to the theme.
Example:
``` markdown
title: Lorem ipsum dolor sit amet
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
path: path/to/file
source: file.js
# Headline
...
```
See the next section which covers the metadata that is supported by Material.
### Setting a hero text
Material exposes a simple text-only page-local hero via Metadata, as you can
see on the current page when you scroll to the top. It's as simple as:
``` markdown
hero: Metadata enables hero teaser texts
```
### Linking sources
When a document is related to a specific set of source files and the `repo_url`
is defined inside the project's `mkdocs.yml`, the files can be linked using the
`source` key:
``` markdown
source: file.js
```
The filename is appended to the `repo_url` set in your `mkdocs.yml`, but can
be prefixed with a `path` to ensure correct path resolving:
Example:
``` markdown
path: tree/master/docs/extensions
source: metadata.md
```
Result:
See the [source][2] section for the resulting output.
[2]: #__source
### Redirecting to another page
It's sometimes necessary to move documents around in the navigation tree and
redirect user from the old URL to the new one. The `redirect` meta-tag allows
to create a redirection from the current document to the address specified in
the tag.
For instance, if your document contains:
``` markdown
redirect: /new/url
```
accessing that document's URL will automatically redirect to `/new/url`.
### Overrides
#### Page title
The page title can be overridden on a per-document level:
``` markdown
title: Lorem ipsum dolor sit amet
```
This will set the `title` tag inside the document `head` for the current page
to the provided value. It will also override the default behavior of Material
for MkDocs which appends the site title using a dash as a separator to the page
title.
#### Page description
The page description can also be overridden on a per-document level:
``` yaml
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
```
This will set the `meta` tag containing the site description inside the
document `head` for the current page to the provided value.
#### Disqus
As describe in the [getting started guide][3], the Disqus comments section can
be enabled on a per-document level:
``` markdown
disqus: your-shortname
```
Disqus can be disabled for a specific page by setting it to an empty value:
``` markdown
disqus:
```
[3]: ../getting-started.md#disqus

View File

@ -0,0 +1,33 @@
# Permalinks
Permalinks are a feature of the [Table of Contents][1] extension, which is part
of the standard Markdown library. The extension inserts an anchor at the end of
each headline, which makes it possible to directly link to a subpart of the
document.
[1]: https://python-markdown.github.io/extensions/toc/
## Installation
To enable permalinks, add the following to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- toc:
permalink: true
```
This will add a link containing the paragraph symbol `¶` at the end of each
headline (exactly like on the page you're currently viewing), which the
Material theme will make appear on hover. In order to change the text of the
permalink, a string can be passed, e.g.:
``` markdown
markdown_extensions:
- toc:
permalink: Link
```
## Usage
When enabled, permalinks are inserted automatically.

289
docs/extensions/pymdown.md Normal file
View File

@ -0,0 +1,289 @@
# 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.details
- 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
### Arithmatex <small>MathJax</small>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script>
[Arithmatex][2] integrates Material with [MathJax][3] which parses
block-style and inline equations written in TeX markup and outputs them in
mathematical notation. See [this thread][4] 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][5]:
``` yaml
extra_javascript:
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/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://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
```
[2]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
[3]: https://www.mathjax.org/
[4]: http://meta.math.stackexchange.com/questions/5020/
[5]: ../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)}$
### BetterEm
[BetterEm][6] 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][7].
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
[7]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
### Caret
[Caret][8] makes it possible to highlight ^^inserted text^^. The portion of
text that should be marked as added must be enclosed in two carets `^^...^^`.
[8]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
### Critic
[Critic][9] implements [Critic Markup][10], 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.
==}
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/
[10]: http://criticmarkup.com/
### Details
[Details][11] adds collapsible [Admonition-style blocks][12] which can contain
arbitrary content using the HTML5 `details` and `summary` tags. Additionally,
all Admonition qualifiers can be used, e.g. `note`, `question`, `warning` etc.:
??? question "How many Prolog programmers does it take to change a lightbulb?"
Yes.
[11]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
[12]: admonition.md
### Emoji
[Emoji][13] adds the ability to insert a :shit:-load of emojis that we use in
our daily lives. See the [EmojiOne demo][14] for a list of all available
emojis. Happy scrolling :tada:
!!! warning "Legal disclaimer"
Material has no affiliation with [EmojiOne][15] which is released under
[CC BY 4.0][16]. When including EmojiOne images or CSS, please read the
[EmojiOne license][17] to ensure proper usage and attribution.
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
[14]: https://emoji.codes/
[15]: http://emojione.com
[16]: https://creativecommons.org/licenses/by/4.0/legalcode
[17]: http://emojione.com/licensing/
### InlineHilite
[InlineHilite][18] 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
achieved by prefixing inline code with a shebang and language identifier,
e.g. `#!js`.
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
### MagicLink
[MagicLink][19] 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.
[19]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
### Mark
[Mark][20] adds the ability to ==highlight text== like it was marked with a
==text marker==. The portion of text that should be highlighted must be
enclosed in two equal signs `==...==`.
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
### SmartSymbols
[SmartSymbols][21] 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, ...).
[21]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
### SuperFences
[SuperFences][22] provides the ability to nest code blocks under blockquotes,
lists and other block elements, which the [Fenced Code Blocks][23] extension
from the standard Markdown library doesn't parse correctly.
SuperFences does also allow [grouping code blocks with tabs][24].
[22]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[23]: https://python-markdown.github.io/extensions/fenced_code_blocks/
[24]: codehilite.md#grouping-code-blocks
### Tasklist
[Tasklist][25] 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
[25]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
### Tilde
[Tilde][26] 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.
[26]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/

738
docs/getting-started.md Normal file
View File

@ -0,0 +1,738 @@
# Getting started
## Installation
### Installing MkDocs
Before installing [MkDocs][1], 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.13
pip --version
# pip 9.0.1
```
Installing and verifying MkDocs is as simple as:
``` sh
pip install mkdocs && mkdocs --version
# mkdocs, version 0.17.1
```
Material requires MkDocs >= 0.17.1.
[1]: https://www.mkdocs.org
### Installing Material
#### using pip
Material can be installed with `pip`:
``` sh
pip install mkdocs-material
```
#### using choco
If you're on Windows you can use [Chocolatey][2] to install [Material][3]:
``` dos
choco install mkdocs-material
```
This will install all required dependencies like [Python][4] and [MkDocs][5].
[2]: https://chocolatey.org
[3]: https://chocolatey.org/packages/mkdocs-material
[4]: https://chocolatey.org/packages/python
[5]: 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][6] and
[override some parts][7] of the theme. The theme will reside in the folder
`mkdocs-material/material`.
[6]: customization.md#extending-the-theme
[7]: customization.md#overriding-partials
### Troubleshooting
!!! warning "Installation on macOS"
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 for this:
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`.
!!! failure "Error: unrecognized theme 'material'"
If you run into this error, the most common reason is that you installed
MkDocs through some package manager (e.g. Homebrew or `apt-get`) and the
Material theme through `pip`, so both packages end up in different
locations. MkDocs only checks its install location for themes.
### Alternative: Using Docker
If you're familiar with Docker, the official [Docker image][8] 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. Pull it with:
```
docker pull squidfunk/mkdocs-material
```
The `mkdocs` executable is provided as an entrypoint, `serve` is the default
command. Start the development server in your project root with:
```
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
```
If you're using Windows command prompt (`cmd.exe`), substitute `${PWD}` with
`"%cd%"`.
[8]: https://hub.docker.com/r/squidfunk/mkdocs-material/
## Usage
In order to enable the theme just add one of the following lines to your
project's `mkdocs.yml`. If you installed Material using a package manager:
``` yaml
theme:
name: 'material'
```
If you cloned Material from GitHub:
``` yaml
theme:
name: null
custom_dir: 'mkdocs-material/material'
```
MkDocs includes a development server, so you can review your changes as you go.
The development server can be started with the following command:
``` sh
mkdocs serve
```
Now you can point your browser to [http://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.
[9]: http://localhost:8000
## Configuration
### Color palette
A default hue is defined for every primary and accent color on Google's
Material Design [color palette][10], which makes it very easy to change the
overall look of the theme. Just set the primary and accent colors using the
following variables:
``` yaml
theme:
palette:
primary: 'indigo'
accent: 'indigo'
```
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`, `blue grey` and
`white`. The last four colors can only be used as a primary color.
If the color is set via this configuration, an additional CSS file that
defines the color palette is automatically 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
> Default: `indigo`
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>
<button data-md-color-primary="white">White</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
> Default: `indigo`
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>
### Font family
> Default: `Roboto` and `Roboto Mono`
By default the [Roboto font family][12] is included with the theme, specifically
the regular sans-serif type for text and the `monospaced` type for code. Both
fonts are loaded from [Google Fonts][13] and can be changed to other fonts,
like for example the [Ubuntu font family][14]:
``` yaml
theme:
font:
text: 'Ubuntu'
code: 'Ubuntu Mono'
```
The text font will be loaded in 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 `font` to `false`:
``` yaml
theme:
font: false
```
[12]: https://fonts.google.com/specimen/Roboto
[13]: https://fonts.google.com
[14]: https://fonts.google.com/specimen/Ubuntu
### Logo
> Default icon: `school`
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
theme:
logo: 'images/logo.svg'
```
Additionally, the default icon can be changed by setting an arbitrary ligature
(or Unicode code point) from the [Material Design icon font][15], e.g.
``` yaml
theme:
logo:
icon: 'cloud'
```
[15]: https://material.io/icons/
### Language
!!! info "Call for Contributions: Add languages/translations to Material"
Help translate Material into more languages - it's just **one click** and
takes approximately **2 minutes**: [click here](http://bit.ly/2EbzFc8)
#### Localization
> Default: `en`
Material for MkDocs supports internationalization (i18n) and provides
translations for all template variables and labels in the following languages:
<table style="white-space: nowrap;">
<thead>
<tr>
<th colspan="4">Available languages</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>ar</code> / Arabic</td>
<td><code>ca</code> / Catalan</td>
<td><code>cs</code> / Czech</td>
<td><code>da</code> / Danish</td>
</tr>
<tr>
<td><code>nl</code> / Dutch</td>
<td><code>en</code> / English</td>
<td><code>fi</code> / Finnish</td>
<td><code>fr</code> / French</td>
</tr>
<tr>
<td><code>gl</code> / Galician</td>
<td><code>de</code> / German</td>
<td><code>gr</code> / Greek</td>
<td><code>he</code> / Hebrew</td>
</tr>
<tr>
<td><code>hi</code> / Hindi</td>
<td><code>hr</code> / Croatian</td>
<td><code>hu</code> / Hungarian</td>
<td><code>id</code> / Indonesian</td>
</tr>
<tr>
<td><code>it</code> / Italian</td>
<td><code>ja</code> / Japanese</td>
<td><code>kr</code> / Korean</td>
<td><code>no</code> / Norwegian</td>
</tr>
<tr>
<td colspan="2"><code>nn</code> / Norwegian (Nynorsk)</td>
<td><code>fa</code> / Persian</td>
<td><code>pl</code> / Polish</td>
</tr>
<tr>
<td><code>pt</code> / Portugese</td>
<td><code>ru</code> / Russian</td>
<td><code>sr</code> / Serbian</td>
<td><code>sh</code> / Serbo-Croatian</td>
</tr>
<tr>
<td><code>sk</code> / Slovak</td>
<td><code>es</code> / Spanish</td>
<td><code>sv</code> / Swedish</td>
<td><code>tr</code> / Turkish</td>
</tr>
<tr>
<td><code>uk</code> / Ukrainian</td>
<td><code>vi</code> / Vietnamese</td>
<td colspan="2">
<code>zh</code> / Chinese (Simplified)
</td>
</tr>
<tr>
<td colspan="2">
<code>zh-Hant</code> / Chinese (Traditional)
</td>
<td colspan="2"><code>zh-TW</code> / Chinese (Taiwanese)</td>
</tr>
<tr>
<td colspan="4" align="right">
<a href="http://bit.ly/2EbzFc8">Submit a new language</a>
</td>
</tr>
</tbody>
</table>
Specify the language with:
``` yaml
theme:
language: 'en'
```
If the language is not specified, Material falls back to English. To create a
translation for another language, copy the localization file of an existing
language, name the new file using the [2-letter language code][16] and adjust
all translations:
``` sh
cp partials/language/en.html partials/language/jp.html
```
[16]: https://www.w3schools.com/tags/ref_language_codes.asp
#### Text direction
> Default: best match for given theme language, automatically set
Material supports both, left-to-right (`ltr`) and right-to-left (`rtl`) text
direction. This enables more languages like Arabic, Hebrew, Syriac and others
to be used with the theme:
``` yaml
theme:
direction: 'rtl'
```
#### Site search
> Default: best match for given theme language, automatically set
Site search is implemented using [lunr.js][17], which includes stemmers for the
English language by default, while stemmers for other languages are included
with [lunr-languages][18], both of which are integrated with this theme.
Material selects the matching (or best-matching) stemmer for the given theme
language. Multilingual search can be activated in your project's `mkdocs.yml`
by explicitly defining the search language(s):
``` yaml
extra:
search:
language: 'en, de, ru'
```
At the time of writing, the following languages are supported:
<table style="white-space: nowrap;">
<thead>
<tr>
<th colspan="4">Available language stemmers</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>da</code> / Danish</td>
<td><code>du</code> / Dutch</td>
<td><code>en</code> / English</td>
<td><code>fi</code> / Finnish</td>
</tr>
<tr>
<td><code>fr</code> / French</td>
<td><code>de</code> / German</td>
<td><code>hu</code> / Hungarian</td>
<td><code>it</code> / Italian</td>
</tr>
<tr>
<td><code>ja</code> / Japanese</td>
<td><code>no</code> / Norwegian</td>
<td><code>pt</code> / Portugese</td>
<td><code>ro</code> / Romanian</td>
</tr>
<tr>
<td><code>ru</code> / Russian</td>
<td><code>es</code> / Spanish</td>
<td><code>sv</code> / Swedish</td>
<td><code>tr</code> / Turkish</td>
</tr>
</tbody>
</table>
!!! warning "MkDocs 1.0 compatibility"
While MkDocs 1.0 supports prebuilding the search index, Material currently
doesn't support this setting as the default search behavior of the original
theme was heavily modified for the sake of a better UX. Integration is
possible, but a small subset of the features Material provides will not be
portable to the prebuilt index mainly due to missing localization.
!!! warning "Only specify the languages you really need"
Be aware that including support for other languages increases the general
JavaScript payload by around 20kb (without gzip) and by another 15-30kb per
language.
The separator for tokenization can be customized which makes it possible
to index parts of words that are separated by `-` or `.`:
``` yaml
extra:
search:
tokenizer: '[\s\-\.]+'
```
[17]: https://lunrjs.com
[18]: https://github.com/MihaiValentin/lunr-languages
### Favicon
> Default: `assets/images/favicon.png`
The default favicon can be changed by setting the `favicon` variable to an
`.ico` or image file:
``` yaml
theme:
favicon: 'assets/images/favicon.ico'
```
### Features
#### Tabs
> Default: `false`
By default, the entire navigation is rendered on the left side using collapsible
sections (different from the default MkDocs theme which renders the top-level
sections in the header), because horizontal navigation is often problematic on
smaller screens. However, for large documentation projects it's sometimes
desirable to add another navigation layer to separate top-level sections.
Material achieves this with the tabs feature, which can be enabled by setting
the respective feature flag to `true`:
``` yaml
theme:
feature:
tabs: true
```
When tabs are enabled, *top-level sections* will be rendered in an additional
layer directly below the header. The navigation on the left side will only
include the pages contained within the selected section. Furthermore, *top-level
pages* defined inside your project's `mkdocs.yml` will be grouped under the
first tab which will receive the title of the first page.
## Customization
### Adding a source repository
To include a link to the repository of your project within your documentation,
set the following variables via your project's `mkdocs.yml`:
``` yaml
repo_name: 'squidfunk/mkdocs-material'
repo_url: 'https://github.com/squidfunk/mkdocs-material'
```
The name of the repository will be rendered next to the search bar on big
screens and as part of the main navigation drawer on smaller screen sizes.
Furthermore, if `repo_url` points to a GitHub, BitBucket or GitLab repository,
the respective service logo will be shown next to the name of the repository.
Additionally, for GitHub, the number of stars and forks is shown.
If the repository is hosted in a private environment, the service logo can be
set explicitly by setting `extra.repo_icon` to `github`, `gitlab` or
`bitbucket`.
!!! question "Why is there an edit button at the top of every article?"
If the `repo_url` is set to a GitHub or BitBucket repository, and the
`repo_name` is set to *GitHub* or *BitBucket* (implied by default), an
edit button will appear at the top of every article. This is the automatic
behavior that MkDocs implements. See the [MkDocs documentation][19] on more
guidance regarding the `edit_uri` attribute, which defines whether the edit
button is shown or not.
[19]: https://www.mkdocs.org/user-guide/configuration/#edit_uri
### Adding social links
Social accounts can be linked in the footer of the documentation using the
automatically included [FontAwesome][20] webfont. 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:
social:
- type: 'github'
link: 'https://github.com/squidfunk'
- type: 'twitter'
link: 'https://twitter.com/squidfunk'
- type: 'linkedin'
link: 'https://linkedin.com/in/squidfunk'
```
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`.
[20]: http://fontawesome.io/icons/
### Adding a Web App Manifest
A [Web App Manifest][21] is a simple JSON file that tells the browser about your
web application and how it should behave when installed on the user's mobile
device or desktop. You can specify a manifest in your `mkdocs.yml`:
```yaml
extra:
manifest: 'manifest.webmanifest'
```
[21]: https://developers.google.com/web/fundamentals/web-app-manifest/
### More advanced customization
If you want to change the general appearance of the Material theme, see
[this article][22] for more information on advanced customization.
[22]: customization.md
## Integrations
### Google Analytics
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:
- 'UA-XXXXXXXX-X'
- 'auto'
```
### Disqus
Material for MkDocs is integrated with [Disqus][23], so if you want to add a
comments section to your documentation set the shortname of your Disqus project
in your `mkdocs.yml`:
``` yaml
extra:
disqus: 'your-shortname'
```
The comments section is inserted on *every page, except the index page*.
Additionally, a new entry at the bottom of the table of contents is generated
that is linking to the comments section. The necessary JavaScript is
automatically included.
!!! warning "Requirements"
`site_url` value must be set in `mkdocs.yml` for the Disqus integration to
load properly.
Disqus can also be enabled or disabled for specific pages using [Metadata][24].
[23]: https://disqus.com
[24]: extensions/metadata.md#disqus
## Extensions
MkDocs supports several [Markdown extensions][25]. 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
```
For more information, see the following list of extensions supported by the
Material theme including more information regarding installation and usage:
* [Admonition][26]
* [Codehilite][27]
* [Footnotes][28]
* [Metadata][29]
* [Permalinks][30]
* [PyMdown Extensions][31]
[25]: https://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[26]: extensions/admonition.md
[27]: extensions/codehilite.md
[28]: extensions/footnotes.md
[29]: extensions/metadata.md
[30]: extensions/permalinks.md
[31]: extensions/pymdown.md
## Full example
Below is a full example configuration for a `mkdocs.yml`:
``` yaml
# Project information
site_name: 'Material for MkDocs'
site_description: 'A Material Design theme for MkDocs'
site_author: 'Martin Donath'
site_url: 'https://squidfunk.github.io/mkdocs-material/'
# Repository
repo_name: 'squidfunk/mkdocs-material'
repo_url: 'https://github.com/squidfunk/mkdocs-material'
# Copyright
copyright: 'Copyright &copy; 2016 - 2017 Martin Donath'
# Configuration
theme:
name: 'material'
language: 'en'
palette:
primary: 'indigo'
accent: 'indigo'
font:
text: 'Roboto'
code: 'Roboto Mono'
# Customization
extra:
manifest: 'manifest.webmanifest'
social:
- type: 'github'
link: 'https://github.com/squidfunk'
- type: 'twitter'
link: 'https://twitter.com/squidfunk'
- type: 'linkedin'
link: 'https://linkedin.com/in/squidfunk'
# Google Analytics
google_analytics:
- 'UA-XXXXXXXX-X'
- 'auto'
# Extensions
markdown_extensions:
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: true
```

45
docs/index.md Normal file
View File

@ -0,0 +1,45 @@
# Material <small>for MkDocs</small>
## Create beautiful project documentation
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 for MkDocs](assets/images/material.png)](assets/images/material.png)
[1]: https://www.mkdocs.org
[2]: https://material.io/guidelines/material-design/
## Quick start
Install the latest version of Material with `pip`:
``` sh
pip install mkdocs-material
```
Append the following line to your project's `mkdocs.yml`:
``` yaml
theme:
name: 'material'
```
## What to expect
* Responsive design and fluid layout for all kinds of screens and devices,
designed to serve your project documentation in a user-friendly way in 36
languages with optimal readability.
* Easily customizable primary and accent color, fonts, favicon and logo;
straight forward localization through theme extension; integrated with Google
Analytics, Disqus and GitHub.
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
<kbd>S</kbd>), intelligent grouping of search results, search term
highlighting and lazy loading.
For detailed instructions see the [getting started guide][3].
[3]: getting-started.md

23
docs/license.md Normal file
View File

@ -0,0 +1,23 @@
# License
**MIT License**
Copyright &copy; 2016 - 2019 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

727
docs/release-notes.md Normal file
View File

@ -0,0 +1,727 @@
# Release notes
## Upgrading
To upgrade Material to the latest version, use `pip`:
``` sh
pip install --upgrade mkdocs-material
```
To inspect the currently installed version, use the following command:
``` sh
pip show mkdocs-material
```
### Material 3.x to 4.x
* Material for MkDocs 4.x finally fixes incorrect layout on Chinese systems.
The fix includes a mandatory change of the base font-size from `10px` to
`20px` which means all `rem` values needed to be updated. Within the theme,
`px` to `rem` calculation is now encapsulated in a new function called
`px2rem` which is part of the SASS code base.
* If you use Material with custom CSS that is based on `rem` values, note that
those values must now be divided by 2. Now, `1.0rem` doesn't map to `10px`,
but `20px`. To learn more about the problem and implications, please refer
to [the issue][2] in which the problem was discovered and fixed.
[2]: https://github.com/squidfunk/mkdocs-material/issues/911
### Material 2.x to 3.x
* Material for MkDocs 3.x requires MkDocs 1.0 because the way paths are resolved
internally changed significantly. Furthermore, `pages` was renamed to `nav`,
so remember to adjust your `mkdocs.yml` file.
* All extended templates *should* continue to work but in order to make them
future-proof the `url` filter should be introduced on all paths. Please see
the [official release notes][1] for further guidance.
[1]: https://www.mkdocs.org/about/release-notes/#version-10-2018-08-03
### Material 1.x to 2.x
* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
changes to the way themes can define options. The following variables inside
your project's `mkdocs.yml` need to be renamed:
* `extra.feature` becomes `theme.feature`
* `extra.palette` becomes `theme.palette`
* `extra.font` becomes `theme.font`
* `extra.logo` becomes `theme.logo`
* Favicon support has been dropped by MkDocs, it must now be defined in
`theme.favicon` (previously `site_favicon`).
* Localization is now separated into theme language and search language. While
there can only be a single language on theme-level, the search supports
multiple languages which can be separated by commas. See the getting started
guide for more guidance.
* The search tokenizer can now be set through `extra.search.tokenizer`.
## Changelog
### 4.2.0 <small>_ April 28, 2019</small>
* Added Norwegian (Nynorsk) translations
* Fixed loss of focus in non-form input elements due to search hotkeys
* Fixed #1067: Search hotkeys not working for mobile/tablet screensize
* Fixed #1068: Search not correctly aligned for tablet screensize
### 4.1.2 <small>_ April 16, 2019</small>
* Fixed #1072: HTML tags appearing in navigation link titles
### 4.1.1 <small>_ March 28, 2019</small>
* Fixed minor CSS errors detected during validation
### 4.1.0 <small>_ March 22, 2019</small>
* Fixed #1023: Search for Asian languages broken after Lunr.js update
* Fixed #1026: contenteditable elements loose focus on hotkeys
### 4.0.2 <small>_ March 1, 2019</small>
* Fixed #1012: HTML character entities appear in search result titles
### 4.0.1 <small>_ February 13, 2019</small>
* Fixed #762, #816: Glitch in sidebar when collapsing items
* Fixed #869: Automatically expand details before printing
### 4.0.0 <small>_ February 13, 2019</small>
* Added background on hover for table rows
* Removed Google Tag Manager and reverted to Google Analytics
* Removed blocks in partials - Jinja doesn't support them
* Fixed #911: Chrome breaks layout if system language is Chinese [BREAKING]
* Fixed #976: Removed FastClick
### 3.3.0 <small>_ January 29, 2019</small>
* Moved Google Analytics integration into `head` using Google Tag Manager
* Fixed #972: Unicode slugifier breaks table of contents blur on scroll
* Fixed #974: Additional links in table of contents break blur on scroll
### 3.2.0 <small>_ December 28, 2018</small>
* Added support for redirects using metadata refresh
* Fixed #921: Load Google Analytics snippet asynchronously
### 3.1.0 <small>_ November 17, 2018</small>
* Added support for Progressive Web App Manifest
* Fixed #915: Search bug in Safari (upgraded Lunr.js)
### 3.0.6 <small>_ October 26, 2018</small>
* Added Taiwanese translations
* Fixed #906: JavaScript code blocks evaluated in search results
### 3.0.5 <small>_ October 23, 2018</small>
* Added Croatian and Indonesian translations
* Fixed #899: Skip-to-content link invalid from 2nd level on
* Fixed #902: Missing URL filter in footer for FontAwesome link
### 3.0.4 <small>_ September 3, 2018</small>
* Updated Dutch translations
* Fixed #856: Removed preconnect meta tag if Google Fonts are disabled
### 3.0.3 <small>_ August 7, 2018</small>
* Fixed #841: Additional path levels for extra CSS and JS
### 3.0.2 <small>_ August 6, 2018</small>
* Fixed #839: Lunr.js stemmer imports incorrect
### 3.0.1 <small>_ August 5, 2018</small>
* Fixed #838: Search result links incorrect
### 3.0.0 <small>_ August 5, 2018</small>
* Upgraded MkDocs to 1.0 [BREAKING]
* Upgraded Python in official Docker image to 3.6
* Added Serbian and Serbo-Croatian translations
### 2.9.4 <small>_ July 29, 2018</small>
* Fixed build error after MkDocs upgrade
### 2.9.3 <small>_ July 29, 2018</small>
* Added link to home for logo in drawer
* Fixed dependency problems between MkDocs and Tornado
### 2.9.2 <small>_ June 29, 2018</small>
* Added Hindi and Czech translations
### 2.9.1 <small>_ June 18, 2018</small>
* Added support for different spellings for theme color
* Fixed #799: Added support for web font minification in production
* Fixed #800: Added `.highlighttable` as an alias for `.codehilitetable`
### 2.9.0 <small>_ June 13, 2018</small>
* Added support for theme color on Android
* Fixed #796: Rendering of nested tabbed code blocks
### 2.8.0 <small>_ June 10, 2018</small>
* Added support for grouping code blocks with tabs
* Added Material and FontAwesome icon fonts to distribution files (GDPR)
* Added note on compliance with GDPR
* Added Slovak translations
* Fixed #790: Prefixed `id` attributes with `__` to avoid name clashes
### 2.7.3 <small>_ April 26, 2018</small>
* Added Finnish translations
### 2.7.2 <small>_ April 9, 2018</small>
* Fixed rendering issue for `details` on Edge
### 2.7.1 <small>_ March 21, 2018</small>
* Added Galician translations
* Fixed #730: Scroll chasing error on home page if Disqus is enabled
* Fixed #736: Reset drawer and search upon back button invocation
### 2.7.0 <small>_ March 6, 2018</small>
* Added ability to set absolute URL for logo
* Added Hebrew translations
### 2.6.6 <small>_ February 22, 2018</small>
* Added preconnect for Google Fonts for faster loading
* Fixed #710: With tabs sidebar disappears if JavaScript is not available
### 2.6.5 <small>_ February 22, 2018</small>
* Reverted `--dev-addr` flag removal from `Dockerfile`
### 2.6.4 <small>_ February 21, 2018</small>
* Added Catalan translations
* Fixed incorrect margins for buttons in Firefox and Safari
* Replaced package manager `yarn` with `npm 5.6`
* Reverted GitHub stars rounding method
* Removed `--dev-addr` flag from `Dockerfile` for Windows compatibility
### 2.6.3 <small>_ February 18, 2018</small>
* Added Vietnamese translations
### 2.6.2 <small>_ February 12, 2018</small>
* Added Arabic translations
* Fixed incorrect rounding of amount of GitHub stars
* Fixed double-layered borders for tables
### 2.6.1 <small>_ February 11, 2018</small>
* Added ability to override Disqus integration using metadata
* Fixed #690: Duplicate slashes in source file URLs
* Fixed #696: Active page highlight not working with default palette
* Adjusted German translations
### 2.6.0 <small>_ February 2, 2018</small>
* Moved default search configuration to default translation (English)
* Added support to automatically set text direction from translation
* Added support to disable search stop word filter in translation
* Added support to disable search trimmer in translation
* Added Persian translations
* Fixed support for Polish search
* Fixed disappearing GitHub, GitLab and Bitbucket repository icons
### 2.5.5 <small>_ January 31, 2018</small>
* Added Hungarian translations
### 2.5.4 <small>_ January 29, 2018</small>
* Fixed #683: `gh-deploy` fails inside Docker
### 2.5.3 <small>_ January 25, 2018</small>
* Added Ukrainian translations
### 2.5.2 <small>_ January 22, 2018</small>
* Added default search language mappings for all localizations
* Fixed #673: Error loading non-existent search language
* Fixed #675: Uncaught reference error when search plugin disabled
### 2.5.1 <small>_ January 20, 2018</small>
* Fixed permalink for main headline
* Improved missing translation handling with English as a fallback
* Improved accessibility with skip-to-content link
### 2.5.0 <small>_ January 13, 2018</small>
* Added support for right-to-left languages
### 2.4.0 <small>_ January 11, 2018</small>
* Added focus state for clipboard buttons
* Fixed #400: Search bar steals tab focus
* Fixed search not closing on ++enter++ when result is selected
* Fixed search not closing when losing focus due to ++tab++
* Fixed collapsed navigation links getting focus
* Fixed `outline` being cut off on ++tab++ focus of navigation links
* Fixed bug with first search result navigation being ignored
* Removed search result navigation via ++tab++ (use ++up++ and ++down++)
* Removed `outline` resets for links
* Improved general tabbing behavior on desktop
### 2.3.0 <small>_ January 9, 2018</small>
* Added `example` (synonym: `snippet`) style for Admonition
* Added synonym `abstract` for `summary` style for Admonition
### 2.2.6 <small>_ December 27, 2017</small>
* Added Turkish translations
* Fixed unclickable area below header in case JavaScript is not available
### 2.2.5 <small>_ December 18, 2017</small>
* Fixed #639: Broken default favicon
### 2.2.4 <small>_ December 18, 2017</small>
* Fixed #638: Build breaks with Jinja < 2.9
### 2.2.3 <small>_ December 13, 2017</small>
* Fixed #630: Admonition sets padding on any last child
* Adjusted Chinese (Traditional) translations
### 2.2.2 <small>_ December 8, 2017</small>
* Added Dutch translations
* Adjusted targeted link and footnote offsets
* Simplified Admonition styles and fixed padding bug
### 2.2.1 <small>_ December 2, 2017</small>
* Fixed #616: Minor styling error with title-only admonition blocks
* Removed border for table of contents and improved spacing
### 2.2.0 <small>_ November 22, 2017</small>
* Added support for hero teaser
* Added Portuguese translations
* Fixed #586: Footnote backref target offset regression
* Fixed #605: Search stemmers not correctly loaded
### 2.1.1 <small>_ November 21, 2017</small>
* Replaced deprecated `babel-preset-es2015` with `babel-preset-env`
* Refactored Gulp build pipeline with Webpack
* Removed right border on sidebars
* Fixed broken color transition on header
### 2.1.0 <small>_ November 19, 2017</small>
* Added support for `white` as a primary color
* Added support for sliding site name and title
* Fixed redundant clipboard button when using line numbers on code blocks
* Improved header appearance by making it taller
* Improved tabs appearance
* Improved CSS customizability by leveraging inheritance
* Removed scroll shadows via `background-attachment`
### 2.0.4 <small>_ November 5, 2017</small>
* Fixed `details` not opening with footnote reference
### 2.0.3 <small>_ November 5, 2017</small>
* Added Japanese translations
* Fixed #540: Jumping to anchor inside `details` doesn't open it
* Fixed active link colors in footer
### 2.0.2 <small>_ November 1, 2017</small>
* Added Russian translations
* Fixed #542: Horizontal scrollbar between `1220px` and `1234px`
* Fixed #553: Metadata values only rendering first character
* Fixed #558: Flash of unstyled content
* Fixed favicon regression caused by deprecation upstream
### 2.0.1 <small>_ October 31, 2017</small>
* Fixed error when initializing search
* Fixed styles for link to edit the current page
* Fixed styles on nested admonition in details
### 2.0.0 <small>_ October 31, 2017</small>
* Added support for MkDocs 0.17.1 theme configuration options
* Added support for easier configuration of search tokenizer
* Added support to disable search
* Added Korean translations
* Removed support for MkDocs 0.16.x [BREAKING]
### 1.12.2 <small>_ October 26, 2017</small>
* Added Italian, Norwegian, French and Chinese translations
### 1.12.1 <small>_ October 22, 2017</small>
* Added Polish, Swedish and Spanish translations
* Improved downward compatibility with custom partials
* Temporarily pinned MkDocs version within Docker image to 0.16.3
* Fixed #519: Missing theme configuration file
### 1.12.0 <small>_ October 20, 2017</small>
* Added support for setting language(s) via `mkdocs.yml`
* Added support for default localization
* Added German and Danish translations
* Fixed #374: Search bar misalignment on big screens
### 1.11.0 <small>_ October 19, 2017</small>
* Added localization to clipboard
* Refactored localization logic
### 1.10.4 <small>_ October 18, 2017</small>
* Improved print styles of code blocks
* Improved search UX (don't close on enter if no selection)
* Fixed #495: Vertical scrollbar on short pages
### 1.10.3 <small>_ October 11, 2017</small>
* Fixed #484: Vertical scrollbar on some MathJax formulas
* Fixed #483: Footnote backref target offset regression
### 1.10.2 <small>_ October 6, 2017</small>
* Fixed #468: Sidebar shows scrollbar if content is shorter (in Safari)
### 1.10.1 <small>_ September 14, 2017</small>
* Fixed #455: Bold code blocks rendered with normal font weight
### 1.10.0 <small>_ September 1, 2017</small>
* Added support to make logo default icon configurable
* Fixed uninitialized overflow scrolling on main pane for iOS
* Fixed error in mobile navigation in case JavaScript is not available
* Fixed incorrect color transition for nested panes in mobile navigation
* Improved checkbox styles for Tasklist from PyMdown Extension package
### 1.9.0 <small>_ August 29, 2017</small>
* Added `info` (synonym: `todo`) style for Admonition
* Added `question` (synonym: `help`, `faq`) style for Admonition
* Added support for Details from PyMdown Extensions package
* Improved Admonition styles to match Details
* Improved styles for social links in footer
* Replaced ligatures with Unicode code points to avoid broken layout
* Upgraded PyMdown Extensions package dependency to >= 3.4
### 1.8.1 <small>_ August 7, 2017</small>
* Fixed #421: Missing pagination for GitHub API
### 1.8.0 <small>_ August 2, 2017</small>
* Added support for lazy-loading of search results for better performance
* Added support for customization of search tokenizer/separator
* Fixed #424: Search doesn't handle capital letters anymore
* Fixed #419: Search doesn't work on whole words
### 1.7.5 <small>_ July 25, 2017</small>
* Fixed #398: Forms broken due to search shortcuts
* Improved search overall user experience
* Improved search matching and highlighting
* Improved search accessibility
### 1.7.4 <small>_ June 21, 2017</small>
* Fixed functional link colors in table of contents for active palette
* Fixed #368: Compatibility issues with IE11
### 1.7.3 <small>_ June 7, 2017</small>
* Fixed error when setting language to Japanese for site search
### 1.7.2 <small>_ June 6, 2017</small>
* Fixed offset of search box when `repo_url` is not set
* Fixed non-disappearing tooltip
### 1.7.1 <small>_ June 1, 2017</small>
* Fixed wrong `z-index` order of header, overlay and drawer
* Fixed wrong offset of targeted footnote back references
### 1.7.0 <small>_ June 1, 2017</small>
* Added "copy to clipboard" buttons to code blocks
* Added support for multilingual site search
* Fixed search term highlighting for non-latin languages
### 1.6.4 <small>_ May 24, 2017</small>
* Fixed #337: JavaScript error for GitHub organization URLs
### 1.6.3 <small>_ May 16, 2017</small>
* Fixed #329: Broken source stats for private or unknown GitHub repos
### 1.6.2 <small>_ May 15, 2017</small>
* Fixed #316: Fatal error for git clone on Windows
* Fixed #320: Chrome 58 creates double underline for `abbr` tags
* Fixed #323: Ligatures rendered inside code blocks
* Fixed miscalculated sidebar height due to missing margin collapse
* Changed deprecated MathJax CDN to Cloudflare
### 1.6.1 <small>_ April 23, 2017</small>
* Fixed following of active/focused element if search input is focused
* Fixed layer order of search component elements
### 1.6.0 <small>_ April 22, 2017</small>
* Added build test for Docker image on Travis
* Added search overlay for better user experience (focus)
* Added language from localizations to `html` tag
* Fixed #270: source links broken for absolute URLs
* Fixed missing top spacing for first targeted element in content
* Fixed too small footnote divider when using larger font sizes
### 1.5.5 <small>_ April 20, 2017</small>
* Fixed #282: Browser search (<kbd>Meta</kbd>+<kbd>F</kbd>) is hijacked
### 1.5.4 <small>_ April 8, 2017</small>
* Fixed broken highlighting for two or more search terms
* Fixed missing search results when only a `h1` is present
* Fixed unresponsive overlay on Android
### 1.5.3 <small>_ April 7, 2017</small>
* Fixed deprecated calls for template variables
* Fixed wrong palette color for focused search result
* Fixed JavaScript errors on 404 page
* Fixed missing top spacing on 404 page
* Fixed missing right spacing on overflow of source container
### 1.5.2 <small>_ April 5, 2017</small>
* Added requirements as explicit dependencies in `setup.py`
* Fixed non-synchronized transitions in search form
### 1.5.1 <small>_ March 30, 2017</small>
* Fixed rendering and offset of targetted footnotes
* Fixed #238: Link on logo is not set to `site_url`
### 1.5.0 <small>_ March 24, 2017</small>
* Added support for localization of search placeholder
* Added keyboard events for quick access of search
* Added keyboard events for search control
* Added opacity on hover for search buttons
* Added git hook to skip CI build on non-src changes
* Fixed non-resetting search placeholder when input is cleared
* Fixed error for unescaped parentheses in search term
* Fixed #229: Button to clear search missing
* Fixed #231: Escape key doesn't exit search
* Removed old-style figures from font feature settings
### 1.4.1 <small>_ March 16, 2017</small>
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
### 1.4.0 <small>_ March 16, 2017</small>
* Added support for grouping searched sections by documents
* Added support for highlighting of search terms
* Added support for localization of search results
* Fixed #216: table of contents icon doesn't show if `h1` is not present
* Reworked style and layout of search results for better usability
### 1.3.0 <small>_ March 11, 2017</small>
* Added support for page-specific title and description using metadata
* Added support for linking source files to documentation
* Fixed jitter and offset of sidebar when zooming browser
* Fixed incorrectly initialized tablet sidebar height
* Fixed regression for #1: GitHub stars break if `repo_url` ends with a `/`
* Fixed undesired white line below copyright footer due to base font scaling
* Fixed issue with whitespace in path for scripts
* Fixed #205: support non-fixed (static) header
* Refactored footnote references for better visibility
* Reduced repaints to a minimum for non-tabs configuration
* Reduced contrast of edit button (slightly)
### 1.2.0 <small>_ March 3, 2017</small>
* Added `quote` (synonym: `cite`) style for Admonition
* Added help message to build pipeline
* Fixed wrong navigation link colors when applying palette
* Fixed #197: Link missing in tabs navigation on deeply nested items
* Removed unnecessary dev dependencies
### 1.1.1 <small>_ February 26, 2017</small>
* Fixed incorrectly displayed nested lists when using tabs
### 1.1.0 <small>_ February 26, 2017</small>
* Added tabs navigation feature (optional)
* Added Disqus integration (optional)
* Added a high resolution Favicon with the new logo
* Added static type checking using Facebook's Flow
* Fixed #173: Dictionary elements have no bottom spacing
* Fixed #175: Tables cannot be set to 100% width
* Fixed race conditions in build related to asset revisioning
* Fixed accidentally re-introduced Permalink on top-level headline
* Fixed alignment of logo in drawer on IE11
* Refactored styles related to tables
* Refactored and automated Docker build and PyPI release
* Refactored build scripts
### 1.0.5 <small>_ February 18, 2017</small>
* Fixed #153: Sidebar flows out of constrained area in Chrome 56
* Fixed #159: Footer jitter due to JavaScript if content is short
### 1.0.4 <small>_ February 16, 2017</small>
* Fixed #142: Documentation build errors if `h1` is defined as raw HTML
* Fixed #164: PyPI release does not build and install
* Fixed offsets of targeted headlines
* Increased sidebar font size by `0.12rem`
### 1.0.3 <small>_ January 22, 2017</small>
* Fixed #117: Table of contents items don't blur on fast scrolling
* Refactored sidebar positioning logic
* Further reduction of repaints
### 1.0.2 <small>_ January 15, 2017</small>
* Fixed #108: 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: Protocol relative URL for webfonts doesn't work with `file://`
* Fixed #34: IE11 on Windows 7 doesn't honor `max-width` on `main` tag
* Fixed #35: Add styling for blockquotes
### 0.2.3 <small>_ May 16, 2016</small>
* Fixed #25: Highlight inline fenced blocks
* Fixed #26: Better highlighting for keystrokes
* Fixed #30: Suboptimal syntax highlighting for PHP
### 0.2.2 <small>_ March 20, 2016</small>
* 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
### 0.2.1 <small>_ March 12, 2016</small>
* Fixed #10: Invisible header after closing search bar with <kbd>ESC</kbd> key
* Fixed #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
### 0.2.0 <small>_ February 24, 2016</small>
* Fixed #6: Include multiple color palettes via `mkdocs.yml`
* Fixed #7: Better colors for links inside admonition notes and warnings
* Fixed #9: Text for prev/next footer navigation should be customizable
* Refactored templates (replaced `if`/`else` with modifiers where possible)
### 0.1.3 <small>_ February 21, 2016</small>
* Fixed #3: Ordered lists within an unordered list have `::before` content
* Fixed #4: Click on Logo/Title without Github-Repository: `"None"`
* Fixed #5: Page without headlines renders empty list in table of contents
* Moved Modernizr to top to ensure basic usability in IE8
### 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: 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
### 0.1.0 <small>_ February 9, 2016</small>
* Initial release

246
docs/specimen.md Normal file
View File

@ -0,0 +1,246 @@
# Specimen
## 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
urna elit, malesuada eget finibus ut, ullamcorper ac tortor. Vestibulum sodales
pulvinar nisl, pharetra aliquet est. Quisque volutpat erat ac nisi accumsan
tempor.
**Sed suscipit**, orci non pretium pretium, quam mi gravida metus, vel
venenatis justo est condimentum diam. Maecenas non ornare justo. Nam a ipsum
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
### The 3rd level
#### The 4th level
##### The 5th level
###### The 6th level
## Headings <small>with secondary text</small>
### The 3rd level <small>with secondary text</small>
#### The 4th level <small>with secondary text</small>
##### The 5th level <small>with secondary text</small>
###### The 6th level <small>with secondary text</small>
## Blockquotes
> Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet rutrum.
Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Nam vehicula nunc
mauris, a ultricies libero efficitur sed. *Class aptent* taciti sociosqu ad
litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie
imperdiet consectetur.
### 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
[libero fermentum](#) urna, ut efficitur elit ligula et nunc.
> > Mauris dictum mi lacus, sit amet pellentesque urna vehicula fringilla.
Ut sit amet placerat ante. Proin sed elementum nulla. Nunc vitae sem odio.
Suspendisse ac eros arcu. Vivamus orci erat, volutpat a tempor et, rutrum.
eu odio.
> > > `Suspendisse rutrum facilisis risus`, eu posuere neque commodo a.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed nec leo
bibendum, sodales mauris ut, tincidunt massa.
### 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,
sit amet laoreet nibh.
``` js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
> > Praesent at `:::js return target`, sodales nibh vel, tempor felis. Fusce
vel lacinia lacus. Suspendisse rhoncus nunc non nisi iaculis ultrices.
Donec consectetur mauris non neque imperdiet, eget volutpat libero.
## 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,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
* Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
* Nam vulputate tincidunt fringilla.
* Nullam dignissim ultrices urna non auctor.
* Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin ut
eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at aliquam
ac, aliquet sed mauris.
* Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur
accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh
lacinia sed. Aenean in finibus diam.
### Ordered lists
1. Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
consectetur feugiat sodales.
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Aliquam ornare feugiat quam et egestas. Nunc id erat et quam
pellentesque lacinia eu vel odio.
1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet
quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a
ultricies libero efficitur sed.
1. Mauris dictum mi lacus
2. Ut sit amet placerat ante
3. Suspendisse ac eros arcu
2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet
rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Sed
aliquet, neque at rutrum mollis, neque nisi tincidunt nibh.
3. Pellentesque eget `:::js var _extends` ornare tellus, ut gravida mi.
``` js hl_lines="1"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
3. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis
sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis
nulla. Vivamus a pharetra leo.
### Definition lists
Lorem ipsum dolor sit amet
: Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus
tellus non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor
lobortis orci, at elementum urna sodales vitae. In in vehicula nulla.
Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
Nam vulputate tincidunt fringilla.
Nullam dignissim ultrices urna non auctor.
Cras arcu libero
: Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin
ut eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at
aliquam ac, aliquet sed mauris.
## Code blocks
### Inline
Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
per inceptos himenaeos. [`Pellentesque aliquet quam enim`](#), eu volutpat urna
rutrum a.
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
#!js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
## Horizontal rules
Aenean in finibus diam. Duis mollis est eget nibh volutpat, fermentum aliquet
dui mollis. Nam vulputate tincidunt fringilla. Nullam dignissim ultrices urna
non auctor.
***
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
| Sollicitudo / Pellentesi | consectetur | adipiscing | elit | arcu | sed |
| ------------------------ | ----------- | ---------- | ------- | ---- | --- |
| Vivamus a pharetra | yes | yes | yes | yes | yes |
| Ornare viverra ex | yes | yes | yes | yes | yes |
| Mauris a ullamcorper | yes | yes | partial | yes | yes |
| Nullam urna elit | yes | yes | yes | yes | yes |
| Malesuada eget finibus | yes | yes | yes | yes | yes |
| Ullamcorper | yes | yes | yes | yes | yes |
| Vestibulum sodales | yes | - | yes | - | yes |
| Pulvinar nisl | yes | yes | yes | - | - |
| Pharetra aliquet est | yes | yes | yes | yes | yes |
| Sed suscipit | yes | yes | yes | yes | yes |
| Orci non pretium | yes | partial | - | - | - |
Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
| Left | Center | Right |
| :--------- | :------: | ------: |
| Lorem | *dolor* | `amet` |
| [ipsum](#) | **sit** | |
Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
sit amet laoreet nibh.
<table>
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<thead>
<tr class="header">
<th>Table</th>
<th>with colgroups (Pandoc)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem</td>
<td>ipsum dolor sit amet.</td>
</tr>
<tr>
<td>Sed sagittis</td>
<td>eleifend rutrum. Donec vitae suscipit est.</td>
</tr>
</tbody>
</table>

4
material/404.html Normal file
View File

@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}

0
material/__init__.py Normal file
View File

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
/*!
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
* DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
* SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
* LIMITATIONS UNDER THE LICENSE.
*/@font-face{font-family:"Material Icons";font-style:normal;font-weight:400;src:local("Material Icons"),local("MaterialIcons-Regular"),url("specimen/MaterialIcons-Regular.woff2") format("woff2"),url("specimen/MaterialIcons-Regular.woff") format("woff"),url("specimen/MaterialIcons-Regular.ttf") format("truetype")}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

View File

@ -0,0 +1,20 @@
<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-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" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,18 @@
<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 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" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,38 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
viewBox="0 0 500 500" id="__gitlab">
<g transform="translate(156.197863, 1.160267)">
<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 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 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 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 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 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 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>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,m,i;e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=(r=e.stemmerSupport.Among,m=e.stemmerSupport.SnowballProgram,i=new function(){var i,t,n,s=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],o=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new m;function l(){var e,r=c.limit-c.cursor;c.cursor>=t&&(e=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,c.find_among_b(o,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r=c.cursor;return function(){var e,r=c.cursor+3;if(t=c.limit,0<=r&&r<=c.limit){for(i=r;;){if(e=c.cursor,c.in_grouping(d,97,248)){c.cursor=e;break}if((c.cursor=e)>=c.limit)return;c.cursor++}for(;!c.out_grouping(d,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(t=c.cursor)<i&&(t=i)}}(),c.limit_backward=r,c.cursor=c.limit,function(){var e,r;if(c.cursor>=t&&(r=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,e=c.find_among_b(s,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(u,97,229)&&c.slice_del()}}(),c.cursor=c.limit,l(),c.cursor=c.limit,function(){var e,r,i,n=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig")&&c.slice_del()),c.cursor=c.limit-n,c.cursor>=t&&(r=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,e=c.find_among_b(a,5),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del(),i=c.limit-c.cursor,l(),c.cursor=c.limit-i;break;case 2:c.slice_from("løs")}}(),c.cursor=c.limit,c.cursor>=t&&(e=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,c.out_grouping_b(d,97,248)?(c.bra=c.cursor,n=c.slice_to(n),c.limit_backward=e,c.eq_v_b(n)&&c.slice_del()):c.limit_backward=e),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(m){if(void 0===m)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===m.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var l="2"==m.version[0];m.ja=function(){this.pipeline.reset(),this.pipeline.add(m.ja.trimmer,m.ja.stopWordFilter,m.ja.stemmer),l?this.tokenizer=m.ja.tokenizer:(m.tokenizer&&(m.tokenizer=m.ja.tokenizer),this.tokenizerFn&&(this.tokenizerFn=m.ja.tokenizer))};var j=new m.TinySegmenter;m.ja.tokenizer=function(e){var r,t,i,n,o,s,p,a,u;if(!arguments.length||null==e||null==e)return[];if(Array.isArray(e))return e.map(function(e){return l?new m.Token(e.toLowerCase()):e.toLowerCase()});for(r=(t=e.toString().toLowerCase().replace(/^\s+/,"")).length-1;0<=r;r--)if(/\S/.test(t.charAt(r))){t=t.substring(0,r+1);break}for(o=[],i=t.length,p=a=0;a<=i;a++)if(s=a-p,t.charAt(a).match(/\s/)||a==i){if(0<s)for(n=j.segment(t.slice(p,a)).filter(function(e){return!!e}),u=p,r=0;r<n.length;r++)l?o.push(new m.Token(n[r],{position:[u,n[r].length],index:o.length})):o.push(n[r]),u+=n[r].length;p=a+1}return o},m.ja.stemmer=function(e){return e},m.Pipeline.registerFunction(m.ja.stemmer,"stemmer-ja"),m.ja.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z--0-9-",m.ja.trimmer=m.trimmerSupport.generateTrimmer(m.ja.wordCharacters),m.Pipeline.registerFunction(m.ja.trimmer,"trimmer-ja"),m.ja.stopWordFilter=m.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),m.Pipeline.registerFunction(m.ja.stopWordFilter,"stopWordFilter-ja"),m.jp=m.ja,m.Pipeline.registerFunction(m.jp.stemmer,"stemmer-jp"),m.Pipeline.registerFunction(m.jp.trimmer,"trimmer-jp"),m.Pipeline.registerFunction(m.jp.stopWordFilter,"stopWordFilter-jp")}});

View File

@ -0,0 +1 @@
module.exports=require("./lunr.ja");

View File

@ -0,0 +1 @@
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(o){o.multiLanguage=function(){for(var e=Array.prototype.slice.call(arguments),i=e.join("-"),t="",r=[],n=[],s=0;s<e.length;++s)"en"==e[s]?(t+="\\w",r.unshift(o.stopWordFilter),r.push(o.stemmer),n.push(o.stemmer)):(t+=o[e[s]].wordCharacters,r.unshift(o[e[s]].stopWordFilter),r.push(o[e[s]].stemmer),n.push(o[e[s]].stemmer));var p=o.trimmerSupport.generateTrimmer(t);return o.Pipeline.registerFunction(p,"lunr-multi-trimmer-"+i),r.unshift(p),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,r),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,n))}}}});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var o,s,a=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],m=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],u=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],d=[119,125,149,1],c=new n;this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r,n,i,t=c.cursor;return function(){var e,r=c.cursor+3;if(s=c.limit,0<=r||r<=c.limit){for(o=r;;){if(e=c.cursor,c.in_grouping(u,97,248)){c.cursor=e;break}if(e>=c.limit)return;c.cursor=e+1}for(;!c.out_grouping(u,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(s=c.cursor)<o&&(s=o)}}(),c.limit_backward=t,c.cursor=c.limit,function(){var e,r,n;if(c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,e=c.find_among_b(a,29),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:n=c.limit-c.cursor,c.in_grouping_b(d,98,122)?c.slice_del():(c.cursor=c.limit-n,c.eq_s_b(1,"k")&&c.out_grouping_b(u,97,248)&&c.slice_del());break;case 3:c.slice_from("er")}}(),c.cursor=c.limit,r=c.limit-c.cursor,c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.find_among_b(m,2)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e),c.cursor=c.limit,c.cursor>=s&&(i=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,(n=c.find_among_b(l,11))?(c.bra=c.cursor,c.limit_backward=i,1==n&&c.slice_del()):c.limit_backward=i),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var b;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(r){b=r,this.cursor=0,this.limit=r.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var r=b;return b=null,r},in_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor++,!0}return!1},in_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor--,!0}return!1},out_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(i<s||s<t)return this.cursor++,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor++,!0}return!1},out_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(i<s||s<t)return this.cursor--,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor--,!0}return!1},eq_s:function(r,t){if(this.limit-this.cursor<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor+i)!=t.charCodeAt(i))return!1;return this.cursor+=r,!0},eq_s_b:function(r,t){if(this.cursor-this.limit_backward<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor-r+i)!=t.charCodeAt(i))return!1;return this.cursor-=r,!0},find_among:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),a=0,f=u<o?u:o,l=r[c],_=f;_<l.s_size;_++){if(e+f==n){a=-1;break}if(a=b.charCodeAt(e+f)-l.s[_])break;f++}if(a<0?(s=c,o=f):(i=c,u=f),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(l=r[i]).s_size){if(this.cursor=e+l.s_size,!l.method)return l.result;var m=l.method();if(this.cursor=e+l.s_size,m)return l.result}if((i=l.substring_i)<0)return 0}},find_among_b:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit_backward,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),a=0,f=u<o?u:o,l=(_=r[c]).s_size-1-f;0<=l;l--){if(e-f==n){a=-1;break}if(a=b.charCodeAt(e-1-f)-_.s[l])break;f++}if(a<0?(s=c,o=f):(i=c,u=f),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){var _;if(u>=(_=r[i]).s_size){if(this.cursor=e-_.s_size,!_.method)return _.result;var m=_.method();if(this.cursor=e-_.s_size,m)return _.result}if((i=_.substring_i)<0)return 0}},replace_s:function(r,t,i){var s=i.length-(t-r);return b=b.substring(0,r)+i+b.substring(t),this.limit+=s,this.cursor>=t?this.cursor+=s:this.cursor>r&&(this.cursor=r),s},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>b.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),b.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,l,n;e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=(r=e.stemmerSupport.Among,l=e.stemmerSupport.SnowballProgram,n=new function(){var n,t,i=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],s=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],m=new l;this.setCurrent=function(e){m.setCurrent(e)},this.getCurrent=function(){return m.getCurrent()},this.stem=function(){var e,r=m.cursor;return function(){var e,r=m.cursor+3;if(t=m.limit,0<=r||r<=m.limit){for(n=r;;){if(e=m.cursor,m.in_grouping(o,97,246)){m.cursor=e;break}if(m.cursor=e,m.cursor>=m.limit)return;m.cursor++}for(;!m.out_grouping(o,97,246);){if(m.cursor>=m.limit)return;m.cursor++}(t=m.cursor)<n&&(t=n)}}(),m.limit_backward=r,m.cursor=m.limit,function(){var e,r=m.limit_backward;if(m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(i,37),m.limit_backward=r,e))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.in_grouping_b(u,98,121)&&m.slice_del()}}(),m.cursor=m.limit,e=m.limit_backward,m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.find_among_b(s,7)&&(m.cursor=m.limit,m.ket=m.cursor,m.cursor>m.limit_backward&&(m.bra=--m.cursor,m.slice_del())),m.limit_backward=e),m.cursor=m.limit,function(){var e,r;if(m.cursor>=t){if(r=m.limit_backward,m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(a,5))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.slice_from("lös");break;case 3:m.slice_from("full")}m.limit_backward=r}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(t){if(void 0===t)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===t.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i="2"==t.version[0];t.th=function(){this.pipeline.reset(),this.pipeline.add(t.th.trimmer),i?this.tokenizer=t.th.tokenizer:(t.tokenizer&&(t.tokenizer=t.th.tokenizer),this.tokenizerFn&&(this.tokenizerFn=t.th.tokenizer))},t.th.wordCharacters="[฀-๿]",t.th.trimmer=t.trimmerSupport.generateTrimmer(t.th.wordCharacters),t.Pipeline.registerFunction(t.th.trimmer,"trimmer-th");var n=t.wordcut;n.init(),t.th.tokenizer=function(e){if(!arguments.length||null==e||null==e)return[];if(Array.isArray(e))return e.map(function(e){return i?new t.Token(e):e});var r=e.toString().replace(/^\s+/,"");return n.cut(r).split("|")}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

220
material/base.html Normal file
View File

@ -0,0 +1,220 @@
{% import "partials/language.html" as lang with context %}
{% set feature = config.theme.feature %}
{% set palette = config.theme.palette %}
{% set font = config.theme.font %}
<!doctype html>
<html lang="{{ lang.t('language') }}" class="no-js">
<head>
{% block site_meta %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
{% if page and page.meta and page.meta.description %}
<meta name="description" content="{{ page.meta.description }}">
{% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}">
{% endif %}
{% if page and page.meta and page.meta.redirect %}
<script>var anchor=window.location.hash.substr(1);location.href="{{ page.meta.redirect }}"+(anchor?"#"+anchor:"")</script>
<meta http-equiv="refresh" content="0; url={{ page.meta.redirect }}">
<meta name="robots" content="noindex">
<link rel="canonical" href="{{ page.meta.redirect }}">
{% elif page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}">
{% endif %}
{% if page and page.meta and page.meta.author %}
<meta name="author" content="{{ page.meta.author | first }}">
{% elif config.site_author %}
<meta name="author" content="{{ config.site_author }}">
{% endif %}
{% for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] %}
<meta name="lang:{{ key }}" content="{{ lang.t(key) }}">
{% endfor %}
<link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-4.2.0">
{% endblock %}
{% block htmltitle %}
{% if page and page.meta and page.meta.title %}
<title>{{ page.meta.title }}</title>
{% elif page and page.title and not page.is_homepage %}
<title>{{ page.title }} - {{ config.site_name }}</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.750b69bd.css' | url }}">
{% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.224b79ff.css' | url }}">
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
{% set primary = map.primary(
palette.primary | replace(" ", "-") | lower
) %}
<meta name="theme-color" content="{{ primary }}">
{% endif %}
{% endblock %}
{% block libs %}
<script src="{{ 'assets/javascripts/modernizr.74668098.js' | url }}"></script>
{% endblock %}
{% block fonts %}
{% if font != false %}
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{
font.text | replace(' ', '+') + ':300,400,400i,700|' +
font.code | replace(' ', '+')
}}">
<style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style>
{% endif %}
{% endblock %}
<link rel="stylesheet" href="{{ 'assets/fonts/material-icons.css' | url }}">
{% if config.extra.manifest %}
<link rel="manifest" href="{{ config.extra.manifest | url }}">
{% endif %}
{% for path in config["extra_css"] %}
<link rel="stylesheet" href="{{ path | url }}">
{% endfor %}
{% block analytics %}
{% if config.google_analytics %}
{% include "partials/integrations/analytics.html" %}
{% endif %}
{% endblock %}
{% block extrahead %}{% endblock %}
</head>
{% if palette.primary or palette.accent %}
{% set primary = palette.primary | replace(" ", "-") | lower %}
{% set accent = palette.accent | replace(" ", "-") | lower %}
<body dir="{{ lang.t('direction') }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
{% else %}
<body dir="{{ lang.t('direction') }}">
{% 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.f0b8504a.svg" %}
{% elif "gitlab" in platform %}
{% include "assets/images/icons/gitlab.6dd19c00.svg" %}
{% elif "bitbucket" in platform %}
{% include "assets/images/icons/bitbucket.1b09e088.svg" %}
{% endif %}
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
{% if page.toc | first is defined %}
<a href="{{ (page.toc | first).url }}" tabindex="1" class="md-skip">
{{ lang.t('skip.link.title') }}
</a>
{% endif %}
{% block header %}
{% include "partials/header.html" %}
{% endblock %}
<div class="md-container">
{% block hero %}
{% if page and page.meta and page.meta.hero %}
{% include "partials/hero.html" with context %}
{% endif %}
{% endblock %}
{% if feature.tabs %}
{% include "partials/tabs.html" %}
{% endif %}
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
{% block site_nav %}
{% if nav %}
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
</div>
</div>
</div>
{% endif %}
{% if page.toc %}
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
<div class="md-content">
<article class="md-content__inner md-typeset">
{% block content %}
{% if page.edit_url %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% endif %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% block source %}
{% if page and page.meta and page.meta.source %}
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
{% set repo = config.repo_url %}
{% if repo | last == "/" %}
{% set repo = repo[:-1] %}
{% endif %}
{% set path = page.meta.path | default([""]) %}
{% set file = page.meta.source %}
<a href="{{ [repo, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
{{ file }}
</a>
{% endif %}
{% endblock %}
{% endblock %}
{% block disqus %}
{% include "partials/integrations/disqus.html" %}
{% endblock %}
</article>
</div>
</div>
</main>
{% block footer %}
{% include "partials/footer.html" %}
{% endblock %}
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/application.8c0d971c.js' | url }}"></script>
{% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}
{% set path = "assets/javascripts/lunr/" %}
<script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script>
{% for language in languages | map("trim") %}
{% if language != "en" %}
{% if language == "ja" %}
<script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
{% endif %}
{% if language in ("da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr") %}
<script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script>
{% endif %}
{% endif %}
{% endfor %}
{% if languages | length > 1 %}
<script src="{{ (path ~ 'lunr.multi.js') | url }}"></script>
{% endif %}
{% endif %}
{% endif %}
<script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,3 @@
<a href="https://lossless.gmbh">Impressum</a> |
<a href="https://lossless.gmbh/privacy">Privacy Policy</a> |
<a href="https://lossless.support">Support</a>

1
material/main.html Normal file
View File

@ -0,0 +1 @@
{% extends "base.html" %}

73
material/mkdocs_theme.yml Normal file
View File

@ -0,0 +1,73 @@
# Copyright (c) 2016-2019 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.
# Language for theme localization
language: en
# Text direction (can be ltr or rtl), default: ltr
direction:
# Feature flags for functionality that alters behavior significantly, and thus
# may be a matter of taste
feature:
# Another layer on top of the main navigation for larger screens in the form
# of tabs, especially useful for larger documentation projects
tabs: false
# Sets the primary and accent color palettes as defined in the Material Design
# documentation - possible values can be looked up in the getting started guide
palette:
# Primary color used for header, sidebar and links, default: indigo
primary:
# Accent color for highlighting user interaction, default: indigo
accent:
# Fonts used by Material, automatically loaded from Google Fonts - see the site
# for a list of available fonts
font:
# Default font for text
text: Roboto
# Fixed-width font for code listings
code: Roboto Mono
# Favicon to be rendered
favicon: assets/images/favicon.png
# The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature (see https://material.io/icons/) or an image URL
logo:
icon: "\uE80C"
# Material includes the search in the header as a partial, not as a separate
# template, so it's correct that search.html is missing
include_search_page: false
# Material doesn't use MkDocs search functionality but provides its own. For
# this reason, only the search index needs to be built
search_index_only: true
# Static pages to build
static_templates:
- 404.html

View File

@ -0,0 +1,52 @@
{% import "partials/language.html" as lang with context %}
<footer class="md-footer">
{% if page.previous_page or page.next_page %}
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
{% if page.previous_page %}
<a href="{{ page.previous_page.url | 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-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">
{{ lang.t("footer.previous") }}
</span>
{{ page.previous_page.title }}
</span>
</div>
</a>
{% endif %}
{% if page.next_page %}
<a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
{{ 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-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
{% endif %}
</nav>
</div>
{% endif %}
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
{% if config.copyright %}
<div class="md-footer-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
{% include "custom/imprint.html" %}
</div>
{% include "partials/social.html" %}
</div>
</div>
</footer>

View File

@ -0,0 +1,45 @@
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
{% if config.theme.logo.icon %}
<i class="md-icon">{{ config.theme.logo.icon }}</i>
{% else %}
<img src="{{ config.theme.logo | url }}" width="24" height="24">
{% endif %}
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
{% if config.site_name == page.title %}
{{ config.site_name }}
{% else %}
<span class="md-header-nav__topic">
{{ config.site_name }}
</span>
<span class="md-header-nav__topic">
{{ page.title }}
</span>
{% endif %}
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% if "search" in config["plugins"] %}
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
{% include "partials/search.html" %}
{% endif %}
</div>
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% include "partials/source.html" %}
</div>
</div>
{% endif %}
</div>
</nav>
</header>

View File

@ -0,0 +1,10 @@
{% set feature = config.theme.feature %}
{% set class = "md-hero" %}
{% if not feature.tabs %}
{% set class = "md-hero md-hero--expand" %}
{% endif %}
<div class="{{ class }}" data-md-component="hero">
<div class="md-hero__inner md-grid">
{{ page.meta.hero }}
</div>
</div>

View File

@ -0,0 +1,24 @@
{% set analytics = config.google_analytics %}
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
}
ga.l = +new Date
/* Setup integration and send page view */
ga("create", "{{ analytics[0] }}", "{{ analytics[1] }}")
ga("set", "anonymizeIp", true)
ga("send", "pageview")
/* Register handler to log search on blur */
document.addEventListener("DOMContentLoaded", () => {
if (document.forms.search) {
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 async src="https://www.google-analytics.com/analytics.js"></script>

View File

@ -0,0 +1,21 @@
{% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
{% if not page.is_homepage and disqus %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{ page.canonical_url }}";
this.page.identifier =
"{{ page.canonical_url | replace(config.site_url, "") }}";
};
(function() {
var d = document, s = d.createElement("script");
s.src = "//{{ disqus }}.disqus.com/embed.js";
s.setAttribute("data-timestamp", +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
{% endif %}

View File

@ -0,0 +1,11 @@
{% import "partials/language/" + config.theme.language + ".html" as lang %}
{% import "partials/language/en.html" as fallback %}
{% macro t(key) %}{{ {
"direction": config.theme.direction,
"search.language": (
config.extra.search | default({})
).language,
"search.tokenizer": (
config.extra.search | default({})
).tokenizer | default("", true),
}[key] or lang.t(key) or fallback.t(key) }}{% endmacro %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "ar",
"direction": "rtl",
"clipboard.copy": "نسخ إلى الحافظة",
"clipboard.copied": "تم النسخ الى الحافظة",
"edit.link.title": "عدل الصفحة",
"footer.previous": "السابقة",
"footer.next": "التالية",
"meta.comments": "التعليقات",
"meta.source": "المصدر",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "بحث",
"search.result.placeholder": "اكتب لبدء البحث",
"search.result.none": "لا توجد نتائج",
"search.result.one": "نتائج البحث مستند واحد",
"search.result.other": "نتائج البحث # مستندات",
"skip.link.title": "انتقل إلى المحتوى",
"source.link.title": "اذهب إلى المصدر",
"toc.title": "جدول المحتويات"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "ca",
"clipboard.copy": "Còpia al porta-retalls",
"clipboard.copied": "Copiat al porta-retalls",
"edit.link.title": "Edita aquesta pàgina",
"footer.previous": "Anterior",
"footer.next": "Següent",
"meta.comments": "Comentaris",
"meta.source": "Codi font",
"search.language": "",
"search.placeholder": "Cerca",
"search.result.placeholder": "Escriu per a començar a cercar",
"search.result.none": "Cap document coincideix",
"search.result.one": "1 document coincident",
"search.result.other": "# documents coincidents",
"skip.link.title": "Salta el contingut",
"source.link.title": "Ves al repositori",
"toc.title": "Taula de continguts"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "cs",
"clipboard.copy": "Kopírovat do schránky",
"clipboard.copied": "Zkopírováno do schránky",
"edit.link.title": "Upravit tuto stránku",
"footer.previous": "Předchozí",
"footer.next": "Další",
"meta.comments": "Komentáře",
"meta.source": "Zdroj",
"search.language": "ro",
"search.placeholder": "Hledat",
"search.result.placeholder": "Pište co se má vyhledat",
"search.result.none": "Nenalezeny žádné dokumenty",
"search.result.one": "Nalezený dokument: 1",
"search.result.other": "Nalezené dokumenty: #",
"skip.link.title": "Přeskočit obsah",
"source.link.title": "Přejít do repozitáře",
"toc.title": "Obsah"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "da",
"clipboard.copy": "Kopiér til udklipsholderen",
"clipboard.copied": "Kopieret til udklipsholderen",
"edit.link.title": "Redigér denne side",
"footer.previous": "Forrige",
"footer.next": "Næste",
"meta.comments": "Kommentarer",
"meta.source": "Kilde",
"search.language": "da",
"search.placeholder": "Søg",
"search.result.placeholder": "Indtask søgeord",
"search.result.none": "Ingen resultater fundet",
"search.result.one": "1 resultat",
"search.result.other": "# resultater",
"skip.link.title": "Gå til indholdet",
"source.link.title": "Åbn arkiv",
"toc.title": "Indholdsfortegnelse"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "de",
"clipboard.copy": "In Zwischenablage kopieren",
"clipboard.copied": "In Zwischenablage kopiert",
"edit.link.title": "Seite editieren",
"footer.previous": "Zurück",
"footer.next": "Weiter",
"meta.comments": "Kommentare",
"meta.source": "Quellcode",
"search.language": "de",
"search.placeholder": "Suche",
"search.result.placeholder": "Suchbegriff eingeben",
"search.result.none": "Keine Suchergebnisse",
"search.result.one": "1 Suchergebnis",
"search.result.other": "# Suchergebnisse",
"skip.link.title": "Zum Inhalt",
"source.link.title": "Quellcode",
"toc.title": "Inhaltsverzeichnis"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,23 @@
{% macro t(key) %}{{ {
"language": "en",
"direction": "ltr",
"clipboard.copy": "Copy to clipboard",
"clipboard.copied": "Copied to clipboard",
"edit.link.title": "Edit this page",
"footer.previous": "Previous",
"footer.next": "Next",
"meta.comments": "Comments",
"meta.source": "Source",
"search.language": "en",
"search.pipeline.stopwords": true,
"search.pipeline.trimmer": true,
"search.placeholder": "Search",
"search.result.placeholder": "Type to start searching",
"search.result.none": "No matching documents",
"search.result.one": "1 matching document",
"search.result.other": "# matching documents",
"search.tokenizer": "[\s\-]+",
"skip.link.title": "Skip to content",
"source.link.title": "Go to repository",
"toc.title": "Table of contents"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "es",
"clipboard.copy": "Copiar al portapapeles",
"clipboard.copied": "Copiado al portapapeles",
"edit.link.title": "Editar esta página",
"footer.previous": "Anterior",
"footer.next": "Siguiente",
"meta.comments": "Comentarios",
"meta.source": "Fuente",
"search.language": "es",
"search.placeholder": "Búsqueda",
"search.result.placeholder": "Teclee para comenzar búsqueda",
"search.result.none": "No se encontraron documentos",
"search.result.one": "1 documento encontrado",
"search.result.other": "# documentos encontrados",
"skip.link.title": "Saltar a contenido",
"source.link.title": "Ir al repositorio",
"toc.title": "Tabla de contenidos"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "fa",
"direction": "rtl",
"clipboard.copy": "کپی کردن",
"clipboard.copied": "کپی شد",
"edit.link.title": "این صفحه را ویرایش کنید",
"footer.previous": "قبلی",
"footer.next": "بعدی",
"meta.comments": "نظرات",
"meta.source": "منبع",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "جستجو",
"search.result.placeholder": "برای شروع جستجو تایپ کنید",
"search.result.none": "سندی یافت نشد",
"search.result.one": "1 سند یافت شد",
"search.result.other": "# سند یافت شد",
"skip.link.title": "پرش به محتویات",
"source.link.title": "رفتن به مخزن",
"toc.title": "فهرست موضوعات"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "fi",
"clipboard.copy": "Kopioi leikepöydälle",
"clipboard.copied": "Kopioitu leikepöydälle",
"edit.link.title": "Muokkaa tätä sivua",
"footer.previous": "Edellinen",
"footer.next": "Seuraava",
"meta.comments": "Kommentit",
"meta.source": "Lähdekodi",
"search.language": "fi",
"search.placeholder": "Hae",
"search.result.placeholder": "Kirjoita aloittaaksesi haun",
"search.result.none": "Ei täsmääviä dokumentteja",
"search.result.one": "1 täsmäävä dokumentti",
"search.result.other": "# täsmäävää dokumenttia",
"skip.link.title": "Hyppää sisältöön",
"source.link.title": "Mene repositoryyn",
"toc.title": "Sisällysluettelo"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "fr",
"clipboard.copy": "Copier dans le presse-papier",
"clipboard.copied": "Copié dans le presse-papier",
"edit.link.title": "Editer cette page",
"footer.previous": "Précédent",
"footer.next": "Suivant",
"meta.comments": "Commentaires",
"meta.source": "Source",
"search.language": "fr",
"search.placeholder": "Rechercher",
"search.result.placeholder": "Taper pour démarrer la recherche",
"search.result.none": "Aucun document trouvé",
"search.result.one": "1 document trouvé",
"search.result.other": "# documents trouvés",
"source.link.title": "Aller au dépôt",
"toc.title": "Table des matières"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "gl",
"clipboard.copy": "Copiar no cortapapeis",
"clipboard.copied": "Copiado no cortapapeis",
"edit.link.title": "Editar esta páxina",
"footer.previous": "Anterior",
"footer.next": "Seguinte",
"meta.comments": "Comentarios",
"meta.source": "Fonte",
"search.language": "es",
"search.placeholder": "Busca",
"search.result.placeholder": "Insira un termo",
"search.result.none": "Sen resultados",
"search.result.one": "1 resultado atopado",
"search.result.other": "# resultados atopados",
"skip.link.title": "Ir ao contido",
"source.link.title": "Ir ao repositorio",
"toc.title": "Táboa de contidos"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "gr",
"clipboard.copy": "Αντιγραφή",
"clipboard.copied": "Αντιγράφηκε",
"edit.link.title": "Επεξεργασία αυτής της σελίδας",
"footer.previous": "Επόμενη",
"footer.next": "Προηγούμενη",
"meta.comments": "Σχόλια",
"meta.source": "Πηγή",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Αναζήτηση",
"search.result.placeholder": "Πληκτρολογήστε για να αρχίσει η αναζήτηση",
"search.result.none": "Δε βρέθηκαν αντίστοιχα αρχεία",
"search.result.one": "1 αντίστοιχο αρχείο",
"search.result.other": "# αντίστοιχα αρχεία",
"skip.link.title": "Μετάβαση στο περιεχόμενο",
"source.link.title": "Μετάβαση στο αποθετήριο",
"toc.title": "Πίνακας περιεχομένων"
}[key] }}{% endmacro %}

Some files were not shown because too many files have changed in this diff Show More