Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30607: Use external python-doc-theme #2017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-30607: Use external python-doc-theme
  • Loading branch information
Jon Wayne Parrott committed Jan 25, 2018
commit 9d0b0c19013ceee7ec4813ff405ffae737a5dd78
3 changes: 2 additions & 1 deletion 3 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ matrix:
- cd Doc
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
# (Updating the version is fine as long as no warnings are raised by doing so.)
- python -m pip install sphinx~=1.6.1 blurb
# The theme used by the docs is stored seperately, so we need to install that as well.
- python -m pip install sphinx~=1.6.1 blurb python-docs-theme
script:
- make check suspicious html SPHINXOPTS="-q -W -j4"
- os: linux
Expand Down
2 changes: 1 addition & 1 deletion 2 Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ clean:

venv:
$(PYTHON) -m venv $(VENVDIR)
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb python-docs-theme
@echo "The venv has been created in the $(VENVDIR) directory"

dist:
Expand Down
2 changes: 1 addition & 1 deletion 2 Doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ tree but are maintained separately and are available from

* `Sphinx <https://pypi.org/project/Sphinx/>`_
* `blurb <https://pypi.org/project/blurb/>`_
* `python-docs-theme <https://pypi.org/project/python-docs-theme/>`_

The easiest way to install these tools is to create a virtual environment and
install the tools into there.


Using make
----------

Expand Down
8 changes: 6 additions & 2 deletions 8 Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@
# -----------------------

# Use our custom theme.
html_theme = 'pydoctheme'
html_theme = 'python_docs_theme'
html_theme_path = ['tools']
html_theme_options = {'collapsiblesidebar': True}
html_theme_options = {
'collapsiblesidebar': True,
'issues_url': 'https://docs.python.org/3/bugs.html',
'root_include_title': False # We use the version switcher instead.
}

# Short title used e.g. for <title> HTML tags.
html_short_title = '%s Documentation' % release
Expand Down
194 changes: 0 additions & 194 deletions 194 Doc/tools/pydoctheme/static/pydoctheme.css

This file was deleted.

23 changes: 0 additions & 23 deletions 23 Doc/tools/pydoctheme/theme.conf

This file was deleted.

53 changes: 53 additions & 0 deletions 53 Doc/tools/static/changelog_search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
$(document).ready(function() {
// add the search form and bind the events
$('h1').after([
'<p>Filter entries by content:',
'<input type="text" value="" id="searchbox" style="width: 50%">',
'<input type="submit" id="searchbox-submit" value="Filter"></p>'
].join('\n'));

function dofilter() {
try {
var query = new RegExp($('#searchbox').val(), 'i');
}
catch (e) {
return; // not a valid regex (yet)
}
// find headers for the versions (What's new in Python X.Y.Z?)
$('#changelog h2').each(function(index1, h2) {
var h2_parent = $(h2).parent();
var sections_found = 0;
// find headers for the sections (Core, Library, etc.)
h2_parent.find('h3').each(function(index2, h3) {
var h3_parent = $(h3).parent();
var entries_found = 0;
// find all the entries
h3_parent.find('li').each(function(index3, li) {
var li = $(li);
// check if the query matches the entry
if (query.test(li.text())) {
li.show();
entries_found++;
}
else {
li.hide();
}
});
// if there are entries, show the section, otherwise hide it
if (entries_found > 0) {
h3_parent.show();
sections_found++;
}
else {
h3_parent.hide();
}
});
if (sections_found > 0)
h2_parent.show();
else
h2_parent.hide();
});
}
$('#searchbox').keyup(dofilter);
$('#searchbox-submit').click(dofilter);
});
62 changes: 0 additions & 62 deletions 62 Doc/tools/static/copybutton.js

This file was deleted.

Binary file removed BIN -695 Bytes Doc/tools/static/py.png
Binary file not shown.
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.