Tweak docs

main
Thomas Sileo 2022-07-05 21:35:39 +02:00
parent 665b7f5847
commit dbd2c8afea
5 changed files with 32 additions and 4 deletions

View File

@ -1,5 +1,15 @@
# Installing
[TOC]
## Docker edition
TODO
## Python developer edition
Assuming you have a working **Python 3.10+** environment.
Setup [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer).
```bash

View File

@ -30,7 +30,10 @@ nav.flexbox ul li {
nav.flexbox ul li:last-child {
margin-right: 0px;
}
h1 {
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
header h1 {
font-weight: normal;
text-align: center;
margin: 30px auto;
@ -80,6 +83,7 @@ code {
<ul>
<li><a href="/"{% if path == "/" %} class="active"{% endif %}>Home</a>
<li><a href="/installing.html"{% if path == "/installing.html" %} class="active"{% endif %}>Installing</a>
<li><a href="/user_guide.html"{% if path == "/user_guide.html" %} class="active"{% endif %}>User guide</a>
<li><a href="https://sr.ht/~tsileo/microblog.pub/">Source code</a>
<li><a href="https://todo.sr.ht/~tsileo/microblog.pub">Bug tracker</a>
<li><a href="https://sr.ht/~tsileo/microblog.pub/lists">Mailing list</a>

View File

@ -0,0 +1,5 @@
# User guide
[TOC]
TODO

View File

@ -10,7 +10,9 @@ from app.config import VERSION
def markdownify(content: str) -> str:
return markdown(content, extensions=["mdx_linkify", "fenced_code", "codehilite"])
return markdown(content, extensions=[
"mdx_linkify", "fenced_code", "codehilite", "toc"
])
def main() -> None:
@ -33,11 +35,18 @@ def main() -> None:
install = Path("docs/install.md")
template.stream(
content=markdownify(install.read_text().removeprefix("# microblog.pub")),
content=markdownify(install.read_text()),
version=VERSION,
path="/installing.html",
).dump("docs/dist/installing.html")
user_guide = Path("docs/user_guide.md")
template.stream(
content=markdownify(user_guide.read_text()),
version=VERSION,
path="/user_guide.html",
).dump("docs/dist/user_guide.html")
if __name__ == "__main__":
main()

View File

@ -96,7 +96,7 @@ def build_configuration_wizard_image(ctx):
@task
def build_docs(ctx):
# type: (Context) -> None
run("PYTHONPATH=. poetry run python scripts/generate_docs.py", pty=True, echo=True)
run("PYTHONPATH=. poetry run python scripts/build_docs.py", pty=True, echo=True)
@task