Skip to content

Commit 8fd7897

Browse files
authored
day 0 is not needed (#559)
1 parent c338cb1 commit 8fd7897

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/2024/puzzles/day0.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Day 0
2-
3-
[Advent of Code 2024](https://adventofcode.com/) has not started yet.
4-
See you soon!
1+
<head>
2+
<title>Redirecting...</title>
3+
<meta http-equiv="refresh" content="0; url=../puzzles/day01"/>
4+
</head>

website/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const buildDropdown = (dir) => {
2727
n
2828
})
2929
});
30-
const sorted = days.sort((a, b) => a.n - b.n);
30+
const sorted = days.sort((a, b) => a.n - b.n).filter((day) => day.n > 0);
3131
return sorted
3232
};
3333

website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const buildSidebar = (dir) => {
2626
}
2727
const days = fs.readdirSync(`target/mdoc/${dir}`).map(extractDay);
2828
const sorted = days.sort((a, b) => a.n - b.n);
29-
return sorted.map((day) => day.id);
29+
return sorted.filter((day) => day.n > 0).map((day) => day.id);
3030
};
3131

3232
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */

website/src/components/DocsLinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DocsLinks = (props) => {
1616
const globalData = useGlobalData();
1717
const docs = globalData["docusaurus-plugin-content-docs"].default.versions[0].docs
1818
const days = docs.filter(doc => rx.test(doc.id))
19-
const sorted = days.sort((a, b) => dayN(rx, a) - dayN(rx, b));
19+
const sorted = days.sort((a, b) => dayN(rx, a) - dayN(rx, b)).filter(day => dayN(rx, day) > 0);
2020
return sorted
2121
.map((day, i) => {
2222
return (

0 commit comments

Comments
 (0)