-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/koalanis/advent-pages into …
…main
- Loading branch information
Showing
1 changed file
with
53 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,59 @@ | ||
# advent-pages | ||
🎅 an advent-of-code project site generator🎄 | ||
![image](https://github.com/koalanis/advent-pages/assets/5452212/ad93262e-5a17-4689-a5f6-0ffba0f2bb32) | ||
# 🎅 advent-pages 🎄 | ||
### an advent-of-code project site generator | ||
<img width="834" alt="image" src="https://github.com/koalanis/advent-pages/assets/5452212/57f9aa2b-a1e7-417b-a69a-4b070d2742a4"> | ||
|
||
## how to use | ||
todo | ||
|
||
## configuration | ||
the site's metadata is configured in a `advent.config.json` file. | ||
|
||
## under construction | ||
![d](https://http.cat/503) | ||
## Get started | ||
### Installing | ||
Install the package and run the `generate` command to create the site folder. | ||
```sh | ||
npm install --save @koalanis/advent-pages | ||
npx @koalanis/advent-pages generate | ||
``` | ||
|
||
### Configuration | ||
The static site's metadata is configured in a `advent.config.json` file. | ||
```json | ||
{ | ||
"lang": "rust", | ||
"year": 2021, | ||
"days": { | ||
"1": { | ||
"partOneDone": true, | ||
"testDataOne": "./test_data.txt", | ||
"codeOne": "./src/day1/partone.rs", | ||
"answerOne": "./answer.txt", | ||
|
||
"partTwoDone": true, | ||
"testDataTwo": "./test_data_2.txt", | ||
"codeTwo": "./src/day1/parttwo.rs", | ||
"answerTwo": "./answer_2.txt", | ||
}, | ||
... | ||
"25": {...} | ||
} | ||
} | ||
``` | ||
The fields `days[n].partOneDone` and `days[n].partOneTwo` are booleans that signify if a problem has been compelted, which in turn effects how the completion stars are rendered on the static site. | ||
|
||
The other fields in `days[n]`, such as `testDataOne`, `codeOne`, etc, are relative paths that are used to inject source text blobs into the static site for display. You can use this to display your advent data & answers, and most importantly, your code solutions. | ||
|
||
### Github workflow | ||
You can configure this static site generator to work in combination of a github action to add publishing of the static onto your advent of code github repositories. For a template of doing this, take a look at my [starter](https://github.com/koalanis/advent-template). | ||
#### Example | ||
Python Advent of Code 2015 [link](https://koalanis.github.io/advent-python-2015/) | ||
|
||
## details | ||
- built using [tsup](https://tsup.egoist.dev/) | ||
- default styling using [NES.css](https://nostalgic-css.github.io/NES.css/) | ||
|
||
## roadmap | ||
- [ ] publish npm package | ||
- [x] publish npm package | ||
- [ ] add custom theming support | ||
|
||
|
||
## lastly | ||
the static site is styled in [NES.css](https://github.com/nostalgic-css/NES.css)https://github.com/nostalgic-css/NES.css | ||
🙏 thanks to the nostalgic-css team | ||
|
||
## styling | ||
static site is styled in [NES.css](https://github.com/nostalgic-css/NES.css)https://github.com/nostalgic-css/NES.css |