Skip to content

Commit 77c1ec9

Browse files
authored
Merge branch 'website' into patch-17
2 parents df1f996 + af27a5b commit 77c1ec9

File tree

6 files changed

+24
-10
lines changed

6 files changed

+24
-10
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ def part2(input: String): Long =
6565
end part2
6666
```
6767

68-
6968
## Solutions from the community
7069

71-
- [Solution](https://github.com/spamegg1/aoc/blob/master/2024/01/01.worksheet.sc#L122) by [Spamegg](https://github.com/spamegg1/)
72-
70+
- [Solution](https://github.com/rmarbeck/advent2024/tree/main/day1) by [Raphaël Marbeck](https://github.com/rmarbeck)
71+
- [Solution](https://github.com/Philippus/adventofcode/blob/main/src/main/scala/adventofcode2024/Day01.scala) by [Philippus Baalman](https://github.com/philippus)
72+
- [Solution](https://scastie.scala-lang.org/Sporarum/jVlQBCvoQXCtlK4ryIn42Q/4) by [Quentin Bernet](https://github.com/Sporarum)
73+
- [Solution](https://github.com/jnclt/adventofcode2024/blob/main/day01/historian-hysteria.sc) by [jnclt](https://github.com/jnclt)
74+
7375
Share your solution to the Scala community by editing this page.
7476
You can even write the whole article! [See here for the expected format](https://github.com/scalacenter/scala-advent-of-code/discussions/424)

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)