We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbd0322 commit c013608Copy full SHA for c013608
layouts/BlogCategoryLayout.tsx
@@ -20,9 +20,10 @@ const getCurrentCategory = (pathname: string) => {
20
21
// if either the pathname does not match to a blog page
22
// which should not happen (as this hook should only be used in blog pages)
23
- // or if there is no category in the URL we return the current year as category name
+ // or if there is no category in the URL we return the previous year as category name
24
// which is always the default category (for example, the blog index)
25
- return `year-${new Date().getFullYear()}`;
+ // see https://github.com/nodejs/nodejs.org/issues/6205 for a permanent solution
26
+ return `year-${new Date().getFullYear() - 1}`;
27
};
28
29
// This is a React Async Server Component
0 commit comments