Bläddra i källkod

Port layout changes from the master version

This also updates the index page, changes the first
sidebar section to be "About" without an extra level,
and renames "Tutorials" to "Manual"
Yuri Sizov 2 år sedan
förälder
incheckning
0c100d9f14

+ 7 - 1
.gitignore

@@ -1,3 +1,7 @@
+*.csv
+!redirects.csv
+.env
+
 _build/
 env/
 __pycache__
@@ -40,4 +44,6 @@ logo.h
 # Output of list-unused-images.sh tool
 tmp-unused-images
 tmp-unused-images-history
-*.env
+
+# User created Python virtual environement as described in the docs
+godot-docs-venv/

+ 25 - 187
Makefile

@@ -1,199 +1,37 @@
 # Makefile for Sphinx documentation
-#
 
-# You can set these variables from the command line.
-SPHINXOPTS    =
-SPHINXBUILD   = sphinx-build
-PAPER         =
-BUILDDIR      = _build
-LATEXDEPS     = latex dvipng
+SPHINXOPTS      ?=
+SPHINXBUILD     ?= sphinx-build
+SPHINXSOURCEDIR ?= .
+SPHINXBUILDDIR  ?= _build
+SPHINXPAPER     ?=
+FILELIST        ?=
 
 # User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+ifneq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 0)
+define ERROR_MESSAGE
+The '$(SPHINXBUILD)' command was not found!
+Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to the full path of the '$(SPHINXBUILD)' executable.
+Alternatively you can add the executable's directory to your PATH.
+If you don't have Sphinx installed, grab it from http://sphinx-doc.org/
+endef
+$(error ${ERROR_MESSAGE})
 endif
 
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -t i18n .
+PAPEROPT_a4         = -D latex_paper_size=a4
+PAPEROPT_letter     = -D latex_paper_size=letter
+COMMONSPHINXOPTS    = $(PAPEROPT_$(SPHINXPAPER)) $(SPHINXOPTS) '$(SPHINXSOURCEDIR)'
+DEFAULTSPHINXOPTS   = -d $(SPHINXBUILDDIR)/doctrees $(COMMONSPHINXOPTS)
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
+.PHONY: help clean
 
 help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  html       to make standalone HTML files"
