From 905cef85c731ce456619e3011e3c32060ebc1e4d Mon Sep 17 00:00:00 2001 From: Henrique Moody Date: Mon, 5 Jan 2026 14:44:52 +0100 Subject: [PATCH] Improve syntax highlighting in MkDocs pages The syntax of PHP code was not showing with different colors, but shown as plain/text. --- .readthedocs.yaml | 4 ++++ docs/requirements.txt | 3 +++ mkdocs.yml | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 docs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 520ddfe9..7238db18 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,5 +5,9 @@ build: tools: python: "3.12" +python: + install: + - requirements: docs/requirements.txt + mkdocs: configuration: mkdocs.yml diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..2165e5c5 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs>=1.5.0 +pymdown-extensions>=10.0 + diff --git a/mkdocs.yml b/mkdocs.yml index 91814441..22dfb844 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,2 +1,10 @@ site_name: Respect\Validation theme: readthedocs + +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.superfences