← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website

 

kaputtnik has proposed merging lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website.

Commit message:
Serve sphinx documentation as html files; Removes sphinx-doc

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #893275 in Widelands Website: "Auto-generate Doxygen-generated documentation"
  https://bugs.launchpad.net/widelands-website/+bug/893275

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/solitaire_html_documentation/+merge/345460

Serve sphinx documentation as html files. This remove unmaintained sphinx-doc and all features of the produced html could be used (e.g searching).

The main idea is to let sphinx build the html files directly in the media folder of the website and link it from the navigation. So no extra entries for nginx are needed.

To ease up the creation step of the documentation, a management command is implemented which uses an own conf.py for sphinx. To have a similar look and feel in the created html files, i have added also the needed css and background images to this branch and let sphinx use them, so the main source code for widelands isn't tainted. An example image: https://bugs.launchpad.net/widelands-website/+bug/893275/+attachment/5046332/+files/solitaire_documentation.jpg

The management command let sphinx create the doctrees in the WIDELANDS_SVN_DIR/doc/sphinx/build/doctrees/ but puts the produced html in the folder in  MEDIA/documentation/'. On unix like systems the produced html are served from a symlink called 'html'. This makes it possible to have consistent links during creation of new a documentation:

1. sphinx produces html files in a folder called 'html_temp'
2. switch the link to 'html_temp'
3. remove folder 'current' (if exist)
4. copy 'html_temp' to 'current'
5. switch the link to 'current'
6. remove 'html_temp'

On windows systems (if there are ever some users creating the website in an windows environment...) the step to create the symlink is omitted and 'html_temp' is moved to 'html'

We can do similar with the doxygen created documentation.

I you think this approach is good to go, i will make it work on the alpha site for testing. Since heavy file action is involved (moving, deleting of folders), please read the code of documentation/management/commands/create_docs.py very carefully :-)
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/solitaire_html_documentation into lp:widelands-website.
=== modified file 'README.txt'
--- README.txt	2017-04-11 05:30:40 +0000
+++ README.txt	2018-05-12 13:43:50 +0000
@@ -150,25 +150,14 @@
 Setting up widelands source code documentation
 ----------------------------------------------
 
-Change to the directory doc/sphinx/ of the widelands source code and run
-
-   $ ./extract_rst.py
-
-Now create the documentation as json files. You have to provide the path to
-the sphinx-build executable of the website:
-
-   $ ~/wlwebsite/bin/sphinx-build -b json -d build/doctrees source build/json
-
-A new directory containing json files is created in doc/sphinx/build/json. The full path
-to this directory has to be set in the sphinxdoc-app of the website:
-
-Open http://localhost:8000/admin/sphinxdoc/app/ and add a new app with this values:
-
-Name: Widelands developer documentation
-Slug: wl
-Path: /your/path/to/widelands-src/doc/sphinx/build/json/
-
-Open http://localhost:8000/docs/wl/ to test if everything is working.
+There is a small helper script to get the documenation. Be sure
+you have set WIDELANDS_SVN_DIR set in local_settings.py. Run:
+
+   $ ./manage.py create_docs
+
+After finishing without errors, type localhost:8000/documentation/index.html
+in your browsers addressbar or click on "Development -> Documentation".
+
 
 Uploading a map to the local website
 ------------------------------------
@@ -182,7 +171,7 @@
 Contact
 =======
 
-Contact SirVer on the homepage for more information and problems.
+Contact user 'kaputtnik' on the homepage for more information and problems.
 
 
 -- vim:ft=rst:

=== added directory 'documentation'
=== added file 'documentation/__init__.py'
=== added file 'documentation/conf.py'
--- documentation/conf.py	1970-01-01 00:00:00 +0000
+++ documentation/conf.py	2018-05-12 13:43:50 +0000
@@ -0,0 +1,171 @@
+# -*- coding: utf-8 -*-
+#
+# Widelands documentation build configuration file, created by
+# sphinx-quickstart on Fri Jun 01 11:27:52 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+# For a complete list of options see: http://www.sphinx-doc.org/en/stable/config.html
+
+# import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.mathjax']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Widelands'
+copyright = u'The Widelands Development Team'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = 'trunk'
+# The full version, including alpha/beta/rc tags.
+release = 'trunk'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+highlight_language = 'lua'
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'basic'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['static/']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+html_domain_indices = False
+
+# If false, no index is generated.
+html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Widelandsdoc'

