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

Issue 2078: 404 for archive post bad slug #2083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

selaromdotnet
Copy link

@selaromdotnet selaromdotnet commented Jun 27, 2024

This is my attempt to set 404 status if an archive has segments (slug) that don't match to a valid path, as described in issue #2078

This does handle bad slugs and pages (such as /archive/page/notanumber and /archive/tag/non-existant-slug but doesn't handle empty pages tags or categories (/archive/tag or /archive/page) as I'm not sure what the best behavior is in that case.

I also didn't add any tests for this, as I haven't explored that area of the solution yet; if that's a requirement to accept the pr I will definitely spend some time reviewing that and see if I can add this as well.

I'd appreciate any feedback on this change, as this is my first attempt at contributing to an OSS project, thanks!

@selaromdotnet
Copy link
Author

@dotnet-policy-service agree

@selaromdotnet
Copy link
Author

I hope I did that right it said to reply so that's what I did

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.

1 participant