mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-05-04 14:00:38 +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
|
||||
default: stable
|
||||
alias: true
|
||||
# Used for the nightly banner
|
||||
nightly: false
|
||||
|
||||
# Navigation
|
||||
nav:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% 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) -->
|
||||
<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>.
|
||||
|
||||
Reference in New Issue
Block a user