TWE-689: HTML Sitemap#428
Conversation
helenb
left a comment
There was a problem hiding this comment.
Thanks @damwaingames this is looking great. I've got a few points for you to look through. I've reviewed this from a front-end perspective so it would be good to get a back-end review too.
|
@damwaingames thanks for the fixes - happy to approve this from a FE perspective - just one minor query remaining. I'll leave it to @nickmoreton to add the approve stamp when he's looked at the back-end. |
nickmoreton
left a comment
There was a problem hiding this comment.
HI @damwaingames Did you consider using a view class for the site map page? It feels like having to create a page in the admin with a slug that gets overridden could be avoided. Unless I'm missing something?
I'm assuming that the page will always be in place and shouldn't/couldn't be removed, unless we decide to remove it.
Yes, but this means that the editors can still control the meta data. |
|
@damwaingames can you address @zerolab's feedback and then update staging before this gets deployed to production? |
Co-authored-by: Dan Braghiș <31622+zerolab@users.noreply.github.com>
TWE-698 — HTML sitemap
Description of Changes Made
Adds a new
SitemapPageWagtail page type at/sitemap/that lists all live, public pages on the site organised hierarchically by section, and links to it from the site footer.tbx/sitemap/— new Django app containingSitemapPage, aBasePagesubclass that generates its content programmatically from the Wagtail page tree. No CMS-editable content fields — editors control only the slug and standard page metadata.wagtail.contrib.sitemaps:.live().public()filters unpublished and password-protected pages;slug='incident'pages are excluded to match the project's per-page noindex convention.footer-links.htmlso editors cannot remove it via the CMS, and so it renders on fresh installs before aSitemapPageexists.clean()always setsslug = "sitemap"and raises aValidationErrorif a secondSitemapPageis created._sitemap.scsscomponent using existing design tokens.Also fixes several pre-existing stylelint issues (
_variables.scss,_grid.scss,_listing-image.scss,_pagination.scss) that were causing CI failures, and disables thescss/dollar-variable-no-missing-interpolationrule to resolve a conflict between stylelint and the CSS formatter.How to Test
./manage.py migrate/sitemap/— all live, public pages should be listed hierarchically/sitemap/— the change should be reflected immediately/sitemap/appears in the footer on every page./manage.py test tbx.sitemapMR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library