Merge lp:~widelands-dev/widelands/sphinx_remove_py_modindex into lp:widelands

Proposed by kaputtnik
Status: Merged
Merged at revision: 8699
Proposed branch: lp:~widelands-dev/widelands/sphinx_remove_py_modindex
Merge into: lp:widelands
Diff against target: 9 lines (+0/-1)
1 file modified
doc/sphinx/source/index.rst (+0/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/sphinx_remove_py_modindex
Reviewer Review Type Date Requested Status
GunChleoc Approve
kaputtnik (community) Needs Resubmitting
Review via email: mp+345261@code.launchpad.net

Commit message

Let sphinx create an index but not a module index.

Description of the change

Let sphinx create an index but not a module index.

This is mainly because i can't get rid of the header saying 'Python Module Index' for the plan to use html pages directly for the website. But i think we have no modules at all?

Instead let sphinx create a general index of all functions which is alphabetical sorted.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3484. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/376558557.
Appveyor build 3289. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_sphinx_remove_py_modindex-3289.

Revision history for this message
GunChleoc (gunchleoc) wrote :

This is what the module index looks like: https://wl.widelands.org/docs/wl/py-modindex/

I have never used it, so I won't have a problem with it being gone.

On the website, the "Python" bit in the title is gone, but if I do a "build html" locally, it's there. So, there must be some difference between make json and make html?

Revision history for this message
kaputtnik (franku) wrote :

The difference is that on the website the json files are read and passed through the django template system. The used template for py-modindex is: https://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/view/head:/templates/sphinxdoc/py-modindex.html

This template uses a hardcoded string 'Module Index'. If you run 'make html' sphinx uses his own templates for the html files.

From my understanding Sphinx will create an Index for each Domain. Say you're documenting c++ and python code in your project, sphinx will create two indexes: One for C++ and one for python. We are using the default Domain, python, so a py-modindex will be created.

In the branch https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation i am using an own conf.py, so i am fine with reverting conf.py here. So creating a documentation for him/her self directly from the sources is not tainted. But i think this 'Python Module Index' string is confusing.

If you think 'py-modindex' should remain i have no problem to revert the changes in conf.py, but the removed line in index.rst should remain. The removed line will only remove the link to py-modindex.html in index.html, but all other files will still have a link to 'py-modindex' (in the header at the right).

I have tried several things to change this string, including providing an own domain-file, but i wasn't able to get it work :-( The last consideration was to exchange the string directly in the produced html file, but i think it's not worth the work.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Let's remove it on the website only then and announce it on the forum - then people can say something if they really need it. I think having the search is more important than this tiny index that can be accessed from https://wl.widelands.org/docs/wl/core/ anyway.

Revision history for this message
kaputtnik (franku) wrote :

Ok

review: Needs Resubmitting
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3487. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/377192325.
Appveyor build 3292. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_sphinx_remove_py_modindex-3292.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks!

@bunnybot merge

review: Approve
Revision history for this message
kaputtnik (franku) wrote :

Thanks :-)

I had forgotten to change the commit message ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/sphinx/source/index.rst'
2--- doc/sphinx/source/index.rst 2017-08-01 11:51:23 +0000
3+++ doc/sphinx/source/index.rst 2018-05-10 08:58:27 +0000
4@@ -21,6 +21,5 @@
5 ==================
6
7 * :ref:`genindex`
8-* :ref:`modindex`
9 * :ref:`search`
10

Subscribers

People subscribed via source and target branches

to status/vote changes: