Skip to content

Commit b02d0bc

Browse files
pedrofaleclaude
andcommitted
Enable syntax highlighting in the markdown docs
mkdocs.yaml had no markdown_extensions block, so the fenced blocks in index.md, workflow.md, api.md and basicusage.md rendered as unstyled <pre>: mkdocs' builtin fenced_code marks a block up but nothing colours it. Add pymdownx.highlight and superfences (plus admonition/attr_list/details, matching iscc) and label the one unlabelled fence, the pip install in index.md, as bash. Verified in the built HTML rather than just a passing build: 25 highlight blocks across the four pages, and workflow.md's tables still render (toc/tables/ fenced_code are mkdocs builtins and survive an explicit extensions block). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent c8c4865 commit b02d0bc

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Deep exponential families for single-cell data. scDEF learns hierarchies of cell
1212
## Installation
1313
scDEF is available through [PyPI](https://pypi.org/project/scdef):
1414

15-
```
15+
```bash
1616
pip install scdef
1717
```
1818

mkdocs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,25 @@ theme:
2929
custom_dir: docs/overrides/
3030

3131

32+
# Without pymdownx.highlight the fenced blocks in the .md pages render as plain
33+
# unstyled <pre> -- mkdocs' builtin `fenced_code` marks up the block but nothing
34+
# colours it. `toc` and `tables` are mkdocs builtins and stay enabled whether or
35+
# not they appear here; `toc` is repeated below only to set `permalink`.
36+
markdown_extensions:
37+
- admonition
38+
- attr_list
39+
- tables
40+
- pymdownx.details
41+
- pymdownx.highlight:
42+
anchor_linenums: true
43+
# Highlights inline code carrying a shebang hint, e.g. `#!python model.fit()`.
44+
- pymdownx.inlinehilite
45+
# Superset of `fenced_code`; also what lets a fence sit inside a list item or
46+
# an admonition without breaking out of it.
47+
- pymdownx.superfences
48+
- toc:
49+
permalink: true
50+
3251
plugins:
3352
- search
3453
- mkdocs-jupyter:

0 commit comments

Comments
 (0)