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

WIP: added taxonomy pages to sitemap #49

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Renesauve
Copy link
Collaborator

Just seeing if it breaks or not here:

Still need to add pagination

Example

/blog/
/blog/1 ?
/blog/2

@Renesauve Renesauve linked an issue Feb 6, 2024 that may be closed by this pull request
Copy link

vercel bot commented Feb 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-wordpress-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 16, 2024 9:15pm
nextwp-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 16, 2024 9:15pm

@Renesauve
Copy link
Collaborator Author

For whatever reason the postType post.has_archive === false

not sure why this might be

@CalebBarnes
Copy link
Owner

For whatever reason the postType post.has_archive === false

not sure why this might be

Is this happening just for the nextwordpress.wpengine.com used in the starter example, or for all WP sites?

@CalebBarnes CalebBarnes changed the title added taxonomy pages to sitemap WIP: added taxonomy pages to sitemap Feb 7, 2024
@CalebBarnes
Copy link
Owner

Also, you should review the getPageData function to see how we are currently including taxonomy and term pages.

If I remember correctly, I think for any post type that is enabled, we are just getting all taxonomies that are used on that post type, not just getting all taxonomies for everything.

@Renesauve
Copy link
Collaborator Author

Also, you should review the getPageData function to see how we are currently including taxonomy and term pages.

If I remember correctly, I think for any post type that is enabled, we are just getting all taxonomies that are used on that post type, not just getting all taxonomies for everything.

Thanks for the tip! I'll take a look and see if I can reduce the complexity

@Renesauve
Copy link
Collaborator Author

For whatever reason the postType post.has_archive === false
not sure why this might be

Is this happening just for the nextwordpress.wpengine.com used in the starter example, or for all WP sites?

ill test this

@Renesauve
Copy link
Collaborator Author

it's woooooooooooooorking!!!!!
did it break anything?

i don't know

@CalebBarnes
Copy link
Owner

It would be great if we could write a test for generateStaticParams and generateSitemap and make sure these are always generating the same page urls.

@Renesauve
Copy link
Collaborator Author

It would be great if we could write a test for generateStaticParams and generateSitemap and make sure these are always generating the same page urls.

YEAH! I was also thinking that considering it's starting to get more complex, what would you recommend for testing?

@@ -29,10 +33,59 @@ export async function getAllItems(postTypes: string[]): Promise<Items> {
});

let result: Items = [];
const archiveParams = await getArchiveStaticParams({ postTypes });
Copy link
Owner

@CalebBarnes CalebBarnes Feb 22, 2024

Choose a reason for hiding this comment

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

looks like you added this to getAllItems, getAllItems just gets all single items from specified post types so this would be the wrong place to add this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generateSitemap - taxonomy & archive pagination enhancement
2 participants