Tweak docs
parent
665b7f5847
commit
dbd2c8afea
|
@ -1,5 +1,15 @@
|
||||||
|
# Installing
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
## Docker edition
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
## Python developer edition
|
## 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).
|
Setup [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -30,7 +30,10 @@ nav.flexbox ul li {
|
||||||
nav.flexbox ul li:last-child {
|
nav.flexbox ul li:last-child {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
header h1 {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 30px auto;
|
margin: 30px auto;
|
||||||
|
@ -80,6 +83,7 @@ code {
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/"{% if path == "/" %} class="active"{% endif %}>Home</a>
|
<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="/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://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://todo.sr.ht/~tsileo/microblog.pub">Bug tracker</a>
|
||||||
<li><a href="https://sr.ht/~tsileo/microblog.pub/lists">Mailing list</a>
|
<li><a href="https://sr.ht/~tsileo/microblog.pub/lists">Mailing list</a>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
# User guide
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
TODO
|
|
@ -10,7 +10,9 @@ from app.config import VERSION
|
||||||
|
|
||||||
|
|
||||||
def markdownify(content: str) -> str:
|
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:
|
def main() -> None:
|
||||||
|
@ -33,11 +35,18 @@ def main() -> None:
|
||||||
|
|
||||||
install = Path("docs/install.md")
|
install = Path("docs/install.md")
|
||||||
template.stream(
|
template.stream(
|
||||||
content=markdownify(install.read_text().removeprefix("# microblog.pub")),
|
content=markdownify(install.read_text()),
|
||||||
version=VERSION,
|
version=VERSION,
|
||||||
path="/installing.html",
|
path="/installing.html",
|
||||||
).dump("docs/dist/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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
2
tasks.py
2
tasks.py
|
@ -96,7 +96,7 @@ def build_configuration_wizard_image(ctx):
|
||||||
@task
|
@task
|
||||||
def build_docs(ctx):
|
def build_docs(ctx):
|
||||||
# type: (Context) -> None
|
# 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
|
@task
|
||||||
|
|
Loading…
Reference in New Issue