-	@echo "  dirhtml    to make HTML files named index.html in directories"
-	@echo "  singlehtml to make a single large HTML file"
-	@echo "  pickle     to make pickle files"
-	@echo "  json       to make JSON files"
-	@echo "  htmlhelp   to make HTML files and a HTML help project"
-	@echo "  qthelp     to make HTML files and a qthelp project"
-	@echo "  applehelp  to make an Apple Help Book"
-	@echo "  devhelp    to make HTML files and a Devhelp project"
-	@echo "  epub       to make an epub"
-	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
-	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
-	@echo "  text       to make text files"
-	@echo "  man        to make manual pages"
-	@echo "  texinfo    to make Texinfo files"
-	@echo "  info       to make Texinfo files and run them through makeinfo"
-	@echo "  gettext    to make PO message catalogs"
-	@echo "  changes    to make an overview of all changed/added/deprecated items"
-	@echo "  xml        to make Docutils-native XML files"
-	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
-	@echo "  linkcheck  to check all external links for integrity"
-	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
-	@echo "  coverage   to run coverage check of the documentation (if enabled)"
-	@echo "  dummy      to run only the parse steps without generating output"
-
-clean:
-	rm -rf $(BUILDDIR)/*
-
-html:
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
-	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
-	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
-	@echo
-	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
-	@echo
-	@echo "Build finished; now you can process the pickle files."
-
-json:
-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
-	@echo
-	@echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
-	@echo
-	@echo "Build finished; now you can run HTML Help Workshop with the" \
-	      ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
-	@echo
-	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GodotEngine.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GodotEngine.qhc"
-
-applehelp:
-	$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
-	@echo
-	@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
-	@echo "N.B. You won't be able to view it unless you put it in" \
-	      "~/Library/Documentation/Help or install it in your application" \
-	      "bundle."
-
-devhelp:
-	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
-	@echo
-	@echo "Build finished."
-	@echo "To view the help file:"
-	@echo "# mkdir -p $$HOME/.local/share/devhelp/GodotEngine"
-	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GodotEngine"
-	@echo "# devhelp"
-
-epub:
-	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
-	@echo
-	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo
-	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-	@echo "Run \`make' in that directory to run these through (pdf)latex" \
-	      "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo "Running LaTeX files through pdflatex..."
-	$(MAKE) -C $(BUILDDIR)/latex all-pdf
-	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-latexpdfja:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo "Running LaTeX files through platex and dvipdfmx..."
-	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
-	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
-	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
-	@echo
-	@echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
-	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
-	@echo
-	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
-	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-	@echo
-	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
-	@echo "Run \`make' in that directory to run these through makeinfo" \
-	      "(use \`make info' here to do that automatically)."
-
-info:
-	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-	@echo "Running Texinfo files through makeinfo..."
-	make -C $(BUILDDIR)/texinfo info
-	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+	@$(SPHINXBUILD) -M help $(DEFAULTSPHINXOPTS) $(O) "$(SPHINXBUILDDIR)"
 
+# This is used by https://github.com/godotengine/godot-docs-l10n
+# See https://github.com/godotengine/godot-docs-l10n/blob/f157c0cacc8a6e542e06e96b983b27de91637f8b/update.sh#L92
 gettext:
-	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) ../sphinx/templates
-	@echo
-	@echo "Build finished. The message catalogs are in ../sphinx/templates."
-
-changes:
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
-	@echo
-	@echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
-	@echo
-	@echo "Link check complete; look for any errors in the above output " \
-	      "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
-	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
-	@echo "Testing of doctests in the sources finished, look at the " \
-	      "results in $(BUILDDIR)/doctest/output.txt."
-
-coverage:
-	$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
-	@echo "Testing of coverage in the sources finished, look at the " \
-	      "results in $(BUILDDIR)/coverage/python.txt."
-
-xml:
-	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
-	@echo
-	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
-pseudoxml:
-	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
-	@echo
-	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
+	$(SPHINXBUILD) -b gettext -t i18n $(COMMONSPHINXOPTS) ../sphinx/templates $(FILELIST)
 
-dummy:
-	$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/html
-	@echo
-	@echo "Build finished. No output."
+%:
+	$(SPHINXBUILD) -M $@ $(DEFAULTSPHINXOPTS) $(O) "$(SPHINXBUILDDIR)"/$@ $(FILELIST)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 623 - 85
_static/css/custom.css


+ 8 - 0
_static/css/dev.css

@@ -0,0 +1,8 @@
+/**
+ * CSS tweaks that are only added outside ReadTheDocs (i.e. when built locally).
+ */
+
+/* Re-add default red boxes around Pygments errors */
+.highlight .err {
+    border: 1px solid #FF0000;
+}

BIN
_static/css/fonts/JetBrainsMono-Bold.woff2


BIN
_static/css/fonts/JetBrainsMono-Medium.woff2


BIN
_static/css/fonts/JetBrainsMono-Regular.woff2


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 310 - 153
_static/js/custom.js


+ 31 - 15
_templates/breadcrumbs.html

