Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add sitemap #1828

Merged
merged 45 commits into from
May 21, 2024
Merged

Feat/add sitemap #1828

merged 45 commits into from
May 21, 2024

Conversation

andrewleith
Copy link
Member

@andrewleith andrewleith commented May 1, 2024

Summary | Résumé

This PR adds a sitemap to the website at /sitemap. It also adds a macro to handle rendering the sitemap. The macro accepts a sitemap param which is a list of groups which each contain a list of pages and looks like this:

{
   "groups": 
    [
            {
                "title": "Group 1,
                "pages": [
                    {"href": "https://www.example.com", "link_text": "Example link" },
                    {"href": "https://www.example.com/2", "link_text": "Example link 2" },
                ],
            },
            {
                "title": "Group 2,
                "pages": [
                    {"href": "https://www.example.com/group2", "link_text": "Example link 3" },
                    {"href": "https://www.example.com/group2/2", "link_text": "Example link 4" },
                ],
            },
   ]
}

Release notes

This WAF rule change PR needs to go out at the same time:

Copy link

github-actions bot commented May 1, 2024

@andrewleith andrewleith marked this pull request as ready for review May 3, 2024 17:21
@andrewleith andrewleith requested a review from whabanks May 6, 2024 11:24
@@ -257,6 +258,12 @@ def welcome():
return render_template("views/welcome.html", default_limit=current_app.config["DEFAULT_SERVICE_LIMIT"])


# TODO: finish hardcoding the links (or come up with some way to generate these from annotations)
@main.route("/sitemap")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only thing I would change for the future is to make this route /sitemap-plan-du-site or something like that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I didn't think of including any of the bilingual routing features in here. We should talk about what end-state we want.

I think there are a few of options:

  1. multiple routes for each page - this would be the cleanest in my opinion
  2. multiple routes for each page with a lang parameter
  3. french and english in one route - this is hard to look at but easier to implement

Multiple routes would look like this:

  • /sitemap
  • /plandesite

Multiple routes with a lang parameter would look like this:

  • /en/sitemap
  • /fr/plandesite

French and english in one route would look like this:

  • /sitemap-plandesite

Copy link
Contributor

@jzbahrai jzbahrai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff! works as expected

@YedidaZalik
Copy link

@andrewleith after discussion with Yael, we made a few changes (reasoning in zenhub card):

  • "Spreadsheet guide" to change to "Using a spreadsheet"
  • "Guidance overview" to change to "Guidance index"
  • Since non-developers also use the System status page, let's have it in two places as we do with API documentation so I've added it to Help and guidance in the figma file:

Thank you!

@andrewleith andrewleith merged commit 60e5dd5 into main May 21, 2024
8 of 9 checks passed
@andrewleith andrewleith deleted the feat/add-sitemap branch May 21, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants