A small website showcasing different solutions for the Advent of Code.
The live page can be found here.
Depending on how versed you are in managing your code with git, you might want to opt for different approaches.
- If you have never worked with git before, then learning git might be a daunting task. If you want to take it easy, choose GitHub to host your code, you can use the web UI upload and edit files. GitLab offers similar ways of managing code as well.
- If you are up for the challenge, you may use this resource as a starting point. There are also many video tutorials and cheatsheets available online.
If you want to showcase your solutions for Advent of Code, please issue a pull
request. This pull request should contain your personal entry in
src/users.js
. An entry looks like this in its simplest form:
{
// the name displayed in the submission board
name: "Ron Swanson",
// indicator for PrismJS which syntax highlighting to use
// see https://prismjs.com/#supported-languages
lang: _ => "clike",
// the name of your programming language display in the submission board
langName: _ => "C",
// the URL used for fetching the raw source file of a given day and part
solutionUrl: (day, part) =>
`https://raw.githubusercontent.com/ronswanson/aoc2024/master/day${day}/${part}.c`,
// the URL used for referring to your solution via "View Source"
solutionWebUrl: (day, part) =>
`https://github.com/ronswanson/aoc2024/blob/master/day${day}/${part}.c`
}
This website uses PrismJS for syntax highlighting. Please make sure that you
choose the correct abbreviation
for your programming language. There are some abstractions for providing all
necessary URLs available. You may want to use the entries of others as an
example. If you intend on using multiple programming languages, you have to
maintain a JSON file that helps us in choosing the correct labels and syntax
highlighting. Here is an example of such a file.
These files are fetched in src/users.js
.
Since the page uses ES6 modules, you'll need a web server to test the page locally. If you have Python installed, you can e.g. run
python3 -m http.server