Tweak docs

This commit is contained in:
Thomas Sileo 2022-07-04 22:00:19 +02:00
parent 71d3061848
commit b20253d212
4 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,8 @@
This branch is a complete rewrite of the original microblog.pub server.
Check out the test instance here: [testing.microblog.pub](https://testing.microblog.pub/).
The original server became hard to debug, maintain and is not super easy to deploy (due to the dependecies like MongoDB).
This rewrite is built using "modern" Python 3.10, SQLite and does not need any external tasks queue service.

View File

@ -71,6 +71,7 @@ nav a:hover, main a:hover, header p a:hover {
<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>
<li><code>{{ version }}</code></li>
</ul>
</nav>

View File

@ -5,6 +5,8 @@ from jinja2 import FileSystemLoader
from jinja2 import select_autoescape
from markdown import markdown
from app.config import VERSION
def markdownify(content: str) -> str:
return markdown(content, extensions=["mdx_linkify"])
@ -20,7 +22,8 @@ def main() -> None:
readme = Path("README.md")
template.stream(
content=markdownify(readme.read_text().removeprefix("# microblog.pub"))
content=markdownify(readme.read_text().removeprefix("# microblog.pub")),
version=VERSION,
).dump("docs/dist/index.html")

View File

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