From b20253d21200681ecd189c64ea0222039d08e054 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 4 Jul 2022 22:00:19 +0200 Subject: [PATCH] Tweak docs --- README.md | 2 ++ docs/templates/layout.html | 1 + scripts/generate_docs.py | 5 ++++- tasks.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8dfd50c..be21b43 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/templates/layout.html b/docs/templates/layout.html index 272a059..fa99423 100644 --- a/docs/templates/layout.html +++ b/docs/templates/layout.html @@ -71,6 +71,7 @@ nav a:hover, main a:hover, header p a:hover {
  • Source code
  • Bug tracker
  • Mailing list +
  • {{ version }}
  • diff --git a/scripts/generate_docs.py b/scripts/generate_docs.py index 3126516..d88abc4 100644 --- a/scripts/generate_docs.py +++ b/scripts/generate_docs.py @@ -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") diff --git a/tasks.py b/tasks.py index 4863399..29ecfe6 100644 --- a/tasks.py +++ b/tasks.py @@ -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