diff --git a/docs/hooks.py b/docs/hooks.py new file mode 100644 index 00000000..cdb31a52 --- /dev/null +++ b/docs/hooks.py @@ -0,0 +1,6 @@ +import os +import shutil + +def copy_fonts(config, **kwargs): + site_dir = config['site_dir'] + shutil.copytree('docs/static/fonts', os.path.join(site_dir, 'get')) diff --git a/docs/static/css/extra.css b/docs/static/css/extra.css index 3bf931a8..b736f175 100644 --- a/docs/static/css/extra.css +++ b/docs/static/css/extra.css @@ -3,6 +3,8 @@ --md-primary-fg-color--light: #338574; --md-primary-fg-color--dark: #338574; --md-footer-bg-color: #353744; + --md-text-font: "Roboto"; + --md-code-font: "Roboto Mono"; } .md-header__button.md-logo :is(img, svg) { @@ -153,106 +155,106 @@ figure video { font-family: "Roboto"; font-style: normal; font-weight: 300; - src: url("static/fonts/roboto-v30-latin-300.eot"); - src: url("static/fonts/roboto-v30-latin-300.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-300.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-300.woff") format("woff"), - url("static/fonts/roboto-v30-latin-300.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-300.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-300.eot"); + src: url("../fonts/roboto-v30-latin-300.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-300.woff2") format("woff2"), url("../fonts/roboto-v30-latin-300.woff") format("woff"), + url("../fonts/roboto-v30-latin-300.ttf") format("truetype"), url("../fonts/roboto-v30-latin-300.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: italic; font-weight: 300; - src: url("static/fonts/roboto-v30-latin-300italic.eot"); - src: url("static/fonts/roboto-v30-latin-300italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-300italic.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-300italic.woff") format("woff"), - url("static/fonts/roboto-v30-latin-300italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-300italic.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-300italic.eot"); + src: url("../fonts/roboto-v30-latin-300italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-300italic.woff2") format("woff2"), url("../fonts/roboto-v30-latin-300italic.woff") format("woff"), + url("../fonts/roboto-v30-latin-300italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-300italic.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: normal; font-weight: 400; - src: url("static/fonts/roboto-v30-latin-regular.eot"); - src: url("static/fonts/roboto-v30-latin-regular.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-regular.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-regular.woff") format("woff"), - url("static/fonts/roboto-v30-latin-regular.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-regular.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-regular.eot"); + src: url("../fonts/roboto-v30-latin-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-regular.woff2") format("woff2"), url("../fonts/roboto-v30-latin-regular.woff") format("woff"), + url("../fonts/roboto-v30-latin-regular.ttf") format("truetype"), url("../fonts/roboto-v30-latin-regular.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: italic; font-weight: 400; - src: url("static/fonts/roboto-v30-latin-italic.eot"); - src: url("static/fonts/roboto-v30-latin-italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-italic.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-italic.woff") format("woff"), - url("static/fonts/roboto-v30-latin-italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-italic.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-italic.eot"); + src: url("../fonts/roboto-v30-latin-italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-italic.woff2") format("woff2"), url("../fonts/roboto-v30-latin-italic.woff") format("woff"), + url("../fonts/roboto-v30-latin-italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-italic.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: normal; font-weight: 500; - src: url("static/fonts/roboto-v30-latin-500.eot"); - src: url("static/fonts/roboto-v30-latin-500.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-500.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-500.woff") format("woff"), - url("static/fonts/roboto-v30-latin-500.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-500.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-500.eot"); + src: url("../fonts/roboto-v30-latin-500.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-500.woff2") format("woff2"), url("../fonts/roboto-v30-latin-500.woff") format("woff"), + url("../fonts/roboto-v30-latin-500.ttf") format("truetype"), url("../fonts/roboto-v30-latin-500.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: italic; font-weight: 500; - src: url("static/fonts/roboto-v30-latin-500italic.eot"); - src: url("static/fonts/roboto-v30-latin-500italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-500italic.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-500italic.woff") format("woff"), - url("static/fonts/roboto-v30-latin-500italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-500italic.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-500italic.eot"); + src: url("../fonts/roboto-v30-latin-500italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-500italic.woff2") format("woff2"), url("../fonts/roboto-v30-latin-500italic.woff") format("woff"), + url("../fonts/roboto-v30-latin-500italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-500italic.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: normal; font-weight: 700; - src: url("static/fonts/roboto-v30-latin-700.eot"); - src: url("static/fonts/roboto-v30-latin-700.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-700.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-700.woff") format("woff"), - url("static/fonts/roboto-v30-latin-700.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-700.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-700.eot"); + src: url("../fonts/roboto-v30-latin-700.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-700.woff2") format("woff2"), url("../fonts/roboto-v30-latin-700.woff") format("woff"), + url("../fonts/roboto-v30-latin-700.ttf") format("truetype"), url("../fonts/roboto-v30-latin-700.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto"; font-style: italic; font-weight: 700; - src: url("static/fonts/roboto-v30-latin-700italic.eot"); - src: url("static/fonts/roboto-v30-latin-700italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-v30-latin-700italic.woff2") format("woff2"), url("static/fonts/roboto-v30-latin-700italic.woff") format("woff"), - url("static/fonts/roboto-v30-latin-700italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-700italic.svg#Roboto") format("svg"); + src: url("../fonts/roboto-v30-latin-700italic.eot"); + src: url("../fonts/roboto-v30-latin-700italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-v30-latin-700italic.woff2") format("woff2"), url("../fonts/roboto-v30-latin-700italic.woff") format("woff"), + url("../fonts/roboto-v30-latin-700italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-700italic.svg#Roboto") format("svg"); } @font-face { font-display: swap; font-family: "Roboto Mono"; font-style: normal; font-weight: 400; - src: url("static/fonts/roboto-mono-v22-latin-regular.eot"); - src: url("static/fonts/roboto-mono-v22-latin-regular.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-mono-v22-latin-regular.woff2") format("woff2"), - url("static/fonts/roboto-mono-v22-latin-regular.woff") format("woff"), url("static/fonts/roboto-mono-v22-latin-regular.ttf") format("truetype"), url("static/fonts/roboto-mono-v22-latin-regular.svg#RobotoMono") format("svg"); + src: url("../fonts/roboto-mono-v22-latin-regular.eot"); + src: url("../fonts/roboto-mono-v22-latin-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-mono-v22-latin-regular.woff2") format("woff2"), + url("../fonts/roboto-mono-v22-latin-regular.woff") format("woff"), url("../fonts/roboto-mono-v22-latin-regular.ttf") format("truetype"), url("../fonts/roboto-mono-v22-latin-regular.svg#RobotoMono") format("svg"); } @font-face { font-display: swap; font-family: "Roboto Mono"; font-style: italic; font-weight: 400; - src: url("static/fonts/roboto-mono-v22-latin-italic.eot"); - src: url("static/fonts/roboto-mono-v22-latin-italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-mono-v22-latin-italic.woff2") format("woff2"), - url("static/fonts/roboto-mono-v22-latin-italic.woff") format("woff"), url("static/fonts/roboto-mono-v22-latin-italic.ttf") format("truetype"), url("static/fonts/roboto-mono-v22-latin-italic.svg#RobotoMono") format("svg"); + src: url("../fonts/roboto-mono-v22-latin-italic.eot"); + src: url("../fonts/roboto-mono-v22-latin-italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-mono-v22-latin-italic.woff2") format("woff2"), + url("../fonts/roboto-mono-v22-latin-italic.woff") format("woff"), url("../fonts/roboto-mono-v22-latin-italic.ttf") format("truetype"), url("../fonts/roboto-mono-v22-latin-italic.svg#RobotoMono") format("svg"); } @font-face { font-display: swap; font-family: "Roboto Mono"; font-style: normal; font-weight: 700; - src: url("static/fonts/roboto-mono-v22-latin-700.eot"); - src: url("static/fonts/roboto-mono-v22-latin-700.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-mono-v22-latin-700.woff2") format("woff2"), url("static/fonts/roboto-mono-v22-latin-700.woff") format("woff"), - url("static/fonts/roboto-mono-v22-latin-700.ttf") format("truetype"), url("static/fonts/roboto-mono-v22-latin-700.svg#RobotoMono") format("svg"); + src: url("../fonts/roboto-mono-v22-latin-700.eot"); + src: url("../fonts/roboto-mono-v22-latin-700.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-mono-v22-latin-700.woff2") format("woff2"), url("../fonts/roboto-mono-v22-latin-700.woff") format("woff"), + url("../fonts/roboto-mono-v22-latin-700.ttf") format("truetype"), url("../fonts/roboto-mono-v22-latin-700.svg#RobotoMono") format("svg"); } @font-face { font-display: swap; font-family: "Roboto Mono"; font-style: italic; font-weight: 700; - src: url("static/fonts/roboto-mono-v22-latin-700italic.eot"); - src: url("static/fonts/roboto-mono-v22-latin-700italic.eot?#iefix") format("embedded-opentype"), url("static/fonts/roboto-mono-v22-latin-700italic.woff2") format("woff2"), - url("static/fonts/roboto-mono-v22-latin-700italic.woff") format("woff"), url("static/fonts/roboto-mono-v22-latin-700italic.ttf") format("truetype"), url("static/fonts/roboto-mono-v22-latin-700italic.svg#RobotoMono") format("svg"); + src: url("../fonts/roboto-mono-v22-latin-700italic.eot"); + src: url("../fonts/roboto-mono-v22-latin-700italic.eot?#iefix") format("embedded-opentype"), url("../fonts/roboto-mono-v22-latin-700italic.woff2") format("woff2"), + url("../fonts/roboto-mono-v22-latin-700italic.woff") format("woff"), url("../fonts/roboto-mono-v22-latin-700italic.ttf") format("truetype"), url("../fonts/roboto-mono-v22-latin-700italic.svg#RobotoMono") format("svg"); } diff --git a/mkdocs.yml b/mkdocs.yml index 9c5c327c..66fc4c84 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,6 +71,9 @@ plugins: - search - minify: minify_html: true + - mkdocs-simple-hooks: + hooks: + on_post_build: "docs.hooks:copy_fonts" nav: - "Getting started": index.md diff --git a/requirements.txt b/requirements.txt index 9c2212a8..17b0fc1a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ # The documentation uses 'mkdocs', which is written in Python mkdocs-material mkdocs-minify-plugin +mkdocs-simple-hooks