@@ -1,24 +1,40 @@
 {%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
 
+{% block breadcrumbs %}
+<li>
+	<div style="font-size: 105%;font-weight: 600;">
+		{{ godot_docs_title | replace("%s", godot_version) }}
+	</div>
+	<ul class="wy-breadcrumbs">
+		{{ super() }}
+	</ul>
+</li>
+{% endblock %}
+
 {% block breadcrumbs_aside %}
 {% if not meta or meta.get('github_url') != 'hide' %}
-{{ super() }}
-
-<style>
-	.godot-edit-guidelines {
-		font-size: 14px;
-		float: right;
-		clear: both;
-	}
+<li style="float: right; text-align: right;">
+	<ul>
+		{{ super() }}
+	</ul>
 
-	@media screen and (max-width: 480px) {
+	<style>
 		.godot-edit-guidelines {
-			display: none;
+			font-size: 14px;
+			float: right;
+			clear: both;
+			padding-top: 4px;
+		}
+
+		@media screen and (max-width: 480px) {
+			.godot-edit-guidelines {
+				display: none;
+			}
 		}
-	}
-</style>
-<a class="godot-edit-guidelines" href="https://docs.godotengine.org/en/latest/community/contributing/index.html#writing-documentation">
-	Learn how to contribute!
-</a>
+	</style>
+	<a class="godot-edit-guidelines" href="https://docs.godotengine.org/en/latest/contributing/documentation/index.html#writing-documentation">
+		Learn how to contribute!
+	</a>
+</li>
 {% endif %}
 {% endblock %}

+ 60 - 3
_templates/layout.html

@@ -1,4 +1,15 @@
 {% extends "!layout.html" -%}
+{# Refer to https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html #}
+
+{% block htmltitle -%}
+<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
+{% endblock -%}
+
+{% block extrahead -%}
+<meta name="doc_version" content="{{ version }}">
+<meta name="doc_is_latest" content="{{ godot_is_latest }}">
+{% endblock -%}
+
 {% block linktags -%}
   <meta name="theme-color" content="#3d8fcc">
   {% if godot_inject_language_links -%}
@@ -14,6 +25,52 @@
   {{ super() }}
 {% endblock -%}
 
-{% block htmltitle -%}
-<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
-{% endblock -%}
+{%- block document %}
+<div itemprop="articleBody">
+  {% if godot_is_latest or godot_show_article_status %}
+  <div class="admonition-grid">
+    {% if godot_is_latest %}
+    <div class="admonition attention latest-notice">
+      <p class="first admonition-title">Attention: Here be dragons</p>
+      <p>
+        This is the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
+        (unstable) version of this documentation, which may document features
+        not available in or compatible with released stable versions of Godot.
+      </p>
+      <p class="last latest-notice-link">
+        Checking the stable version of the documentation...
+      </p>
+    </div>
+    {% endif %}
+
+    {% if godot_show_article_status and not godot_is_latest %}
+    <div class="admonition tip article-status">
+      {% if meta and meta.get('article_outdated') == 'True' %}
+      <p class="first admonition-title">Work in progress</p>
+      <p>
+        The content of this page was not yet updated for Godot
+        <code class="docutils literal notranslate">{{ godot_version }}</code>
+        and may be <strong>outdated</strong>. If you know how to improve this page or you can confirm
+        that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
+      </p>
+      {% else %}
+      <p class="first admonition-title">Up to date</p>
+      <p>
+        This page is <strong>up to date</strong> for Godot <code class="docutils literal notranslate">{{ godot_version }}</code>.
+        If you still find outdated information, please <a href="https://github.com/godotengine/godot-docs">open an issue</a>.
+      </p>
+      {% endif %}
+    </div>
+    {% endif %}
+  </div>
+  {% endif %}
+
+  {% block body %}{% endblock %}
+</div>
+{%- if self.comments()|trim %}
+  <div class="articleComments">
+    {%- block comments %}{% endblock %}
+  </div>
+{%- endif%}
+</div>
+{%- endblock %}

+ 60 - 0
_templates/versions.html

@@ -0,0 +1,60 @@
+{# Add rst-badge after rst-versions for small badge style. #}
+{% set display_version = version -%}
+{% set listed_languages = ({"en":"#", "de":"#", "es":"#", "fr":"#"}).items() -%}
+{% set listed_versions = ({"stable":"#", "latest":"#"}).items() -%}
+
+{% if READTHEDOCS and current_version %}
+  {% set display_version = current_version -%}
+{% endif %}
+{% if READTHEDOCS and versions %}
+  {% set listed_versions = versions -%}
+{% endif %}
+
+<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
+  <span class="rst-current-version" data-toggle="rst-current-version">
+    <span class="fa fa-book"> Read the Docs</span>
+    v: {{ display_version }}{% if display_version != godot_version %} ({{ godot_version }}){% endif %}
+    <span class="fa fa-caret-down"></span>
+  </span>
+  <div class="rst-other-versions">
+    {#
+      The contents of this element will be replaced in production.
+      But we can still have some mock data for testing.
+    #}
+
+    <dl>
+      <dt>{{ _('Languages') }}</dt>
+      {% for slug, url in listed_languages %}
+        <dd><a href="{{ url }}">{{ slug }}</a></dd>
+      {% endfor %}
+    </dl>
+    <dl>
+      <dt>{{ _('Versions') }}</dt>
+      {% for slug, url in listed_versions %}
+        <dd><a href="{{ url }}">{{ slug }}</a></dd>
+      {% endfor %}
+    </dl>
+    <dl>
+      {# Translators: The phrase "Read the Docs" is not translated #}
+      <dt>{{ _('On Read the Docs') }}</dt>
+        <dd>
+          <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}">{{ _('Project Home') }}</a>
+        </dd>
+        <dd>
+          <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/builds/">{{ _('Builds') }}</a>
+        </dd>
+        <dd>
+          <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/downloads/">{{ _('Downloads') }}</a>
+        </dd>
+    </dl>
+
+    <hr>
+    <small>
+      <span>Hosted by <a href="https://readthedocs.org">Read the Docs</a></span>
+      <span> · </span>
+      <a href="https://docs.readthedocs.io/page/privacy-policy.html">Privacy Policy</a>
+    </small>
+
+    {##}
+  </div>
+</div>

+ 1 - 1
about/docs_changelog.rst

@@ -5,7 +5,7 @@ Documentation changelog
 
 The documentation is continually being improved. The release of version 3.2
 includes many new tutorials, many fixes and updates for old tutorials, and many updates
-to the :ref:`class reference <toc-class-ref>`. Below is a list of new tutorials
+to the :ref:`class reference <doc_class_reference>`. Below is a list of new tutorials
 added since version 3.1.
 
 .. note:: This document only contains new tutorials so not all changes are reflected,

+ 0 - 18
about/index.rst

@@ -1,18 +0,0 @@
-About
-=====
-
-.. toctree::
-   :maxdepth: 1
-   :name: toc-about
-
-   introduction
-   faq
-   troubleshooting
-   list_of_features
-   docs_changelog
-   release_policy
-   complying_with_licenses
-
-.. history
-.. authors
-.. license

+ 2 - 0
classes/index.rst

@@ -1,5 +1,7 @@
 :github_url: hide
 
+.. _doc_class_reference:
+
 Godot API
 =========
 

+ 1 - 1
community/contributing/contributing_to_the_documentation.rst

@@ -26,7 +26,7 @@ request triggers a rebuild of the online documentation upon merging.
 
 .. warning:: The class reference's source files are in the `Godot engine
              repository <https://github.com/godotengine/godot>`_. We generate
-             the :ref:`Godot API <toc-class-ref>` section of this documentation
+             the :ref:`Godot API <doc_class_reference>` section of this documentation
              from them. If you want to update the description of a class, its
              methods, or properties, read
              :ref:`doc_updating_the_class_reference`.

+ 2 - 2
community/contributing/documentation_guidelines.rst

@@ -27,8 +27,8 @@ documentation.
 
 .. warning:: The class reference's source files are in the `Godot engine repository
              <https://github.com/godotengine/godot>`_. We generate the :ref:`Godot API
-             <toc-class-ref>` section of this documentation from them. If you want to update the
-             description of a class, its methods, or properties, read
+             <doc_class_reference>` section of this documentation from them. If you want
+             to update the description of a class, its methods, or properties, read
              :ref:`doc_updating_the_class_reference`.
 
 .. warning:: If you want to edit the **API reference**, please note that it

+ 2 - 2
community/contributing/updating_the_class_reference.rst

@@ -5,7 +5,7 @@ Contributing to the class reference
 
 .. highlight:: shell
 
-The class reference is available online in the :ref:`classes <toc-class-ref>`
+The class reference is available online in the :ref:`classes <doc_class_reference>`
 section of the documentation and in the Godot editor, from the help menu.
 
 In the class reference, some methods, variables, and signals lack descriptions.
@@ -45,7 +45,7 @@ repository: `doc/classes/
 
 .. warning:: Always edit the API reference through these source XML files. Do
              not edit the generated ``.rst`` files :ref:`in the online documentation
-             <toc-class-ref>`, hosted in the `godot-docs
+             <doc_class_reference>`, hosted in the `godot-docs
              <https://github.com/godotengine/godot-docs>`_ repository.
 
 .. warning::

+ 1 - 1
community/contributing/ways_to_contribute.rst

@@ -197,7 +197,7 @@ There are two separate resources referred to as "documentation" in Godot:
 - **The class reference.** This is the documentation for the complete Godot API
   as exposed to GDScript and the other scripting languages. It can be consulted
   offline, directly in Godot's code editor, or online at :ref:`Godot API
-  <toc-class-ref>`. To contribute to the class reference, you have to edit the
+  <doc_class_reference>`. To contribute to the class reference, you have to edit the
   XML file corresponding to the class and make a pull request.
   See :ref:`doc_updating_the_class_reference` and
   :ref:`doc_class_reference_writing_guidelines` for more details.

+ 33 - 20
conf.py

@@ -2,6 +2,7 @@
 #
 # Godot Engine documentation build configuration file
 
+import sphinx
 import sphinx_rtd_theme
 import sys
 import os
@@ -76,7 +77,7 @@ master_doc = "index"
 # General information about the project
 project = "Godot Engine"
 copyright = (
-    "2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)"
+    "2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0)"
 )
 author = "Juan Linietsky, Ariel Manzur and the Godot community"
 
@@ -96,20 +97,20 @@ if env_tags is not None:
 # Language / i18n
 
 supported_languages = {
-    "en": "Godot Engine (%s) documentation in English",
-    "de": "Godot Engine (%s) Dokumentation auf Deutsch",
-    "es": "Documentación de Godot Engine (%s) en español",
-    "fr": "Documentation de Godot Engine (%s) en français",
-    "fi": "Godot Engine (%s) dokumentaatio suomeksi",
-    "it": "Godot Engine (%s) documentazione in italiano",
-    "ja": "Godot Engine (%s)の日本語のドキュメント",
-    "ko": "Godot Engine (%s) 문서 (한국어)",
-    "pl": "Dokumentacja Godot Engine (%s) w języku polskim",
-    "pt_BR": "Documentação da Godot Engine (%s) em Português Brasileiro",
-    "ru": "Документация Godot Engine (%s) на русском языке",
-    "uk": "Документація до Godot Engine (%s) українською мовою",
-    "zh_CN": "Godot Engine (%s) 简体中文文档",
-    "zh_TW": "Godot Engine (%s) 正體中文 (台灣) 文件",
+    "en": "Godot Engine %s documentation in English",
+    "de": "Godot Engine %s Dokumentation auf Deutsch",
+    "es": "Documentación de Godot Engine %s en español",
+    "fr": "Documentation de Godot Engine %s en français",
+    "fi": "Godot Engine %s dokumentaatio suomeksi",
+    "it": "Godot Engine %s documentazione in italiano",
+    "ja": "Godot Engine %sの日本語のドキュメント",
+    "ko": "Godot Engine %s 문서 (한국어)",
+    "pl": "Dokumentacja Godot Engine %s w języku polskim",
+    "pt_BR": "Documentação da Godot Engine %s em Português Brasileiro",
+    "ru": "Документация Godot Engine %s на русском языке",
+    "uk": "Документація до Godot Engine %s українською мовою",
+    "zh_CN": "Godot Engine %s 简体中文文档",
+    "zh_TW": "Godot Engine %s 正體中文 (台灣) 文件",
 }
 
 language = os.getenv("READTHEDOCS_LANGUAGE", "en")
@@ -154,9 +155,11 @@ html_theme_options = {
     "logo_only": True,
     # Collapse navigation (False makes it tree-like)
     "collapse_navigation": False,
+    # Hide the documentation version name/number under the logo
+    "display_version": False,
 }
 
-html_title = supported_languages[language] % version
+html_title = supported_languages[language] % ( "(" + version + ")" )
 
 # VCS options: https://docs.readthedocs.io/en/latest/vcs.html#github
 html_context = {
@@ -167,6 +170,7 @@ html_context = {
     "conf_py_path": "/",  # Path in the checkout to the docs root
     "godot_inject_language_links": True,
     "godot_docs_supported_languages": list(supported_languages.keys()),
+    "godot_docs_title": supported_languages[language],
     "godot_docs_basepath": "https://docs.godotengine.org/",
     "godot_docs_suffix": ".html",
     "godot_default_lang": "en",
@@ -174,9 +178,15 @@ html_context = {
     # Distinguish local development website from production website.
     # This prevents people from looking for changes on the production website after making local changes :)
     "godot_title_prefix": "" if on_rtd else "(DEV) ",
+    # Set this to `True` when in the `latest` branch to clearly indicate to the reader
+    # that they are not reading the `stable` documentation.
+    "godot_is_latest": False,
+    "godot_version": "3.6",
+    # Enables a banner that displays the up-to-date status of each article.
+    "godot_show_article_status": False,
 }
 
-html_logo = "img/docs_logo.png"
+html_logo = "img/docs_logo.svg"
 
 # These folders are copied to the documentation's HTML output
 html_static_path = ["_static"]
@@ -186,11 +196,14 @@ html_extra_path = ["robots.txt"]
 # These paths are either relative to html_static_path
 # or fully qualified paths (e.g. https://...)
 html_css_files = [
-    "css/custom.css",
+    "css/custom.css?1", # Increment the number at the end when the file changes to bust the cache.
 ]
 
+if not on_rtd:
+    html_css_files.append("css/dev.css")
+
 html_js_files = [
-    "js/custom.js",
+    "js/custom.js?1", # Increment the number at the end when the file changes to bust the cache.
 ]
 
 # Output file base name for HTML help builder
@@ -242,11 +255,11 @@ gettext_compact = False
 # https://github.com/sphinx-doc/sphinx/issues/7768 to see what would be relevant for us.
 figure_language_filename = "{root}.{language}{ext}"
 
-import sphinx
 cwd = os.getcwd()
 
 sphinx_original_get_image_filename_for_language = sphinx.util.i18n.get_image_filename_for_language
 
+
 def godot_get_image_filename_for_language(filename, env):
     """
     Hack the absolute path returned by Sphinx based on `figure_language_filename`

+ 1 - 1
getting_started/introduction/learning_new_features.rst

@@ -33,7 +33,7 @@ from within the Godot editor. To do so, go to Help -> Search or press
 
 .. image:: img/manual_class_reference_search.png
 
-To browse it online, head to the manual's :ref:`Class Reference <toc-class-ref>`
+To browse it online, head to the manual's :ref:`Class Reference <doc_class_reference>`
 section.
 
 A class reference's page tells you:

BIN
img/docs_logo.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
img/docs_logo.svg


+ 59 - 39
index.rst

@@ -10,7 +10,7 @@ Godot Docs – *3.6* branch
 .. only:: i18n
 
   .. note:: This documentation is translated from the `original English one
-            <https://docs.godotengine.org/en/latest>`_ by community members
+            <https://docs.godotengine.org/en/stable>`_ by community members
             on `Weblate <https://hosted.weblate.org/projects/godot-engine/godot-docs>`_.
 
             Depending on the translation effort's completion level, you may
@@ -19,8 +19,9 @@ Godot Docs – *3.6* branch
             ones on Weblate.
 
             For the time being, localized translations are only available for
-            the "latest" (development) branch, but should be suitable to learn
-            how to use stable Godot releases nevertheless.
+            the "stable" branch. You can still view the English documentation for
+            other engine versions using the "Read the Docs" panel at the bottom
+            of the sidebar.
 
 Welcome to the official documentation of `Godot Engine <https://godotengine.org>`__,
 the free and open source community-driven 2D and 3D game engine! If you are new
@@ -28,42 +29,62 @@ to this documentation, we recommend that you read the
 :ref:`introduction page <doc_about_intro>` to get an overview of what this
 documentation has to offer.
 
-The table of contents below and in the sidebar should let you easily access the
-documentation for your topic of interest. You can also use the search function
-in the top left corner.
+The table of contents in the sidebar should let you easily access the documentation
+for your topic of interest. You can also use the search function in the top-left corner.
 
-You can also `download an HTML copy <https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-stable.zip>`__
-for offline reading (updated every Monday). Extract the ZIP archive then open
-the top-level ``index.html`` in a web browser.
+Get involved
+------------
+
+Godot Engine is an open source project developed by a community of volunteers.
+The documentation team can always use your feedback and help to improve the
+tutorials and class reference. If you don't understand something, or cannot find
+what you are looking for in the docs, help us make the documentation better
+by letting us know!
 
-.. note:: Godot Engine is an open source project developed by a community of
-          volunteers. The documentation team can always use your
-          feedback and help to improve the tutorials and class reference. If
-          you don't understand something, or cannot find what you
-          are looking for in the docs, help us make the documentation better
-          by letting us know!
-
-          Submit an issue or pull request on the `GitHub repository
-          <https://github.com/godotengine/godot-docs/issues>`_,
-          help us `translate the documentation
-          <https://hosted.weblate.org/engage/godot-engine/>`_ into your
-          language, or talk to us on the
-          ``#documentation`` channel on the `Godot Contributors Chat
-          <https://chat.godotengine.org/>`_!
+Submit an issue or pull request on the `GitHub repository <https://github.com/godotengine/godot-docs/issues>`_,
+help us `translate the documentation <https://hosted.weblate.org/engage/godot-engine/>`_
+into your language, or talk to us on the ``#documentation`` channel on the
+`Godot Contributors Chat <https://chat.godotengine.org/>`_!
 
 .. centered:: |weblate_widget|
 
-The main documentation for the site is organized into the following sections:
+Offline documentation
+---------------------
+
+To browse the documentation offline, you can use the mirror of the documentation
+hosted on `DevDocs <https://devdocs.io/godot/>`__. To enable offline browsing on
+DevDocs, you need to:
+
+- Click the three dots in the top-left corner, choose **Preferences**.
+- Enable the desired version of the Godot documentation by checking the box
+  next to it in the sidebar.
+- Click the three dots in the top-left corner, choose **Offline data**.
+- Click the **Install** link next to the Godot documentation.
+
+You can also `download an HTML copy <https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-master.zip>`__
+for offline reading (updated every Monday). Extract the ZIP archive then open
+the top-level ``index.html`` in a web browser.
+
+
+.. Below is the main table-of-content tree of the documentation website.
+   It is hidden on the page itself, but it makes up the sidebar for navigation.
 
 .. toctree::
+   :hidden:
    :maxdepth: 1
-   :caption: General
+   :caption: About
    :name: sec-general
 
-   about/index
-
+   about/introduction
+   about/faq
+   about/troubleshooting
+   about/list_of_features
+   about/docs_changelog
+   about/release_policy
+   about/complying_with_licenses
 
 .. toctree::
+   :hidden:
    :maxdepth: 1
    :caption: Getting started
    :name: sec-learn
@@ -74,19 +95,23 @@ The main documentation for the site is organized into the following sections:
    getting_started/first_3d_game/index
 
 
-.. The sections below are sorted alphabetically. Please keep them that way.
+.. Sections below are split into two groups. First come meta sections, covering
+   general matters. Below that different areas of the engine are listed.
+   These sections are sorted alphabetically. Please keep them that way.
 .. toctree::
+   :hidden:
    :maxdepth: 1
-   :caption: Tutorials
+   :caption: Manual
    :name: sec-tutorials
 
+   tutorials/best_practices/index
+   tutorials/editor/index
+
    tutorials/2d/index
    tutorials/3d/index
    tutorials/animation/index
    tutorials/assets_pipeline/index
    tutorials/audio/index
-   tutorials/best_practices/index
-   tutorials/editor/index
    tutorials/export/index
    tutorials/i18n/index
    tutorials/inputs/index
@@ -106,6 +131,7 @@ The main documentation for the site is organized into the following sections:
 
 
 .. toctree::
+   :hidden:
    :maxdepth: 1
    :caption: Development
    :name: sec-devel
@@ -117,6 +143,7 @@ The main documentation for the site is organized into the following sections:
 
 
 .. toctree::
+   :hidden:
    :maxdepth: 1
    :caption: Community
    :name: sec-community
@@ -128,16 +155,9 @@ The main documentation for the site is organized into the following sections:
 
 
 .. toctree::
+   :hidden:
    :maxdepth: 1
    :caption: Class reference
    :name: sec-class-ref
 
    classes/index
-
-
-.. Indices and tables
-.. ------------------
-..
-.. * :ref:`genindex`
-.. * :ref:`modindex`
-.. * :ref:`search`

Vissa filer visades inte eftersom för många filer har ändrats