Skip to content

Commit

Permalink
chore(ci): install and configure mkdocs for build (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Feb 19, 2024
1 parent 119af95 commit 4ba2b5a
Show file tree
Hide file tree
Showing 6 changed files with 1,021 additions and 271 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
__pycache__
.coverage
venv/
10 changes: 10 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* set primary color */
:root {
--md-primary-fg-color: #00C9BF;
--md-accent-fg-color: #00C9BF;
}

/* make code selectable on main */
.highlight .o {
user-select: none;
}
12 changes: 12 additions & 0 deletions docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Generate the code reference pages and navigation.
From https://mkdocstrings.github.io/recipes/
"""

from pathlib import Path

import mkdocs_gen_files

readme = Path("README.md").open("r")
with mkdocs_gen_files.open("index.md", "w") as index_file:
index_file.writelines(readme.read())
50 changes: 50 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
site_name: Python Font Fjallaone
repo_url: https://github.com/radiorabe/python-font-fjallaone
repo_name: radiorabe/python-font-fjallaone

theme:
name: "material"
palette:
# Palette toggle for dark mode
- scheme: slate
primary: '#00c9bf'
toggle:
icon: material/brightness-4
name: Switch to light mode
# Palette toggle for light mode
- scheme: default
primary: '#00c9bf'
toggle:
icon: material/brightness-7
name: Switch to dark mode
icon:
repo: fontawesome/brands/git-alt
features:
- content.code.copy
- toc.integrate

markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences

extra_css:
- css/style.css

plugins:
- search
- autorefs
- gen-files:
scripts:
- docs/gen_ref_pages.py
- literate-nav:
nav_file: SUMMARY.md
- section-index

nav:
- README: index.md

watch:
- README.md
Loading

0 comments on commit 4ba2b5a

Please sign in to comment.