chore(mkdocs): add announcement banner

Alongside some config trickery for builds at RTD.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2023-09-24 16:12:35 +00:00
parent d66f845682
commit 4958ff2427
7 changed files with 37 additions and 2 deletions

26
overrides/main.html Normal file
View file

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block extrahead %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/mkdocs-material-styling.css' | url }}">
{% endblock %}
<!-- Staging build -->
{% block announce %}
{% if config.extra.deployment == "staging" %}
You're previewig the staging build of @ajhalili2006's website on <a href="https://readthedocs.org">RTD Community</a>. <strong><a href="https://andreijiroh.eu.org">Go back to production</a></strong>
{% else %}
For updates follow <strong>@ajhalili2006</strong> on
<a rel="me" href="https://tilde.zone/@ajhalili2006">
<span class="twemoji mastodon">
{% include ".icons/fontawesome/brands/mastodon.svg" %}
</span>
<strong>the tildeverse</strong>
</a>
and
<a href="https://substack.com/@ajhalili2006">
<span class="twemoji substack">
{% include ".icons/simple/substack.svg" %}
</span>
<strong>Substack</strong>
</a>
{% endif %}
{% endblock %}