forked from clan/clan-core
Merge pull request 'Docs: use offline fonts' (#1480) from hsjobeki-main into main
This commit is contained in:
commit
a77bf5bf21
4
docs/.gitignore
vendored
4
docs/.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
/site/reference
|
/site/reference
|
||||||
|
/site/static/Roboto-Regular.ttf
|
||||||
|
/site/static/FiraCode-VF.ttf
|
@ -39,7 +39,7 @@ exclude_docs: |
|
|||||||
|
|
||||||
nav:
|
nav:
|
||||||
- Blog:
|
- Blog:
|
||||||
- blog/index.md
|
- blog/index.md
|
||||||
- Getting started:
|
- Getting started:
|
||||||
- index.md
|
- index.md
|
||||||
- Installer: getting-started/installer.md
|
- Installer: getting-started/installer.md
|
||||||
@ -94,6 +94,7 @@ docs_dir: site
|
|||||||
site_dir: out
|
site_dir: out
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
|
font: false
|
||||||
logo: https://clan.lol/static/logo/clan-white.png
|
logo: https://clan.lol/static/logo/clan-white.png
|
||||||
favicon: https://clan.lol/static/logo/clan-dark.png
|
favicon: https://clan.lol/static/logo/clan-dark.png
|
||||||
name: material
|
name: material
|
||||||
@ -105,8 +106,6 @@ theme:
|
|||||||
- content.tabs.link
|
- content.tabs.link
|
||||||
icon:
|
icon:
|
||||||
repo: fontawesome/brands/git
|
repo: fontawesome/brands/git
|
||||||
font:
|
|
||||||
code: Roboto Mono
|
|
||||||
|
|
||||||
palette:
|
palette:
|
||||||
# Palette toggle for light mode
|
# Palette toggle for light mode
|
||||||
@ -128,6 +127,7 @@ theme:
|
|||||||
name: Switch to light mode
|
name: Switch to light mode
|
||||||
|
|
||||||
extra_css:
|
extra_css:
|
||||||
|
- static/extra.css
|
||||||
- static/asciinema-player/custom-theme.css
|
- static/asciinema-player/custom-theme.css
|
||||||
- static/asciinema-player/asciinema-player.css
|
- static/asciinema-player/asciinema-player.css
|
||||||
|
|
||||||
@ -142,7 +142,6 @@ extra:
|
|||||||
- icon: fontawesome/solid/rss
|
- icon: fontawesome/solid/rss
|
||||||
link: /feed_rss_created.xml
|
link: /feed_rss_created.xml
|
||||||
|
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
- blog
|
- blog
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
clan-cli-docs,
|
clan-cli-docs,
|
||||||
asciinema-player-js,
|
asciinema-player-js,
|
||||||
asciinema-player-css,
|
asciinema-player-css,
|
||||||
|
roboto,
|
||||||
|
fira-code,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@ -33,6 +35,10 @@ pkgs.stdenv.mkDerivation {
|
|||||||
mkdir -p ./site/static/asciinema-player
|
mkdir -p ./site/static/asciinema-player
|
||||||
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
|
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
|
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 = ''
|
buildPhase = ''
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
clan-cli-docs,
|
clan-cli-docs,
|
||||||
asciinema-player-js,
|
asciinema-player-js,
|
||||||
asciinema-player-css,
|
asciinema-player-css,
|
||||||
|
roboto,
|
||||||
|
fira-code,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
@ -18,7 +20,12 @@ pkgs.mkShell {
|
|||||||
echo "Generated API documentation in './site/reference/' "
|
echo "Generated API documentation in './site/reference/' "
|
||||||
|
|
||||||
mkdir -p ./site/static/asciinema-player
|
mkdir -p ./site/static/asciinema-player
|
||||||
|
|
||||||
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
|
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
|
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/
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
13
docs/site/static/extra.css
Normal file
13
docs/site/static/extra.css
Normal file
@ -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";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user