Skip to content

Commit 41cf60b

Browse files
authored
Merge pull request #154 from Point72/tkp/klink-preview-link
List klink in the theme previews
2 parents 0b0b2e4 + d51863d commit 41cf60b

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎docs/src/configuration.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ yardang preview
282282
```
283283

284284
This renders the documentation into `docs/html/_previews/<theme>/` for each
285-
bundled theme (`furo`, `sphinxawesome_theme`, `shibuya`, `fuma`). Themes whose
285+
bundled theme (`furo`, `sphinxawesome_theme`, `shibuya`, `fuma`, `klink`). Themes whose
286286
package is not installed are skipped. Restrict the set with `--themes`:
287287

288288
```bash
@@ -303,6 +303,7 @@ each theme is browsable live at a suburl of the published site:
303303
- [`/_previews/sphinxawesome_theme/`](https://yardang.python-templates.dev/_previews/sphinxawesome_theme/)
304304
- [`/_previews/shibuya/`](https://yardang.python-templates.dev/_previews/shibuya/)
305305
- [`/_previews/fuma/`](https://yardang.python-templates.dev/_previews/fuma/)
306+
- [`/_previews/klink/`](https://yardang.python-templates.dev/_previews/klink/)
306307

307308
## `source-dir`
308309

‎yardang/tests/test_themes.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ def test_other_themes_are_unchanged(self):
3232
assert build_module.theme_module("furo") == "furo"
3333

3434

35+
class TestDocumentedThemes:
36+
"""The theme lists in the docs are maintained by hand, so they drift."""
37+
38+
@pytest.mark.parametrize("theme", BUNDLED_THEMES)
39+
def test_theme_has_a_preview_link(self, theme):
40+
docs = Path(__file__).parents[2] / "docs" / "src" / "configuration.md"
41+
assert f"/_previews/{theme}/" in docs.read_text()
42+
43+
3544
class TestSearchIntegration:
3645
"""Search is theme-independent, so it is wired for every first-class theme."""
3746

0 commit comments

Comments
 (0)