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

View file

@ -23,7 +23,7 @@ build:
- pngquant - pngquant
mkdocs: mkdocs:
configuration: mkdocs.yml configuration: mkdocs.readthedocs.yml
# Optionally declare the Python requirements required to build your docs # Optionally declare the Python requirements required to build your docs
python: python:

4
mkdocs.readthedocs.yml Normal file
View file

@ -0,0 +1,4 @@
INHERIT: mkdocs.yml
site_name: ~ajhalili2006 (staging website)
extra:
deployment: staging # for the announcement banner

View file

@ -152,6 +152,7 @@ markdown_extensions:
# extras # extras
extra: extra:
#deployment: staging
# my socials # my socials
social: social:
- icon: simple/substack - icon: simple/substack

View file

@ -8,5 +8,7 @@
<p>Either the URL has been moved without redirects, taken down for any reasons, or it doesn't exist (yet).</p> <p>Either the URL has been moved without redirects, taken down for any reasons, or it doesn't exist (yet).</p>
<h2>Troubleshooting tips</h2> <h2>Troubleshooting tips</h2>
<p>Try checking the URL for any misspellings or improper use of dashes, underscores and periods.</p> <p>Try checking the URL for any misspellings or improper use of dashes, underscores and periods.</p>
<p>If you're working in this site and you hit an URL configured for redirects (at Cloudflare Pages or similiar), try <a href="https://go.recaptime.eu.org/pkgs/pip3/mkdocs-redirects">configuring redirects in the config first</a>.</p> <p>If you're working in this site and you hit an URL configured for redirects (at Cloudflare Pages or similiar), try <a href="https://pypi.org/project/mkdocs-redirects/">configuring redirects in the Mkdocs config first</a>.</p>
<p>Depending on the site version you're viewing, you may need to switch between <a href="https://andreijiroh.eu.org">production</a>
and <a href="https://staging.andreijiroh.eu.org">staging</a> versions of the website.</p>
{% endblock %} {% endblock %}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"version":3,"sources":["src/overrides/assets/stylesheets/custom/_typeset.scss","../../../../src/overrides/assets/stylesheets/custom.scss","src/templates/assets/stylesheets/utilities/_break.scss","src/overrides/assets/stylesheets/custom/layout/_banner.scss","src/overrides/assets/stylesheets/custom/layout/_hero.scss","src/overrides/assets/stylesheets/custom/layout/_iconsearch.scss","src/overrides/assets/stylesheets/custom/layout/_sponsorship.scss"],"names":[],"mappings":"AA2BA,iBACE,cAIE,kBC7BF,CDgCA,QAEE,qBC/BF,CACF,CD0CE,qBACE,aCxCJ,CD6CE,sBACE,aC3CJ,CD+CE,uBACE,UC7CJ,CDgDI,8BAGE,QAAA,CACA,sBAAA,CAHA,iBAAA,CACA,UC5CN,CDkDI,8BAOE,WAAA,CAFA,WAAA,CAFA,MAAA,CAGA,eAAA,CALA,iBAAA,CACA,KAAA,CAEA,UC7CN,CDqDE,uBACE,2BCnDJ,CDuDE,0BACE,aCrDJ,CD2DE,uBACE,eCzDJ,CD4DI,8BACE,4BAAA,CACA,4BAAA,CACA,2CC1DN,CD6DM,uCACE,2BC3DR,CDgEI,8BACE,WAAA,CACA,iBC9DN,CDkEI,uCAGE,4BC/DN,CD4DI,uCAGE,6BC/DN,CD4DI,uCAIE,+BChEN,CD4DI,uCAIE,gCChEN,CD4DI,6BAEE,iDAAA,CADA,aC7DN,CDmEM,wCACE,mBCjER,CDsEI,uCAEE,6BClEN,CDgEI,uCAEE,4BClEN,CDgEI,uCAGE,gCCnEN,CDgEI,uCAGE,+BCnEN,CDgEI,6BAIE,iEAAA,CAHA,mBCjEN,CD2EE,+BACE,cAAA,CACA,uBCzEJ,CD4EI,0EACE,WC1EN,CD8EI,oCAGE,2CAAA,CADA,gCAAA,CADA,aC1EN,CDoFI,wDAEE,cAAA,CAAA,cClFN,CCiII,wCFjDA,wDAMI,oBAAA,CAAA,eCjFN,CACF,CDqFI,4BACE,8BAAA,CAAA,kBCnFN,CDwFE,uBACE,eCtFJ,CDyFI,0BACE,eCvFN,CD0FM,6BACE,iBCxFR,CD6FI,6BACE,YAAA,CACA,SC3FN,CD+FI,gCACE,YAAA,CACA,MAAA,CAC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,CAFA,yCAAA,CAHA,eAAA,CACA,eAAA,CACA,kBAAA,CAEA,iBLsSR,CKjSM,uCACE,aAAA,CAGA,mCAAA,CADA,WAAA,CAEA,uBAAA,CAHA,ULsSR,CK7RE,oCACE,eL+RJ,CK3RE,sEAEE,eL6RJ","file":"custom.css"}

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 %}