diff --git a/docs/.gitignore b/docs/.gitignore index db65b3a9..932a4756 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,3 @@ -/site/reference \ No newline at end of file +/site/reference +/site/static/Roboto-Regular.ttf +/site/static/FiraCode-VF.ttf \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 0997d968..4d1f7e72 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -39,7 +39,7 @@ exclude_docs: | nav: - Blog: - - blog/index.md + - blog/index.md - Getting started: - index.md - Installer: getting-started/installer.md @@ -94,6 +94,7 @@ docs_dir: site site_dir: out theme: + font: false logo: https://clan.lol/static/logo/clan-white.png favicon: https://clan.lol/static/logo/clan-dark.png name: material @@ -105,8 +106,6 @@ theme: - content.tabs.link icon: repo: fontawesome/brands/git - font: - code: Roboto Mono palette: # Palette toggle for light mode @@ -128,6 +127,7 @@ theme: name: Switch to light mode extra_css: + - static/extra.css - static/asciinema-player/custom-theme.css - static/asciinema-player/asciinema-player.css @@ -142,7 +142,6 @@ extra: - icon: fontawesome/solid/rss link: /feed_rss_created.xml - plugins: - search - blog diff --git a/docs/nix/default.nix b/docs/nix/default.nix index 4e606b77..0e16c705 100644 --- a/docs/nix/default.nix +++ b/docs/nix/default.nix @@ -4,6 +4,8 @@ clan-cli-docs, asciinema-player-js, asciinema-player-css, + roboto, + fira-code, ... }: let @@ -33,6 +35,10 @@ pkgs.stdenv.mkDerivation { mkdir -p ./site/static/asciinema-player ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css + + # Link to fonts + ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/ + ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/ ''; buildPhase = '' diff --git a/docs/nix/shell.nix b/docs/nix/shell.nix index 934cd8d3..0d916988 100644 --- a/docs/nix/shell.nix +++ b/docs/nix/shell.nix @@ -5,6 +5,8 @@ clan-cli-docs, asciinema-player-js, asciinema-player-css, + roboto, + fira-code, ... }: pkgs.mkShell { @@ -18,7 +20,12 @@ pkgs.mkShell { echo "Generated API documentation in './site/reference/' " mkdir -p ./site/static/asciinema-player + ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css + + # Link to fonts + ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/ + ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/ ''; } diff --git a/docs/site/static/extra.css b/docs/site/static/extra.css new file mode 100644 index 00000000..505b38d3 --- /dev/null +++ b/docs/site/static/extra.css @@ -0,0 +1,13 @@ +@font-face { + font-family: "Roboto"; + src: url(./Roboto-Regular.ttf) format('truetype'); +} +@font-face { + font-family: "Fira Code"; + src: url(./FiraCode-VF.ttf) format('truetype'); +} + +:root { + --md-text-font: "Roboto"; + --md-code-font: "Fira Code"; +} \ No newline at end of file