mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-08-25 04:46:40 +00:00
hmmm
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import mkdocs.plugins
|
||||||
|
|
||||||
|
|
||||||
|
@mkdocs.plugins.event_priority(-100)
|
||||||
|
def on_config(config):
|
||||||
|
version = os.environ.get("MIKE_DOCS_VERSION")
|
||||||
|
|
||||||
|
if version == "nightly:"
|
||||||
|
extra = config.get("extra", {})
|
||||||
|
extra["nightly"] = True
|
||||||
|
|
||||||
@@ -147,6 +147,8 @@ extra:
|
|||||||
provider: mike
|
provider: mike
|
||||||
default: stable
|
default: stable
|
||||||
alias: true
|
alias: true
|
||||||
|
# Used for the nightly banner
|
||||||
|
nightly: false
|
||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
nav:
|
nav:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block announce %}
|
{% block announce %}
|
||||||
{% if version.name == "nightly" %}
|
{% if config.extra.nightly %}
|
||||||
<!-- Need to reapply margin from base CSS, which is overridden in extra CSS (to fix empty banner) -->
|
<!-- Need to reapply margin from base CSS, which is overridden in extra CSS (to fix empty banner) -->
|
||||||
<div style="margin: 0.6rem auto">
|
<div style="margin: 0.6rem auto">
|
||||||
This is <strong>nightly</strong> documentation, and it may differ from stable. Please see <strong><a href="{{ '../' ~ base_url }}">here for stable documentation</a></strong>.
|
This is <strong>nightly</strong> documentation, and it may differ from stable. Please see <strong><a href="{{ '../' ~ base_url }}">here for stable documentation</a></strong>.
|
||||||
|
|||||||
Reference in New Issue
Block a user