Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
.cache/

site
docs/all.txt

# IDE / Editor
.vscode/
Expand Down
12 changes: 12 additions & 0 deletions hooks/gather.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pathlib import Path

src_dir = Path("./docs/content")
out_file = Path("./docs/all.txt")

def gather_md(*args, **kwargs):
md_files = sorted(src_dir.rglob("*.md"))

with out_file.open("w", encoding="utf-8") as out:
for md in md_files:
out.write(f"\n\n# [{md.relative_to(src_dir)}]\n\n")
out.write(md.read_text(encoding="utf-8"))
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ plugins:
- redirects:
redirect_maps:
'index.md': 'content/index.md'
- mkdocs-simple-hooks:
hooks:
on_pre_build: "hooks.gather:gather_md"

hooks:
- hooks/check.py
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mkdocs
mkdocs-material
pymdown-extensions
mkdocs-redirects
mkdocs-redirects
mkdocs-simple-hooks
Loading