openstax / openstax-cms

The OpenStax CMS, built using Wagtail on top of Django.
https://openstax.org
GNU Affero General Public License v3.0
100 stars 15 forks source link

Url jiggering #1579

Closed TomWoodward closed 3 months ago

TomWoodward commented 3 months ago

https://openstax.atlassian.net/browse/DISCO-436

mostly i'm doing this for the correct html_url on blog posts for the impact stories

there were some places in the code that were customizing their urls with only the get_sitemap_urls override, but the documentation recommends using get_url_parts. the url generated by get_url_parts also seems to be used by the sitemap code, so in some place i just removed the sitemap override with the url parts override

removed new subjects feature flag

fixed flex page urls (they were inheriting the / override from rootpage)

marked impact stories and deprecated book index as non-navigable by returning none from url_parts, as suggested in the documentation. weirdly this doesn't omit it from the sitemap, so you need to override that too or None appears in the sitemap

the only places i left the sitemap overrides are where it was generating more than one url or explicitly hiding stuff