forked from forks/microblog.pub
Tweak docs
This commit is contained in:
parent
71d3061848
commit
b20253d212
4 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
This branch is a complete rewrite of the original microblog.pub server.
|
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).
|
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.
|
This rewrite is built using "modern" Python 3.10, SQLite and does not need any external tasks queue service.
|
||||||
|
|
1
docs/templates/layout.html
vendored
1
docs/templates/layout.html
vendored
|
@ -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://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>
|
||||||
|
<li><code>{{ version }}</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ from jinja2 import FileSystemLoader
|
||||||
from jinja2 import select_autoescape
|
from jinja2 import select_autoescape
|
||||||
from markdown import markdown
|
from markdown import markdown
|
||||||
|
|
||||||
|
from app.config import VERSION
|
||||||
|
|
||||||
|
|
||||||
def markdownify(content: str) -> str:
|
def markdownify(content: str) -> str:
|
||||||
return markdown(content, extensions=["mdx_linkify"])
|
return markdown(content, extensions=["mdx_linkify"])
|
||||||
|
@ -20,7 +22,8 @@ def main() -> None:
|
||||||
|
|
||||||
readme = Path("README.md")
|
readme = Path("README.md")
|
||||||
template.stream(
|
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")
|
).dump("docs/dist/index.html")
|
||||||
|
|
||||||
|
|
||||||
|
|
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("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
|
@task
|
||||||
|
|
Loading…
Reference in a new issue