diff --git a/README.md b/README.md index 95813b0..3d648aa 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,54 @@ # 🎅 advent-pages 🎄 -image ### an advent-of-code project site generator +image + -## how to use -todo +## 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 site's metadata is configured in a `advent.config.json` file. +## 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", -## under construction -![d](https://http.cat/503) + "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. + +## 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