3 ms·
Hi HN, This is an open source project I've worked on over weekends for a long time. The goal is to create a tool well suited for websites you expect to be arou
by naansequitur 5y ago
Hi HN,
This is an open source project I've worked on over weekends for a long time. The goal is to create a tool well suited for websites you expect to be around for 5 or 10+ years.
Would love any thoughts you have on it.
The reason why I decided to build this is all other (JS-based) static site generators I tried had one or of these problems:
- Built on an underlying framework like React, Vue, etc.
- Relies on complex build tools like Webpack, Babel, etc.
- Depends on a massive tree of modules that force constant maintenance
- Has interfaces, source code and documentation that cannot be understood in one sitting
- Requires that your site source be organized in a way that looks nothing like your output
- Forces a huge leap from hello world to a real world implementation
Thanks,
naansequitur
EDIT - List formatting
- cwdegidio 5y agoReally like what you are going for here. I've actually been working on a similar system of a minimalist static site generator off and on for about a year. Looking forward to having a more in depth look at your approach.. and congrats for putting it out there, I've been letting my imposter syndrome keep me from publicly showing my system off. I really dig your templating system, I ended up going with Handlebars but I always planned on removing it at some point. Are you using grey matter for parsing the markdown metadata or did you create your own parser?
- naansequitur 5y agoHey thanks! Can definitely empathize with the imposter syndrome, it's a tough hurdle to clear. For the templating system I decided to also add an option to define your own if you don't like the [] syntax (https://prpl.dev/api#options https://prpl.dev/api#options). Figured since the system is regex-based instead of AST-based there's no reason not to expose it as an option to users. For the metadata I implemented a basic parser. Here's a link to that part of the source code, it's not the most efficient nor does it cover all the edge cases, but it's simple enough it can be easily updated (https://github.com/tyhopp/prpl/blob/master/packages/core/src/interpolate/parse-prpl-metadata.ts https://github.com/tyhopp/prpl/blob/master/packages/core/src...). Good luck and hope I can see your system on HN someday too