Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
46ed90dd
Commit
46ed90dd
authored
May 29, 2019
by
Julien Palard
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc: Add an optional obsolete header. (GH-13638)
parent
1c999262
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Doc/README.rst
Doc/README.rst
+9
-0
Doc/tools/templates/layout.html
Doc/tools/templates/layout.html
+10
-0
No files found.
Doc/README.rst
View file @
46ed90dd
...
...
@@ -113,6 +113,15 @@ Then, from the ``Doc`` directory, run ::
where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
see the make targets above).
Deprecation header
==================
You can define the ``outdated`` variable in ``html_context`` to show a
red banner on each page redirecting to the "latest" version.
The link points to the same page on ``/3/``, sadly for the moment the
language is lost during the process.
Contributing
============
...
...
Doc/tools/templates/layout.html
View file @
46ed90dd
{% extends "!layout.html" %}
{% block header %}
{%- if outdated %}
<div
id=
"outdated-warning"
style=
"padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;"
>
{% trans %}This document is for an old version of Python that is no longer supported.
You should upgrade, and read the {% endtrans %}
<a
href=
"/3/{{ pagename }}{{ file_suffix }}"
>
{% trans %} Python documentation for the last stable release {% endtrans %}
</a>
.
</div>
{%- endif %}
{% endblock %}
{% block rootrellink %}
{{ super() }}
<li>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment