summaryrefslogtreecommitdiffstats
path: root/docs/source
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/_templates/versions.html14
-rw-r--r--docs/source/conf.py9
2 files changed, 23 insertions, 0 deletions
diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html
new file mode 100644
index 00000000000..3e5e6a020af
--- /dev/null
+++ b/docs/source/_templates/versions.html
@@ -0,0 +1,14 @@
+{% if mamedev_site %}
+ <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Downloads') }}">
+ <span class="rst-current-version" data-toggle="rst-current-version">
+ <span class="fa fa-book">Downloads</span>
+ <span class="fa fa-caret-down"></span>
+ </span>
+ <div class="rst-other-versions">
+ <dl>
+ <dd><a href="https://docs.mamedev.org/_files/MAME.pdf">PDF</a></dd>
+ <dd><a href="https://docs.mamedev.org/_files/MAME.epub">EPUB</a></dd>
+ </dl>
+ </div>
+ </div>
+{% endif %}
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b0216243210..95dc1d19bbf 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -262,3 +262,12 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
+
+# Add download links at bottom left when the MAMEDEV environment
+# varaible is set. See versions.html in the _template folder.
+try:
+ html_context
+except NameError:
+ html_context = dict()
+if os.getenv("MAMEDEV") != None:
+ html_context['mamedev_site'] = True