Skip to content

Commit 71ce81d

Browse files
authored
Merge branch '6-dev' into install-wheel
2 parents eea724d + ebdb69c commit 71ce81d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

docs/_templates/404.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% extends "!page.html" %}
2+
3+
{%- block htmltitle %}
4+
<title>{{ title|striptags|e }}{%- for parent in parents %} – {{ parent.title }}{%- endfor %}{{ titlesuffix }}</title>
5+
{%- endblock %}
6+
7+
{% block body %}
8+
<div>
9+
<h1>Page not found</h1>
10+
<p>Unfortunately we couldn't find the content you were looking for.</p>
11+
</div>
12+
13+
<style>
14+
/* Hide empty sub menu. */
15+
.sticky-top .bd-toc {
16+
visibility: hidden;
17+
}
18+
</style>
19+
{% endblock %}

docs/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"sphinxext.opengraph",
5656
"sphinx.ext.viewcode", # plone.api
5757
"sphinx.ext.autosummary", # plone.api
58+
"notfound.extension",
5859
]
5960

6061

@@ -206,6 +207,12 @@
206207
copybutton_prompt_is_regexp = True
207208

208209

210+
# -- sphinx-notfound-page configuration ----------------------------------
211+
212+
notfound_urls_prefix = None
213+
notfound_template = "404.html"
214+
215+
209216
# -- Options for HTML output -------------------------------------------------
210217

211218
# The theme to use for HTML and HTML Help pages. See the documentation for

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ sphinx-autobuild
99
sphinx-book-theme==0.3.3 # Temporary pin until we can sort out HTML refactoring.
1010
sphinx-copybutton
1111
sphinx-design
12+
sphinx-notfound-page
1213
sphinx-sitemap
1314
sphinx-togglebutton
1415
sphinxcontrib.httpdomain # plone.restapi

0 commit comments

Comments
 (0)