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

404 only for archive page? #215

Open
CookieHCl opened this issue Apr 1, 2023 · 1 comment
Open

404 only for archive page? #215

CookieHCl opened this issue Apr 1, 2023 · 1 comment

Comments

@CookieHCl
Copy link

Hi, I recently started using Hexo and Next with GitHub Pages!

Hexo has a cool archive feature where if you go to myblog.com/archives/2023, you can see all the posts you wrote in 2023!
However, if there are no posts wrote in 2022, myblog.com/archives/2022 will show a 404 page.

I made the 404 page to be "page not found", but I think it's misleading to have a "page not found" when you're searching for posts written in specific date.

Is it possible to create a special 404 page only for archives that shows "no posts" instead of a generic 404 page "page not found"?

@tomap
Copy link
Contributor

tomap commented Apr 12, 2023

It might be possible if you specified to this plugin to use a fixed time range instead of determining it based upon the posts dates. This is something to code of course

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

No branches or pull requests

2 participants