Commit Graph

111 Commits

Author SHA1 Message Date
Rémi Verschelde
c5befa1494 conf: Rename zh_CN/zh_TW to zh_Hans/zh_Hant
See https://github.com/godotengine/godot-proposals/issues/6289.
2025-12-19 14:38:07 +01:00
Max Hilbrunner
3cc1b0d979 Bump version 2025-09-13 05:48:55 +02:00
Max Hilbrunner
69d69dad2c Update Godot docs version to 4.5 2025-08-04 12:23:13 +02:00
Matthew
76cf579d9e Merge pull request #10251 from tetrapod00/custom-role
Add custom Sphinx roles for editor UI
2025-07-15 06:51:03 -04:00
Hugo Locurcio
2bfc2f04cf Hide user notes on 404 page
This switches to `404.rst` instead of an embedded 404 page in `conf.py`,
so we can specify page metadata.
2025-04-28 19:04:58 +02:00
tetrapod00
6792402014 Add custom Sphinx roles for editor UI 2025-04-12 12:47:31 -07:00
Max Hilbrunner
68d7191b39 Add Plausible 2025-02-01 14:52:13 +01:00
Max Hilbrunner
982783d9ab CI: Add virtualenv 2025-01-06 21:40:41 +01:00
tetrapod00
2cbe8488d4 Update broken link to RTD docs in comment 2024-12-06 00:01:46 -08:00
Max Hilbrunner
df5976ae09 Merge pull request #10194 from Piralein/layoutfix
Remove the new "switch-menu" in sidebartitle
2024-11-12 07:50:31 +01:00
Hana - Piralein
fd830a99c3 Restore old menu 2024-11-11 20:40:47 +01:00
Max Hilbrunner
181206baaa Remove canonical/hreflang tags, let RTD I18N do it 2024-11-05 04:53:51 +01:00
Hana - Piralein
6a9dc9b6a9 Update Sphinx version 2024-11-01 08:26:58 +01:00
Max Hilbrunner
dd9448f725 Bump version 2024-08-15 14:16:05 +02:00
Hugo Locurcio
3e3bbde35b Add support for embedding videos in documentation pages
This is more efficient than GIFs, animated PNGs or WebPs, while also
providing controls and audio playback if needed.
2024-03-27 19:58:27 +01:00
skyace65
e1a71ea7a1 Add table of contents to epub of docs 2024-03-22 22:39:37 -04:00
Hugo Locurcio
95fb178429 Add support for user-provided comments with Giscus
This allows users to leave comments on pages that don't have
`:allow_comments: False` somewhere in the page's source.
Both manual and class reference pages can receive comments.
Index pages cannot have comments, as discussion should occur on "leaf" pages.

GitHub Discussions is used as a backend on the same repository. This means
that Discussions *must* be enabled on godotengine/godot-docs before this
commit is merged to `master`. Users can choose to use the "Custom" watch
mode if they don't want to get notifications for discussion updates,
but still get notifications for issue and pull request updates.

User comments are intended to be used for the following purposes:

- Add a clarification or correct something in the documentation,
  without having to open a pull request. Contributors are encouraged to
  take a look at discussions from time to time, and see if there's information
  worth incorporating in the pages themselves. Don't forget to reply to
  the comment when doing so :)
- Mention a workaround for a common issue.
- Link to useful third-party resources that are relevant to the current page,
  such as tutorials or add-ons.

User comments should *not* be used for technical support. Other community
platforms should be used for that.

Page-to-discussion matching is done using the `pagename` Sphinx variable,
which is independent of the Godot version and documentation language.
Being independent of the Godot version allows keeping old comments
when the Godot version changes, while also allowing users from `/stable`
and `/4.1` to "see" each other in discussions.

See https://giscus.app for more information.
2024-01-11 17:51:53 +01:00
Hugo Locurcio
04020f1c08 Fix / keyboard shortcut to allow typing / within the search field
- Select all existing text in the field when pressing the shortcut.
- Remove broken Algolia integration (unused since 4.0) and move
  the shortcut code to the main `custom.js` file.
2023-12-04 15:45:04 +01:00
Yuri Sizov
b90284285d Bump master version to 4.3 2023-11-29 14:31:56 +01:00
Rémi Verschelde
6d295f7c84 conf.py: Fix regression with composite language codes
RTD decided to normalize language codes such as `zh_CN` and `pt_BR`
to `zh-cn` and `pt-br`, apparently because it makes URLs prettier...
https://blog.readthedocs.com/language-codes-are-now-normalized/

But they didn't take into account that Sphinx doesn't do the same,
and still requires `zh_CN` and `pt_BR` for its `language` config value.

