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

Add sitemap / list of patterns endpoints #191

Open
thibaudcolas opened this issue Mar 21, 2022 · 0 comments
Open

Add sitemap / list of patterns endpoints #191

thibaudcolas opened this issue Mar 21, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@thibaudcolas
Copy link
Member

Is your proposal related to a problem?

There are two use cases we’ve run across where having a list of all the patterns within a project would be helpful:

  • For integration with Pa11y CI, to test all of the project’s patterns at once. It expects a sitemap, and has configuration to then ignore some of the entries.
  • For API usage with our new API rendering endpoint, to create a listing similarly to what the pattern library UI does

Describe the solution you'd like

  • One sitemap.xml URL with an XML sitemap
  • One custom API endpoint with the same nested patterns structure as in the UI

Describe alternatives you've considered

@jhancock532 shared with me his sitemap generator. I have created a custom API endpoint on my own.

Additional context

The logic to get the list / tree of patterns is here: https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/utils.py#L82.

@thibaudcolas thibaudcolas added the enhancement New feature or request label Mar 21, 2022
@thibaudcolas thibaudcolas added this to the Nice to have milestone Mar 21, 2022
@thibaudcolas thibaudcolas changed the title Add sitemap / list of patterns support Add sitemap / list of patterns endpoints Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant