This hopefully fixes all translated pages showing up in search engine results, and makes the STABLE version of each page canonical.
In turn, this allows us to re-enable indexing of the version-specific pages (see robots.txt changes), as search engines should prefer the canonical (stable) version, and only show the other versions if no canonical (stable) version exists (i.e. because that feature is only in latest, or was removed in stable).
It adds proper canonical links for all generated pages, and fixes the existing links between the various translations of a page by both ensuring the pages links to itself with the proper language tag, and by properly linking to the full path of other translated versions.
This also adds a missing comma in the middle of the list of
built-in types. The `name`, `funcname` and `classname` were also
missing a `r` qualifier, so it was added.
Commands used for formatting and linting:
black conf.py extensions/gdscript.py
flake8 --ignore E501 conf.py extensions/gdscript.py
This also removes the need to load Web fonts, leading to a smoother
page loading experience.
Co-authored-by: Nicholas Hydock <nhydock@users.noreply.github.com>
This commit provides two small fixes.
Gif images are not supported by latexpdf. There are a handful of options
to resolve that issue, but the already-available imgconverter extension
takes care of converting them to supported image formats.
The pdf build was failing due to the deprecated Sphinx `app.warn` used
in the sphinx_tabs extension. The `app.log` deprecation was already
handled in this function, and now `warn` is as well.
ReadTheDocs properly overrides `language` via's sphinx-build's
`-D language=value` parameter, but when we do the initial parsing
of `conf.py` it still uses the original value, so our custom logic
for Weblate badges was not working.
Up until now I mistakenly thought that ReadTheDocs' tags
were the same as Sphinx tags, and would be passed to the
build. It turns out that aren't, so our `.. only:: i18n`
logic did not work.
Instead, we now use RTD environment variables to pass
comma-separated tags to Sphinx.
It will now show the translation status for the used language instead
of the overall completion for all languages.
The badge widget's text is also in the used language.
The drawback is that to do this I had to inject the localized image
directive in the `rst_epilog` for all pages, even though we only need
it for the index.
4-space is our convention for indented blocks and should be used consistently.
The only exception is for C++ code which is tab-indented, as the engine code.
Though it covers an interesting topic in a way that can be beneficial
to many Godot users, after discussion with doc team members and reduz
we feel that its current scope is too out of phase with the target
readership of the Godot docs.
This tutorial would work better hosted out of the Godot docs, and
referenced with a `.. seealso::` link for those who want to dig further
into the math meat.
Thanks a lot to tagcup for this contribution though (as well as the
many contributions to the engine's math and rendering), and sorry for
not better describing what kind of "advanced" math tutorial would be
fitting for the Godot docs.
Sphinx: Also reverted from mathjax to imgmath, as the former implied
running JS code on every single page (regardless of their use of LaTeX
formulas to renderer), so for now imgmath is simpler and good enough.