godotengine / godotengine/godot-docs

Add a guide for code-blocks to the contributing documentation.

Open
#7,016 1 comment 1 reaction 0 assignees View on GitHub
area:engine details enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
4.0

**Issue description:**
Context: https://github.com/godotengine/godot-docs/issues/6931

We should improve the documentation for contributing to godot-docs to include a basic guide to code-blocks.
- Mention Pygments and add a link to the [lexers](https://pygments.org/docs/lexers/) page as there is currently no mention of Pygments in the docs.
- Explain how to prevent unwanted styling in code blocks.
- Contributors must make sure that the content of the code block is supported by the lexer being used.
- `.. code-block:: none` will prevent any styling from being applied to a code-block.
- Provide examples and explanations on the rules that dictate how code-blocks tokenize their code and what styles are applied.
- Look into if there is a way to preview what a code-block would look like when using a particular lexer without having to build the docs.

**URL to the documentation page (if already existing):**
The most appropriate place to add this documentation would likely be either
https://docs.godotengine.org/en/stable/contributing/documentation/index.html#writing-the-manual
or
https://docs.godotengine.org/en/stable/contributing/documentation/contributing_to_the_documentation.html

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.