summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Göhler <github@ghlr.de>2020-07-18 14:53:29 +0200
committerGitHub <noreply@github.com>2020-07-18 14:53:29 +0200
commit6c25ae112ce090f1885b773016b124a7b6172a8d (patch)
tree8866c7eafc67e86a2a6f5e8e96d2e3f5f32a0d7c
parent8936848d68fdcee10b8434461af6c744301d372e (diff)
parent39b1b4880065b6fb1f7561a75bdb16ca37c49603 (diff)
downloadvyos-documentation-6c25ae112ce090f1885b773016b124a7b6172a8d.tar.gz
vyos-documentation-6c25ae112ce090f1885b773016b124a7b6172a8d.zip
Merge pull request #286 from rebortg/404
404: catch page not found error
-rw-r--r--docker/Dockerfile2
-rw-r--r--docs/404.rst10
-rw-r--r--docs/conf.py1
-rw-r--r--requirements.txt3
4 files changed, 15 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 5e3095d7..02b0fc26 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -32,6 +32,8 @@ RUN apt-get update && apt-get install -y \
RUN pip3 install Sphinx
RUN pip3 install sphinx-rtd-theme
RUN pip3 install sphinx-autobuild
+RUN pip3 install sphinx-notfound-page
+
# Cleanup
RUN rm -rf /var/lib/apt/lists/*
diff --git a/docs/404.rst b/docs/404.rst
new file mode 100644
index 00000000..85444615
--- /dev/null
+++ b/docs/404.rst
@@ -0,0 +1,10 @@
+:orphan:
+
+Page Not Found
+==============
+
+Sorry, We could not find a page.
+Try using the search box or go to the release homepage:
+
+ * `1.2.x (crux) <https://docs.vyos.io/en/crux/>`_
+ * `rolling release (equuleus) <https://docs.vyos.io/en/latest/>`_ \ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index b63d4a03..bb32aa33 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -44,6 +44,7 @@ extensions = ['sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
+ 'notfound.extension',
'vyos'
]
diff --git a/requirements.txt b/requirements.txt
index 6672039c..fc8e190e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
Sphinx>=1.4.3
sphinx-rtd-theme
setuptools
-docutils \ No newline at end of file
+docutils
+sphinx-notfound-page