=== added directory 'documentation/management'
=== added file 'documentation/management/__init__.py'
=== added directory 'documentation/management/commands'
=== added file 'documentation/management/commands/__init__.py'
=== added file 'documentation/management/commands/create_docs.py'
--- documentation/management/commands/create_docs.py	1970-01-01 00:00:00 +0000
+++ documentation/management/commands/create_docs.py	2018-05-12 13:43:50 +0000
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""Create the source code documenation.
+
+This script covers all needed steps to create or recreate the widelands
+source code documentation.
+
+Needed dependency: Sphinx
+
+"""
+
+from __future__ import print_function
+from django.core.management.base import BaseCommand, CommandError
+from django.conf import settings
+from subprocess import check_call, CalledProcessError
+from documentation import conf
+import os
+import sys
+import shutil
+import glob
+
+
+class Command(BaseCommand):
+    help = 'Create the source code documenation.'
+
+    def __init__(self, *args, **kwargs):
+        super(Command, self).__init__(*args, **kwargs)
+
+        # Define the main directories used in this class
+        self.sphinx_dir = os.path.join(
+            settings.WIDELANDS_SVN_DIR, 'doc/sphinx')
+        self.build_dir = os.path.join(
+            settings.MEDIA_ROOT, 'documentation/html_temp')
+        self.sphinx_conf_dir = os.path.dirname(conf.__file__)
+
+    def move_docs(self):
+        """Move the documentation created by sphinxdoc to the correct folder.
+
+        On unix systems the files were served from the symlink called
+        'html'. On Windows systems the files will only be copied in a
+        folder called 'html'.
+
+        """
+
+        if os.name == 'posix':
+            # Creating symlinks is only available on unix systems
+            try:
+                link_name = os.path.join(
+                    settings.MEDIA_ROOT, 'documentation/html')
+                target_dir = os.path.join(
+                    settings.MEDIA_ROOT, 'documentation/current')
+
+                if not os.path.exists(target_dir):
+                    # only needed on first run
+                    os.mkdir(target_dir)
+
+                if os.path.exists(link_name):
+                    # only needed if this script has already run
+                    os.remove(link_name)
+
+                # Temporarily switch the symlink
+                os.symlink(self.build_dir, link_name)
+                # Remove current
+                shutil.rmtree(target_dir)
+                # Copy new build to current
+                shutil.copytree(self.build_dir, target_dir)
+                # Switch the link to current
+                os.remove(link_name)
+                os.symlink(target_dir, link_name)
+            except:
+                raise
+        else:
+            # Non unix OS: Copy docs
+            try:
+                target_dir = os.path.join(
+                    settings.MEDIA_ROOT, 'documentation/html')
+                if os.path.exists(target_dir):
+                    shutil.rmtree(target_dir)
+                shutil.copytree(self.build_dir, target_dir)
+            except:
+                raise
+
+        try:
+            # The new build directory is no longer needed
+            shutil.rmtree(self.build_dir)
+        except:
+            raise
+
+    def handle(self, *args, **options):
+        """Create the widelands source code documentation.
+
+        The Documenatation is build by sphinxdoc in the directory
+        'settings/MEDIA/documentation/html_temp'.
+
+        """
+
+        if not os.path.exists(self.sphinx_dir):
+            print(
+                "Can't find the directory given by WIDELANDS_SVN_DIR in local_settings.py:\n", self.sphinx_dir)
+            sys.exit(1)
+
+        if os.path.exists(os.path.join(self.sphinx_dir, 'build')):
+            # Clean the autogen* files created by extract_rst.py
+            # This has to be done because sometimes such a file remains after
+            # removing it from extract_rst.
+            try:
+                for f in glob.glob(os.path.join(self.sphinx_dir, 'source/autogen*')):
+                    os.remove(f)
+            except OSError:
+                raise
+
+        # Locally 'dirhtml' do not work because the staticfiles view disallow
+        # directory indexes, but 'dirhtml' gives nicer addresses in production
+        builder = 'html'
+        if not settings.DEBUG:
+            # In production DEBUG is False
+            builder = 'dirhtml'
+
+        try:
+            check_call(['python', os.path.join(
+                self.sphinx_dir, 'extract_rst.py')])
+            check_call(['sphinx-build',
+                        '-b', builder,
+                        '-d', os.path.join(self.sphinx_dir, 'build/doctrees'),
+                        '-c', self.sphinx_conf_dir,
+                        os.path.join(self.sphinx_dir, 'source'),
+                        os.path.join(self.build_dir),
+                        ])
+        except CalledProcessError as why:
+            print('An error occured: {0}'.format(why))
+            sys.exit(1)
+
+        self.move_docs()

=== added directory 'documentation/static'
=== added file 'documentation/static/basic.css'
--- documentation/static/basic.css	1970-01-01 00:00:00 +0000
+++ documentation/static/basic.css	2018-05-12 13:43:50 +0000
@@ -0,0 +1,645 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("widelands.css");
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+/*div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}*/
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 170px;
+}
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+/*
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}*/
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px 7px 0 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px 7px 0 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    border: 0;
+    border-collapse: collapse;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+table.footnote td, table.footnote th {
+    border: 0 !important;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+/*dt:target, span.highlighted {
+    background-color: #fbe54e;
+}*/
+
+rect.highlighted {
+   fill: #C8BE93;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+/*.sig-paren {
+    font-size: larger;
+}*/
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+div.code-block-caption {
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+div.code-block-caption + div > div.highlight > pre {
+    margin-top: 0;
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    padding: 1em 1em 0;
+}
+
+div.literal-block-wrapper div.highlight {
+    margin: 0;
+}
+
+code.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+code.descclassname {
+    background-color: transparent;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: relative;
+    left: 0px;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}

=== added file 'documentation/static/black20.png'
Binary files documentation/static/black20.png	1970-01-01 00:00:00 +0000 and documentation/static/black20.png	2018-05-12 13:43:50 +0000 differ
=== added file 'documentation/static/but1.png'
Binary files documentation/static/but1.png	1970-01-01 00:00:00 +0000 and documentation/static/but1.png	2018-05-12 13:43:50 +0000 differ
=== added file 'documentation/static/parchment.png'
Binary files documentation/static/parchment.png	1970-01-01 00:00:00 +0000 and documentation/static/parchment.png	2018-05-12 13:43:50 +0000 differ
=== added file 'documentation/static/pygments.css'
--- documentation/static/pygments.css	1970-01-01 00:00:00 +0000
+++ documentation/static/pygments.css	2018-05-12 13:43:50 +0000
@@ -0,0 +1,78 @@
+/*******************************/
+/* Pygment Syntax Highlighting */
+/*******************************/
+pre {
+   margin: 4px;
+   display: block; /*show black background over the whole width*/
+}
+.highlight {
+   /*	text-shadow: none;
+    / *	color: #000000;*/                                               *
+    padding: 4px;
+    border: 1px solid black;
+    background-image: url("black20.png");
+    margin: 4px 0px;
+    margin-left: 1em;
+}
+.highlight .hll { background-color: #ffffcc }
+/*.highlight  { background: #f0f0f0; }*/
+.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #007020; font-weight: bold } /* Keyword */
+.highlight .o { color: #998 } /* Operator */
+.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #007020 } /* Comment.Preproc */
+.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #808080 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0040D0 } /* Generic.Traceback */
+.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #007020 } /* Keyword.Pseudo */
+.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #902000 } /* Keyword.Type */
+.highlight .m { color: #40a070 } /* Literal.Number */
+.highlight .s { color: #4070a0 } /* Literal.String */
+.highlight .na { color: #4070a0 } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.highlight .no { color: #60add5 } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #007020 } /* Name.Exception */
+.highlight .nf { color: #aaaa00 } /* Name.Function */
+.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #bb60d5 } /* Name.Variable */
+.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #40a070 } /* Literal.Number.Float */
+.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
+.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
+.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
+.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
+.highlight .sc { color: #4070a0 } /* Literal.String.Char */
+.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
+.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.highlight .sx { color: #c65d09 } /* Literal.String.Other */
+.highlight .sr { color: #235388 } /* Literal.String.Regex */
+.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
+.highlight .ss { color: #517918 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
+.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
+.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */

=== added file 'documentation/static/widelands.css'
--- documentation/static/widelands.css	1970-01-01 00:00:00 +0000
+++ documentation/static/widelands.css	2018-05-12 13:43:50 +0000
@@ -0,0 +1,258 @@
+/*
+ * classic.css_t
+ * ~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- classic theme.
+ *
+ * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+/* This was adjusted by the widelands development team to fit with the
+ * widelands website style.
+ */
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+   font-family: sans-serif;
+   font-size: 100%;
+   background-image: url("parchment.png");
+   color: #ffffff;
+   margin: 0;
+   padding: 0;
+}
+
+div.documentwrapper {
+   float: left;
+   width: 100%;
+}
+
+div.bodywrapper {
+   margin: 0 0 0 230px;
+}
+
+div.body {
+   background-image: url("but1.png");
+   background-color: #000000;
+   padding: 0 20px 30px 20px;
+}
+
+div.footer {
+   color: #181;
+   width: 100%;
+   padding: 9px 0 9px 0;
+   text-align: center;
+   font-size: 75%;
+}
+
+div.footer a {
+   color: #181;
+}
+
+div.related {
+   background-color: #000000;
+   background-image: url("wood.png");
+   line-height: 30px;
+}
+
+div.related a {
+   font-weight: bold;
+   color: rgba(254, 234, 138, 1);
+}
+
+div.sphinxsidebar {
+   color: #0d440d;
+}
+
+div.sphinxsidebar h3 {
+   font-family: 'Trebuchet MS', sans-serif;
+   font-size: 1.4em;
+   margin: 0;
+   padding: 0;
+}
+
+div.sphinxsidebar h3 a {
+   border-bottom: 1px solid #0d440d;
+}
+
+div.sphinxsidebar h4 {
+   font-family: 'Trebuchet MS', sans-serif;
+   font-size: 1.3em;
+   margin: 5px 0 0 0;
+   padding: 0;
+}
+
+div.sphinxsidebar p.topless {
+   margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+   padding: 0;
+}
+div.sphinxsidebar ul.this-page-menu {
+   margin: 5px 10px 10px 10px;
+}
+div.sphinxsidebar a {
+   color: #0d440d;
+}
+
+div.sphinxsidebar a:hover {
+   text-decoration: underline;
+}
+
+div.sphinxsidebar input {
+   font-family: sans-serif;
+   font-size: 1em;
+}
+
+/* -- hyperlink styles ------------------------------------------------------ */
+
+a {
+   color: rgba(254, 234, 138, 1);
+   text-decoration: none;
+}
+
+a:visited {
+   color: #C8BE93;
+   text-decoration: none;
+}
+
+a:hover {
+   color: #181;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+   font-family: 'Trebuchet MS', sans-serif;
+   background-image: url("black20.png");
+   font-weight: normal;
+   color: #181;
+   border-bottom: 1px solid #C8BE93;
+   margin: 20px -20px 10px -20px;
+   padding: 3px 0 3px 10px;
+}
+
+div.body h1 { 
+   margin-top: 0; 
+}
+
+a.headerlink {
+   color: #181;
+   font-size: 0.8em;
+   padding: 0 4px 0 4px;
+   text-decoration: none;
+}
+
+a.headerlink:hover {
+   background-color: #181;
+   color: white;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+   line-height: 130%;
+   /*margin: 0;*/
+}
+
+div.admonition p.admonition-title + p {
+   display: inline;
+}
+
+div.admonition p {
+   margin-bottom: 5px;
+}
+
+div.admonition pre {
+   margin-bottom: 5px;
+}
+
+div.admonition ul, div.admonition ol {
+   margin-bottom: 5px;
+}
+
+div.note {
+    border: 1px solid #ccc;
+}
+
+div.seealso {
+   background-color: #ffc;
+   border: 1px solid #ff6;
+}
+
+div.topic {
+   background-color: #eee;
+}
+
+div.warning {
+   background-color: #ffe4e4;
+   border: 1px solid #f66;
+}
+
+p.admonition-title {
+   display: inline;
+}
+
+p.admonition-title:after {
+   content: ":";
+}
+
+pre {
+   padding: 5px;
+   margin-left: 1em;
+   /*line-height: 120%;*/
+   background-image: url("black20.png");
+   border-left: none;
+   border-right: none;
+}
+
+div.body code .pre {
+   background-image: url("black20.png");
+   padding: 0 1px 0 1px;
+}
+
+th {
+   background-image: url("black20.png");
+}
+
+.warning code {
+   background: #efc2c2;
+}
+
+/*.note code {
+   background: #d6d6d6;
+}*/
+
+.viewcode-back {
+   font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+   background-color: #f4debf;
+   border-top: 1px solid #ac9;
+   border-bottom: 1px solid #ac9;
+}
+
+div.code-block-caption {
+   color: #efefef;
+   background-color: #1c4e63;
+}
+
+
+/* Overwritten classes from basic.css */
+code.descname {
+   color: #181;
+   font-size: larger;
+   padding-right: 0.5em;
+}
+
+table.indextable tr.cap {
+  margin-top: 10px;
+  background-image: url("black20.png");
+}
+

=== added file 'documentation/static/wood.png'
Binary files documentation/static/wood.png	1970-01-01 00:00:00 +0000 and documentation/static/wood.png	2018-05-12 13:43:50 +0000 differ
=== modified file 'local_settings.py.sample'
--- local_settings.py.sample	2018-05-05 18:58:22 +0000
+++ local_settings.py.sample	2018-05-12 13:43:50 +0000
@@ -17,6 +17,8 @@
 # set WIDELANDS_SVN_DIR to the correct path. See also:
 # https://wl.widelands.org/wiki/BzrPrimer/
 WIDELANDS_SVN_DIR = "/path/to/widelands/trunk/"
+DOCUMENTATION_DIR = os.path.join(WIDELANDS_SVN_DIR, 'doc/sphinx/build/html')
+
 os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
 
 DATABASES = {

=== modified file 'local_urls.py.sample'
--- local_urls.py.sample	2018-04-03 18:57:40 +0000
+++ local_urls.py.sample	2018-05-12 13:43:50 +0000
@@ -1,6 +1,10 @@
 from django.conf.urls import *
 from django.conf import settings
 from django.views.static import serve
+from os import path
+
+# Don't use this file on the server!
+
 
 local_urlpatterns = [
    url(r'^wlmedia/(?P<path>.*)$',
@@ -11,4 +15,9 @@
        serve,
        {'document_root': settings.STATIC_MEDIA_PATH},
        name='static_media_pybb'),
+   url(r'^documentation/(?P<path>.*)$',
+       serve,
+       {'document_root': path.join(
+         settings.STATIC_MEDIA_PATH, 'documentation/html')},
+       name='documentation')
 ]

=== removed file 'media/css/documentation.css'
--- media/css/documentation.css	2017-12-12 11:48:37 +0000
+++ media/css/documentation.css	1970-01-01 00:00:00 +0000
@@ -1,118 +0,0 @@
-table.field-list{
-	border-collapse: separate;
-}
-
-.sphinx a.headerlink {
-	padding: 0 4px 0 4px;
-	visibility: hidden;
-}
-
-.sphinx *:hover > a.headerlink {
-	visibility: visible;
-}
-
-img.math{
-	vertical-align: middle;
-}
-
-th {
-	background-color: #4A4A4A;
-}
-
-/* Disable base style and set new ones */
-code {
-	font-weight: bold;
-	font-size: 1.3em;
-}
-
-/* Used for functions in first line */
-dt {
-	margin-top: 0.5em;
-	margin-bottom: 0.25em;
-}
-code.descname {
-	padding: 0.25em;
-	background-image: none;
-	font-weight: bold;
-	font-size: 1.4em;
-	color: #181;
-}
-
-
-/*******************************/
-/* Pygment Syntax Highlighting */
-/*******************************/
-pre {
-	margin: 0px;
-	display: block; /*show black background over the whole width*/
-}
-.highlight {
-/*	text-shadow: none;
-/*	color: #000000;*/
-	padding: 4px;
-	border: 1px solid black;
-	background-image: url("../img/black20.png");
-	margin: 4px 0px;
-}
-.highlight .hll { background-color: #ffffcc }
-/*.highlight  { background: #f0f0f0; }*/
-.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
-.highlight .k { color: #007020; font-weight: bold } /* Keyword */
-.highlight .o { color: #998 } /* Operator */
-.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #007020 } /* Comment.Preproc */
-.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
-.highlight .gd { color: #A00000 } /* Generic.Deleted */
-.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #FF0000 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #808080 } /* Generic.Output */
-.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
-.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0040D0 } /* Generic.Traceback */
-.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { color: #007020 } /* Keyword.Pseudo */
-.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #902000 } /* Keyword.Type */
-.highlight .m { color: #40a070 } /* Literal.Number */
-.highlight .s { color: #4070a0 } /* Literal.String */
-.highlight .na { color: #4070a0 } /* Name.Attribute */
-.highlight .nb { color: #007020 } /* Name.Builtin */
-.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
-.highlight .no { color: #60add5 } /* Name.Constant */
-.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
-.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
-.highlight .ne { color: #007020 } /* Name.Exception */
-.highlight .nf { color: #aaaa00 } /* Name.Function */
-.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
-.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
-.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #bb60d5 } /* Name.Variable */
-.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mf { color: #40a070 } /* Literal.Number.Float */
-.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
-.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
-.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
-.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
-.highlight .sc { color: #4070a0 } /* Literal.String.Char */
-.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
-.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
-.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
-.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
-.highlight .sx { color: #c65d09 } /* Literal.String.Other */
-.highlight .sr { color: #235388 } /* Literal.String.Regex */
-.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
-.highlight .ss { color: #517918 } /* Literal.String.Symbol */
-.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
-.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
-.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
-.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */

=== added directory 'media/documentation'
=== modified file 'settings.py'
--- settings.py	2018-05-07 06:32:56 +0000
+++ settings.py	2018-05-12 13:43:50 +0000
@@ -94,6 +94,7 @@
     'wlggz',
     'wlscheduling',
     'check_input.apps.CheckInput',
+    'documentation',
     'haystack', # search engine; see option HAYSTACK_CONNECTIONS
 
     # Modified 3rd party apps
@@ -109,7 +110,6 @@
     'dj_pagination',
     'tagging',
     'djangoratings',    # included as wlapp
-    'sphinxdoc',        # included as wlapp
 ]
 
 MIDDLEWARE = [
@@ -329,4 +329,5 @@
 try:
     from local_settings import *
 except ImportError:
+    print('Failed to load local_Settings.py !')
     pass

=== modified file 'sitemap_urls.py'
--- sitemap_urls.py	2016-12-13 18:28:51 +0000
+++ sitemap_urls.py	2018-05-12 13:43:50 +0000
@@ -7,12 +7,10 @@
 from news.sitemap import *
 from pybb.sitemap import *
 from wlhelp.sitemap import *
-from sphinxdoc.sitemap import *
 
 
 sitemaps = {
     'static': StaticViewSitemap,
-    'docs': DocumentationSitemap,
     'news': NewsSitemap,
     'wiki': WikiSitemap,
     'forum': ForumSitemap,

=== removed directory 'sphinxdoc'
=== removed file 'sphinxdoc/__init__.py'
=== removed file 'sphinxdoc/admin.py'
--- sphinxdoc/admin.py	2016-12-13 18:28:51 +0000
+++ sphinxdoc/admin.py	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-# encoding: utf-8
-"""Admin interface for the sphinxdoc app."""
-
-from django.contrib import admin
-
-from sphinxdoc.models import App
-
-
-class AppAdmin(admin.ModelAdmin):
-    list_display = ('name', 'path',)
-    prepopulated_fields = {'slug': ('name',)}
-
-
-admin.site.register(App, AppAdmin)

=== removed directory 'sphinxdoc/migrations'
=== removed file 'sphinxdoc/migrations/0001_initial.py'
--- sphinxdoc/migrations/0001_initial.py	2016-12-13 18:28:51 +0000
+++ sphinxdoc/migrations/0001_initial.py	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django.db import models, migrations
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='App',
-            fields=[
-                ('id', models.AutoField(verbose_name='ID',
-                                        serialize=False, auto_created=True, primary_key=True)),
-                ('name', models.CharField(max_length=100)),
-                ('slug', models.SlugField(
-                    help_text='Used in the URL for the app. Must be unique.', unique=True)),
-                ('path', models.CharField(max_length=255)),
-            ],
-        ),
-    ]

=== removed file 'sphinxdoc/migrations/__init__.py'
=== removed file 'sphinxdoc/models.py'
--- sphinxdoc/models.py	2018-04-08 16:23:55 +0000
+++ sphinxdoc/models.py	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-# encoding: utf-8
-"""
-Models for django-sphinxdoc.
-"""
-
-from django.db import models
-from django.urls import reverse
-
-
-class App(models.Model):
-    name = models.CharField(max_length=100)
-    slug = models.SlugField(unique=True,
-                            help_text=u'Used in the URL for the app. Must be unique.')
-    path = models.CharField(max_length=255)
-
-    def __unicode__(self):
-        return self.name
-
-    def get_absolute_url(self):
-        return reverse('doc-index', kwargs={'slug': self.slug})
-
-    class Meta:
-        app_label = 'sphinxdoc'

=== removed file 'sphinxdoc/sitemap.py'
--- sphinxdoc/sitemap.py	2016-12-15 12:55:44 +0000
+++ sphinxdoc/sitemap.py	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-from django.contrib.sitemaps import Sitemap
-from sphinxdoc.models import App
-import datetime
-import os
-
-try:
-    app = App.objects.get(slug='wl')
-except:
-    pass
-
-
-class DocumentationSitemap(Sitemap):
-    """This is just a dummy class to return the link to docs/wl/genindex."""
-
-    changefreq = 'yearly'
-    priority = 0.5
-
-    def items(self):
-        return ['']
-
-    def location(self, item):
-        return '/docs/wl/genindex/'
-
-    def lastmod(self, item):
-        return datetime.datetime.fromtimestamp(
-            os.path.getmtime(os.path.join(app.path, 'last_build')))

=== removed file 'sphinxdoc/urls.py'
--- sphinxdoc/urls.py	2016-11-07 13:26:04 +0000
+++ sphinxdoc/urls.py	1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-# encoding: utf-8
-
-from django.conf.urls import *
-from django.views.generic.list import ListView
-from sphinxdoc import views
-from sphinxdoc import models
-
-app_info = {
-    'queryset': models.App.objects.all().order_by('name'),
-    'template_object_name': 'app',
-}
-
-
-urlpatterns = [
-    url(r'^$', ListView.as_view(), app_info,),
-    url(r'^(?P<slug>[\w-]+)/search/$',
-        views.search, name='doc-search', ),
-    url(r'^(?P<slug>[\w-]+)/_images/(?P<path>.*)$',
-        views.images, ),
-    url(r'^(?P<slug>[\w-]+)/_source/(?P<path>.*)$',
-        views.source, ),
-    url(r'^(?P<slug>[\w-]+)/_objects/$',
-        views.objects_inventory, name='objects-inv', ),
-    url(r'^(?P<slug>[\w-]+)/$',
-        views.documentation, {'url': ''}, name='doc-index', ),
-    url(r'^(?P<slug>[\w-]+)/(?P<url>(([\w-]+)/)+)$',
-        views.documentation, name='doc-detail', ),
-]

=== removed file 'sphinxdoc/views.py'
--- sphinxdoc/views.py	2018-04-07 15:35:47 +0000
+++ sphinxdoc/views.py	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-# encoding: utf-8
-
-import datetime
-import os.path
-
-from django.http import Http404
-from django.shortcuts import get_object_or_404, render
-#from django.template import RequestContext
-import json
-from django.views import static
-
-from sphinxdoc.models import App
-
-
-SPECIAL_TITLES = {
-    'genindex': 'General Index',
-    'py-modindex': 'Module Index',
-    'search': 'Search',
-}
-
-
-def documentation(request, slug, url):
-    app = get_object_or_404(App, slug=slug)
-    url = url.strip('/')
-    page_name = os.path.basename(url)
-
-    path = os.path.join(app.path, url, 'index.fjson')
-    if not os.path.exists(path):
-        path = os.path.dirname(path) + '.fjson'
-        if not os.path.exists(path):
-            raise Http404('"%s" does not exist' % path)
-
-    templates = (
-        'sphinxdoc/%s.html' % page_name,
-        'sphinxdoc/documentation.html',
-    )
-
-    data = {
-        'app': app,
-        'doc': json.load(open(path, 'rb')),
-        'env': json.load(open(
-            os.path.join(app.path, 'globalcontext.json'), 'rb')),
-        'version': app.name,
-        'docurl': url,
-        'update_date':  datetime.datetime.fromtimestamp(
-            os.path.getmtime(os.path.join(app.path, 'last_build'))),
-        'home': app.get_absolute_url(),
-        # 'search': urlresolvers.reverse('document-search', kwargs={'lang':lang, 'version':version}),
-        'redirect_from': request.GET.get('from', None),
-
-    }
-    if 'title' not in data['doc']:
-        data['doc']['title'] = SPECIAL_TITLES[page_name]
-
-    return render(request, templates, data)
-
-
-def search(request, slug):
-    from django.http import HttpResponse
-    return HttpResponse('Not yet implemented.')
-
-
-def objects_inventory(request, slug):
-    app = get_object_or_404(App, slug=slug)
-    response = static.serve(
-        request,
-        document_root=app.path,
-        path='objects.inv',
-    )
-    response['Content-Type'] = 'text/plain'
-    return response
-
-
-def images(request, slug, path):
-    app = get_object_or_404(App, slug=slug)
-    return static.serve(
-        request,
-        document_root=os.path.join(app.path, '_images'),
-        path=path,
-    )
-
-
-def source(request, slug, path):
-    app = get_object_or_404(App, slug=slug)
-    return static.serve(
-        request,
-        document_root=os.path.join(app.path, '_sources'),
-        path=path,
-    )

=== modified file 'templates/navigation.html'
--- templates/navigation.html	2018-02-17 11:22:34 +0000
+++ templates/navigation.html	2018-05-12 13:43:50 +0000
@@ -50,7 +50,7 @@
 		<ul>
 			<li><a href="{% url 'wiki_article' "Contribute" %}">Contribute</a></li>
 			<li><a href="{% url 'developers' %}">Widelands Development Team</a></li>
-			<li><a href="/docs/wl/" target="_blank">Documentation</a></li>
+			<li><a href="{% url 'documentation' 'index.html' %}" target="_blank">Documentation</a></li>
 			<li><a href="https://bugs.launchpad.net/widelands"; target="_blank">Widelands Bugtracker</a></li>
 			<li><a href="https://bugs.launchpad.net/widelands-website"; target="_blank">Website Bugtracker</a></li>
 		</ul>

=== removed directory 'templates/sphinxdoc'
=== removed file 'templates/sphinxdoc/app_list.html'
--- templates/sphinxdoc/app_list.html	2012-05-16 22:31:25 +0000
+++ templates/sphinxdoc/app_list.html	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-{% extends 'sphinxdoc/base.html' %}
-
-{% block title %}Overview - {{ block.super }}{% endblock %}
-
-{% block content %}
-<h1>Documentation Overview</h1>
-<div class="blogEntry">
-	<a href="/docs/">Documentation</a> 
-
-	<br />
-
-	<ul>
-	{% for app in app_list %}
-		<li><a href="{{ app.get_absolute_url }}">{{ app.name }}</a></li>
-	{% endfor %}
-	</ul>
-</div>
-{% endblock content %}

=== removed file 'templates/sphinxdoc/base.html'
--- templates/sphinxdoc/base.html	2017-07-04 06:40:29 +0000
+++ templates/sphinxdoc/base.html	1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}
-Documentation - {{ block.super }}
-{% endblock %}
-
-{% block extra_head %}
-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/documentation.css" />
-
-{# using mathjax for formulas #}
-<script type="text/javascript" async
-  src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";>
-</script>
-
-{{ block.super}}
-{% endblock %}
-

=== removed file 'templates/sphinxdoc/documentation.html'
--- templates/sphinxdoc/documentation.html	2016-11-07 13:26:04 +0000
+++ templates/sphinxdoc/documentation.html	1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
-{% extends 'sphinxdoc/base.html' %}
-
-{% block title %}
-{{ app.name }} - {{ block.super }}
-{% endblock %}
-
-{% block content %}
-<h1>Documentation: {{ app.name }}</h1>
-<div class="blogEntry">
-	<a href="{{ app.get_absolute_url }}">{{ app.name }}</a>
-	{% for p in doc.parents %}
-	» <a href="{{ p.link }}">{{ p.title|safe }}</a>
-	{% endfor %}
-	» {{ doc.title|safe }}
-	{% if doc.prev or doc.next %}
-	<br /><br />
-	<div class="posLeft">
-		{% if doc.prev %}
-		Prev: <a href="{{ doc.prev.link }}">{{ doc.prev.title|safe }}</a>
-		{% endif %}
-	</div>
-	<div class="posRight">
-		{% if doc.next %}
-		Next: <a href="{{ doc.next.link }}">{{ doc.next.title|safe }}</a>
-		{% endif %}
-	</div>
-	{% endif %}
-
-	<br /><br />
-
-	<div class="sphinx">
-		{% block doc_body %}
-		{{ doc.body|safe }}
-		{% endblock %}
-	</div>
-
-	<br />
-
-	<div class="pagination-bottom">
-		{% if doc.prev or doc.next %}
-		<div class="posLeft">
-			{% if doc.prev %}
-			Prev: <a href="{{ doc.prev.link }}">{{ doc.prev.title|safe }}</a>
-			{% endif %}
-		</div>
-		<div class="posRight">
-			{% if doc.next %}
-			Next: <a href="{{ doc.next.link }}">{{ doc.next.title|safe }}</a>
-			{% endif %}
-		</div>
-		<br />
-		{% endif %}
-		<hr />
-		<span class="small">Last update: {{ update_date|date:"Y-m-d H:i" }} (<a href="http://www.timeanddate.com/worldclock/city.html?n=37";>CET</a>)</span>
-	</div>
-</div>
-{% endblock content %}

=== removed file 'templates/sphinxdoc/genindex.html'
--- templates/sphinxdoc/genindex.html	2016-08-07 18:35:30 +0000
+++ templates/sphinxdoc/genindex.html	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-{% extends 'sphinxdoc/documentation.html' %}
-
-{% block doc_body %}
-    <h1>General Index</h1>
-    <p class="indexletters">
-    {% for letter, _ in doc.genindexentries %}
-        <a href="#{{ letter }}">{{ letter }}</a> {% if not forloop.last %} •{% endif %}
-    {% endfor %}
-    </p>
-
-    {% for letter, entries in doc.genindexentries %}
-    <br />    
-    <h2 id="{{ letter }}">{{ letter }}</h2>
-    <dl class="index">
-        {% for name, contents in entries %}
-        <dt>
-          {# contents.0 is a list of links for the item #}
-            {% if contents.0 %}
-            <a href="{{ contents.0.0.1 }}">{{ name }}</a>
-            {% else %}
-            {{ name }}
-            {% endif %}
-        </dt>
-        {# contents.1 is a list of subitems #}
-            {% if contents.1 %}
-                {% for subname, sublinks in contents.1 %}
-        <dd>
-            <a href="{{ sublinks.0.1 }}">{{ subname }}</a>
-                    {% for link in sublinks|slice:"1:" %}, <a href="{{ link }}">[Link]</a>{% endfor %}
-        </dd>
-                {% endfor %}
-            {% endif %}
-        {% endfor %}
-    </dl>
-    {% endfor %}
-    <br />
-{% endblock doc_body %}
-{% block doc_toc %}{% endblock %}

=== removed file 'templates/sphinxdoc/py-modindex.html'
--- templates/sphinxdoc/py-modindex.html	2018-05-02 18:02:12 +0000
+++ templates/sphinxdoc/py-modindex.html	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-{% extends 'sphinxdoc/documentation.html' %}
-
-{% block doc_body %}
-    <h1>Module Index</h1>
-    <dl> 
-    {% for c in doc.content %}
-        {% for modul, level, fname, mainmod, unknown1, unknown2, descr in c.1 %}
-            {% if level < 2 %}
-            <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
-            <dd>{{ descr }}
-            {% else %}
-                <dl>
-                    <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
-                    <dd>{{ descr }}</dd>
-                </dl>
-            {% endif %}
-        {% endfor %}
-        </dd>
-    {% endfor %}
-    </dl>
-    <br />
-{% endblock doc_body %}
-{% block doc_toc %}{% endblock %}

=== modified file 'urls.py'
--- urls.py	2018-04-18 12:04:12 +0000
+++ urls.py	2018-05-12 13:43:50 +0000
@@ -39,8 +39,7 @@
     url(r'^threadedcomments/', include('threadedcomments.urls')),
 
     # Redirect old urls to docs to docs/wl
-    url(r'^docs/$', RedirectView.as_view(url='/docs/wl', permanent=True), name='docs'),
-    url(r'^docs/', include('sphinxdoc.urls')),
+    url(r'^docs/$', RedirectView.as_view(url='/documentation/index.html', permanent=True), name='docs'),
 
     # 3rd party, modified for widelands
     url(r'^wiki/', include('wiki.urls')),


Follow ups