Skip to content

Commit 10c6b42

Browse files
authored
Merge branch 'website' into patch-1
2 parents 858307d + fda822d commit 10c6b42

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
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=../day01"/>
4+
</head>

docs/2024/puzzles/day01.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ https://adventofcode.com/2024/day/1
88

99
## Solutions from the community
1010

11+
- [Solution](https://github.com/rmarbeck/advent2024/tree/main/day1) by [Raphaël Marbeck](https://github.com/rmarbeck)
12+
- [Solution](https://github.com/Philippus/adventofcode/blob/main/src/main/scala/adventofcode2024/Day01.scala) by [Philippus Baalman](https://github.com/philippus)
13+
- [Solution](https://scastie.scala-lang.org/Sporarum/jVlQBCvoQXCtlK4ryIn42Q/4) by [Quentin Bernet](https://github.com/Sporarum)
14+
- [Solution](https://github.com/jnclt/adventofcode2024/blob/main/day01/historian-hysteria.sc) by [jnclt](https://github.com/jnclt)
15+
1116
Share your solution to the Scala community by editing this page.
1217
You can even write the whole article! [See here for the expected format](https://github.com/scalacenter/scala-advent-of-code/discussions/424)
13-
14-
- [Solution](https://scastie.scala-lang.org/Sporarum/jVlQBCvoQXCtlK4ryIn42Q/4) by [Quentin Bernet](https://github.com/Sporarum)

docs/2024/puzzles/day02.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Solver from "../../../../../website/src/components/Solver.js"
2+
3+
# Day 2: Red-Nosed Reports
4+
5+
## Puzzle description
6+
7+
https://adventofcode.com/2024/day/2
8+
9+
## Solutions from the community
10+
11+
Share your solution to the Scala community by editing this page.
12+
You can even write the whole article! [See here for the expected format](https://github.com/scalacenter/scala-advent-of-code/discussions/424)

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)