Built mkdocs plugin, set font to desired options

pull/667/head
Luke Walker 2023-03-12 15:32:25 -04:00
parent 13a90172c2
commit b1916b5066
4 changed files with 48 additions and 36 deletions

6
docs/hooks.py 100644
View File

@ -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'))

View File

@ -3,6 +3,8 @@
--md-primary-fg-color--light: #338574; --md-primary-fg-color--light: #338574;
--md-primary-fg-color--dark: #338574; --md-primary-fg-color--dark: #338574;
--md-footer-bg-color: #353744; --md-footer-bg-color: #353744;
--md-text-font: "Roboto";
--md-code-font: "Roboto Mono";
} }
.md-header__button.md-logo :is(img, svg) { .md-header__button.md-logo :is(img, svg) {
@ -153,106 +155,106 @@ figure video {
font-family: "Roboto"; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
src: url("static/fonts/roboto-v30-latin-300.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-300.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-300.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-300.ttf") format("truetype"), url("../fonts/roboto-v30-latin-300.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: italic; font-style: italic;
font-weight: 300; font-weight: 300;
src: url("static/fonts/roboto-v30-latin-300italic.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-300italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-300italic.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-300italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-300italic.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: url("static/fonts/roboto-v30-latin-regular.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-regular.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-regular.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-regular.ttf") format("truetype"), url("../fonts/roboto-v30-latin-regular.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: url("static/fonts/roboto-v30-latin-italic.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-italic.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-italic.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
src: url("static/fonts/roboto-v30-latin-500.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-500.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-500.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-500.ttf") format("truetype"), url("../fonts/roboto-v30-latin-500.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: italic; font-style: italic;
font-weight: 500; font-weight: 500;
src: url("static/fonts/roboto-v30-latin-500italic.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-500italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-500italic.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-500italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-500italic.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: url("static/fonts/roboto-v30-latin-700.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-700.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-700.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-700.ttf") format("truetype"), url("../fonts/roboto-v30-latin-700.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto"; font-family: "Roboto";
font-style: italic; font-style: italic;
font-weight: 700; font-weight: 700;
src: url("static/fonts/roboto-v30-latin-700italic.eot"); src: url("../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"), 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("static/fonts/roboto-v30-latin-700italic.ttf") format("truetype"), url("static/fonts/roboto-v30-latin-700italic.svg#Roboto") format("svg"); url("../fonts/roboto-v30-latin-700italic.ttf") format("truetype"), url("../fonts/roboto-v30-latin-700italic.svg#Roboto") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto Mono"; font-family: "Roboto Mono";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: url("static/fonts/roboto-mono-v22-latin-regular.eot"); src: url("../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"), src: url("../fonts/roboto-mono-v22-latin-regular.eot?#iefix") format("embedded-opentype"), url("../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"); 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-face {
font-display: swap; font-display: swap;
font-family: "Roboto Mono"; font-family: "Roboto Mono";
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: url("static/fonts/roboto-mono-v22-latin-italic.eot"); src: url("../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"), src: url("../fonts/roboto-mono-v22-latin-italic.eot?#iefix") format("embedded-opentype"), url("../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"); 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-face {
font-display: swap; font-display: swap;
font-family: "Roboto Mono"; font-family: "Roboto Mono";
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: url("static/fonts/roboto-mono-v22-latin-700.eot"); src: url("../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"), 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("static/fonts/roboto-mono-v22-latin-700.ttf") format("truetype"), url("static/fonts/roboto-mono-v22-latin-700.svg#RobotoMono") format("svg"); url("../fonts/roboto-mono-v22-latin-700.ttf") format("truetype"), url("../fonts/roboto-mono-v22-latin-700.svg#RobotoMono") format("svg");
} }
@font-face { @font-face {
font-display: swap; font-display: swap;
font-family: "Roboto Mono"; font-family: "Roboto Mono";
font-style: italic; font-style: italic;
font-weight: 700; font-weight: 700;
src: url("static/fonts/roboto-mono-v22-latin-700italic.eot"); src: url("../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"), src: url("../fonts/roboto-mono-v22-latin-700italic.eot?#iefix") format("embedded-opentype"), url("../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"); 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");
} }

View File

@ -71,6 +71,9 @@ plugins:
- search - search
- minify: - minify:
minify_html: true minify_html: true
- mkdocs-simple-hooks:
hooks:
on_post_build: "docs.hooks:copy_fonts"
nav: nav:
- "Getting started": index.md - "Getting started": index.md

View File

@ -1,3 +1,4 @@
# The documentation uses 'mkdocs', which is written in Python # The documentation uses 'mkdocs', which is written in Python
mkdocs-material mkdocs-material
mkdocs-minify-plugin mkdocs-minify-plugin
mkdocs-simple-hooks