Skip to content

Taxonomy support (for discussion)#9

Open
leewillis77 wants to merge 3 commits into
alt-design:mainfrom
leewillis77:feature/taxonomy-support
Open

Taxonomy support (for discussion)#9
leewillis77 wants to merge 3 commits into
alt-design:mainfrom
leewillis77:feature/taxonomy-support

Conversation

@leewillis77

Copy link
Copy Markdown
Contributor

This is an initial stab at taxonomy support (as requested in #7)

This PR:

  1. Adds two sections to the sitemap settings to allow you to choose priorities for specific taxonomies and whether to exclude certain taxonomies from the sitemap
  2. Refactors the code in generateSitemap() a little to break into logical sections for Entries, Terms, and manually added URLs (a further development from Support for manually adding items to the sitemap #8 - this can supercede that if you think this can be accepted).
  3. Generates entries in the sitemap for taxonomy terms

It does not:

  1. Add entries in the sitemap for taxonomy "listing" pages - ie a page which lists all terms in a given taxonomy
  2. Correctly calculate lastModified() dates (IMHO). The date is the date on which the term itself was last updated, and should probably more accurately be the date of most recently modified entry associated with that term?
  3. Allow individual tags to be excluded from the sitemap - or have their priorities set - see FIXMEs left in the code

On [3] if someone can provide a pointer as to how the Alt-Sitemap blueprint is auto-assigned to entries I can look at expanding this PR to also do that on term edit pages.

@leewillis77

Copy link
Copy Markdown
Contributor Author

Hi;

Just wondered if there was any feedback on this?

Thanks

@Alt-Ben

Alt-Ben commented Dec 16, 2024

Copy link
Copy Markdown
Member

Hey @leewillis77!

Sorry for the delay on reviewing this, we've been so busy 😅 but both of your pull requests look brill.

The taxonomy support is a bit weird, as we can't hook into the taxonomy blueprint, as there's no event for it currently (that we're aware of anyway) so we can't amend the blueprint on the fly.

We've had thoughts around workarounds, we just need to implement them, but we may look to implement the event into core Statamic and then from there be able to utilise something like the above.

Thanks!

@Alt-Ben Alt-Ben self-assigned this Dec 16, 2024
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.

2 participants