So we have to convert it back in `conf.py`, otherwise this breaks our
i18n logic, notably to handle the localized class reference and images.
2023-11-23 13:54:22 +01:00
Thaddeus Crews
6c074b44cb Disable collapsing tabs for codeblocks 2023-10-27 09:51:43 -05:00
Yuri Sizov
82fac20c98 Update Godot version to 4.2 2023-07-06 09:41:07 +02:00
Yuri Sizov
ccae259c15 Update Godot version to match what the master branch actually tracks 2023-06-29 16:49:04 +02:00
Justin McGettigan
2f919ba970 Add the 'sphinx-copybutton' Sphinx extension. (#6918)
* Added the 'sphinx-copybutton' Sphinx extension.
2023-04-17 18:32:15 +02:00
Yuri Sizov
d14d924470 Display Godot version more clearly 2023-03-02 20:19:50 +01:00
Yuri Sizov
f45c014fb1 Update admonition styling
Co-authored-by: Justin McGettigan <jwmcgettigan@gmail.com>
2023-03-01 16:09:59 +01:00
Yuri Sizov
ff4f111677 Add a warning that docs are WIP and a status flag for articles
By default (no flag) articles are considered up-to-date, with the end goal to have no
articles marked as outdated.
Use `:article_outdated: True` at the top of an article to mark it as being outdated.
2023-02-26 12:57:38 +01:00
Yuri Sizov
1da407b921 Move the latest branch warning into templates 2023-02-24 19:42:51 +01:00
Rémi Verschelde
7fc697f10e Fix typo in last commit 2023-01-20 14:50:05 +01:00
Rémi Verschelde
b4a43f14b8 Update copyright statement from 2022 to 'present' 2023-01-20 14:47:22 +01:00
Yuri Sizov
0ba3029d24 Remove breadcrumb styling adjustments after the base theme update 2023-01-10 18:12:39 +03:00
Yuri Sizov
98e96ced67 Make the navigation sidebar less crowded and noisy 2022-12-29 19:05:50 +03:00
Adam Scott
2b06a3822d Fix midword link wrapping issues
Adds <wbr> which is suggested linebreaks to each class reference link
in the sidebar once the page is ready.
2022-12-27 20:42:22 +03:00
Yuri Sizov
faaf0dddab Improve the new class reference look based on feedback 2022-12-06 13:58:29 +03:00
Yuri Sizov
7c8e820228 Improve styling of class reference pages
- General improvements to the page layout and style
- Improved styling for all class (properties, signals, annotations, theme properties, methods, operators, constructors, enumerations, constants)
- Improved styling for tabs, code tabs, standalone code blocks, and tables
2022-12-01 16:30:19 +03:00
Yuri Sizov
0209919fc2 Remove search highlights from the page and the history
Co-authored-by: the-sink <lucianedean@gmail.com>
2022-11-21 22:13:24 +03:00
Yuri Sizov
c77e4a8046 Correct exceptions for the class reference badge 2022-11-21 14:49:52 +03:00
Yuri Sizov
0a9683edbc Add cache-busting to custom web assets 2022-11-21 13:45:32 +03:00
Yuri Sizov
4096508fb6 Change the square logo for a wide one (#6397)
Co-authored-by: Patchcoat <spiencewelch@gmail.com>
2022-11-20 12:10:09 +01:00
Jason Yundt
5175fb8256 Use official CC BY 3.0 terminology and resources
This change makes the docs repo always use the official abbreviation (CC BY 3.0)
for its license. Previously, it would sometimes use “CC-BY 3.0” or
“CC-BY-3.0”. This change also make the docs repo always point to the
official Commons deed [1] for more information about CC BY 3.0.
Previously, it would sometimes link to an unofficial source [2].

[1]: <https://creativecommons.org/licenses/by/3.0/>
[2]: <https://tldrlegal.com/license/creative-commons-attribution-(cc)>
2022-09-13 14:05:04 -04:00
ARez
a0af6b9df1 Updated the Lincense to match the current year 2022-02-22 13:09:55 +01:00
Rémi Verschelde
a29b557361 conf.py: Add support for loading localized class reference
It will look up a potential `classes/<lang>` folder in the parent repository
of https://github.com/godotengine/godot-docs-l10n and use it if provided.

This folder includes a pre-translated copy of the class reference XML, read
to be used by Sphinx. This turned out to be a simpler approach than generating
PO files for class reference strings in reStructured Text format, given that
their source format is XML and the conversion on a per `msgid` basis would be
quite tricky.

This approach is very hacky, as Sphinx doesn't seem to support any kind of
conditional statements in its `toctree` directives, so we have to outright
replace the content at build time. This should typically only be done on RTD
so it shouldn't end up polluting the Git history.
2021-12-21 15:49:20 +01:00
Aaron Franke
4060179184 Remove trailing space characters (#5251) 2021-09-13 14:52:39 +02:00
Max Hilbrunner
50edc681f9 Add dev.css override 2021-07-11 13:01:16 +02:00
Leroy Bakker
6ae96e7b50 Implemented Algolia search (#4884)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-13 20:21:11 +02:00
Rémi Verschelde
044b6a74f8 Cleanup uses of double spaces between words or after punctuation 2021-06-07 10:44:02 +02:00
Rémi Verschelde
0a087e730f Update copyrights to 2021 2021-03-19 14:02:00 +01:00
Hugo Locurcio
9becaa5480 Add Open Graph tags for better link preview on social media
This is provided by the sphinxext-opengraph extension.

This also adds a theme color property in the HTML layout file.
2021-03-18 20:34:06 +01:00
Hugo Locurcio
f528a844d6 Add a more descriptive custom 404 error page (#4624)
This helps users find their way back to the documentation.
2021-02-05 21:48:22 +01:00
Hugo Locurcio
bdece44b8d Prevent the compatibility notice from being the meta description
Adding the compatibility notice via JavaScript prevents the
`meta description` Sphinx extension from taking the notice
as part of the description.

This also changes the redirect URL to point to the page the user
is currently reading instead of always pointing to the homepage.
2020-09-22 14:59:28 +02:00