From 70ab145121a01bc9887024ca3c625e18e0d7240e Mon Sep 17 00:00:00 2001 From: Andreia Velasco Date: Fri, 17 Jul 2026 15:05:07 +0200 Subject: [PATCH 1/4] add canary page changes --- docs/canary-page.md | 694 ++++++++++++++++++++++++++++++++++++++++++++ docs/conf.py | 25 +- docs/hidden-page.md | 8 + docs/index.rst | 7 + docs/redirects.txt | 6 +- 5 files changed, 728 insertions(+), 12 deletions(-) create mode 100644 docs/canary-page.md create mode 100644 docs/hidden-page.md diff --git a/docs/canary-page.md b/docs/canary-page.md new file mode 100644 index 00000000..33f80561 --- /dev/null +++ b/docs/canary-page.md @@ -0,0 +1,694 @@ +--- +relatedlinks: "[Example link](https://example.com)" +hide-toc: true +--- + +# Test page for default extensions + +This page contains basic example structures from every MyST and rST extension that is included in the Sphinx Stack by default. + +## `canonical_sphinx` + +Below are the default extensions bundled into `canonical_sphinx`. + +### Furo theme + +This is partially tested by setting Furo's `hide-toc` feature to `true` in this page's metadata. + +**Expectation**: The right side of the page should **not** contain a table of contents. + +**HTML check**: The HTML of this page does **not** contain the following `
` classes: + +```html +
+ (...) +
+ (...) +``` + +### MyST parser + +This is tested with the `{sub-ref}` MyST directive to count words through `wordcount-words`. + +**Expectation**: There is a number in the sentence "This page has {sub-ref}`wordcount-words` words". + +### linkify-it-py + +This is tested by writing a URL in plain text and checking that it turns into a link. + +**Expectation**: //localhost is a clickable link. + +**HTML check**: + +```html +//localhost +``` + +## `notfound.extension` + +This is tested by accessing a non-existent sub-page of this documentation set. + +**Expectation**: https://documentation.ubuntu.com/sphinx-stack/a renders a "Page not found" message with the same CSS styling as the rest of the documentation, maintaining the left-side navigation and upper menu. + +## `sphinx_design` + +This is tested by rendering sample structures based on [`sphinx-design` documentation examples](https://sphinx-design.readthedocs.io/en/latest/index.html). + +### Grids + +#### Basic grid + +**Expectation**: The following grids have an outer outline and three grid items. + +````{grid} +:outline: + +```{grid-item} +MyST grid item 1 +``` +```{grid-item} +MyST grid item 2 +``` +```{grid-item} +MyST grid item 3 +``` +```` + +```{eval-rst} +.. grid:: + :outline: + + .. grid-item:: + reST grid item 1 + + .. grid-item:: + reST grid item 2 + + .. grid-item:: + reST grid item 3 +``` + +**HTML check**: + +```html +
+ (...) +``` + +#### Card grids + +**Expectation**: The following grids are composed of cards. + +````{grid} +```{grid-item-card} Title 1 +MyST grid item card 1 +``` +```{grid-item-card} Title 2 +MyST grid item card 2 +``` +```{grid-item-card} Title 3 +MyST grid item card 3 +``` +```` + +```{eval-rst} +.. grid:: + + .. grid-item-card:: Title 1 + + reST grid item card 1 + + .. grid-item-card:: Title 2 + + reST grid item card 2 + + .. grid-item-card:: Title 3 + + reST grid item card 3 +``` + +**HTML check**: + +```html +
+ (...) +``` + +### Cards + +#### Basic card + +```{card} MyST card title +Card content +``` + +```{eval-rst} +.. card:: reST card title + + Card content +``` + +**HTML check**: + +```html +
+ (...) +``` + +#### Card with header and footer + +**Expectation**: The following cards have header and footer text. + +```{card} MyST card title +Header +^^^ +Card content ++++ +Footer +``` + +```{eval-rst} +.. card:: reST card title + + Header + ^^^ + Card content + +++ + Footer +``` + +**HTML check**: + +```html +
+ (...) +
- {% if has_contributor_listing and display_contributors and pagename and page_source_suffix %} + {% if display_contributors and pagename and page_source_suffix %} {% set contributors = get_contributors_for_file(pagename, page_source_suffix) %} {% if contributors %} {% if contributors | length > 1 %} @@ -100,4 +100,4 @@ {% endif %}
-
\ No newline at end of file +
diff --git a/docs/conf.py b/docs/conf.py index 5e115e33..d6e7c9fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -78,6 +78,7 @@ "repo_default_branch": "main", # Docs location in the repo; used in links for viewing the source files "github_folder": "/docs/", + "repo_folder": "/docs/", # TODO: To enable or disable the Previous / Next buttons at the bottom of pages # Valid options: none, prev, next, both # "sequential_nav": "", @@ -299,4 +300,4 @@ intersphinx_mapping = { "sphinx-stack-docs": ("https://documentation.ubuntu.com/sphinx-stack/latest/", None), -} \ No newline at end of file +} From cdff04000a4e207822eca071d617845a5a6a2573 Mon Sep 17 00:00:00 2001 From: Michael DuBelko Date: Fri, 17 Jul 2026 17:30:20 -0700 Subject: [PATCH 4/4] fix: github_url path --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index d6e7c9fc..0f6b9e42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -73,7 +73,7 @@ # documentation source files and creating GitHub issues are added at the bottom of # each page. # TODO: Change to your documentation GitHub repository URL or leave empty. - "github_url": "github.com/a-velasco/sphinx-stack-testing", + "github_url": "github.com/canonical/sphinx-stack", # Docs branch in the repo; used in links for viewing the source files "repo_default_branch": "main", # Docs location in the repo; used in links for viewing the source files