Resources for Building My Own Site Generator
There’s no good reason I should build my own site generator, instead of just using Jekyll (as I am at the time of writing this post.)
No good reason, other than I want to, other than I miss software development and, more specifically, have never really done a big software development project for my own sake, as opposed to for school or a boss.
And I don’t know that I’ll break ground on it anytime soon, but meanwhile let me keep a list of resources I will probably use:
Development
Planning on using F#, because I’m a .NET developer and it’s always appealed to me. Capturing a few links for getting an F# dev environment up and running on my Mac using Visual Studio Code:
- Get Started with F# in Visual Studio Code - Microsoft Docs - This is from 2018 and is probably a little out of date, but it’s a starting point
- How to set up F# development in visual studio code - General - F# Software Foundation Community Forums - This looks a little more up-to-date, and links to some other resources that could be useful.
Admittedly, having never written an entire application in F#, one thing I’ve been wondering is how you effectively structure a complex F# program with multiple modules. Some things to read:
- Organizing modules in a project - F# for fun and profit - This website (and the ebook created from it) is my main resource for learning F# in the first place, so this is an obvious place to start.
- f# - How do you design a functional program? - Stack Overflow - This StackOverflow thread looks like it contains some useful ideas (or links to same).
- Building Real-World Applications in F# - Real World F# - Medium This is on Medium, alas, but ought to be useful (and the name of the blog suggests it will have further useful articles, too).
Templating
- {{ mustache }} - logicless templates. Having looked at mostly this and Liquid, I think I prefer the ‘stache
- GitHub - StubbleOrg/Stubble: Trimmed down templates in .NET - A .NET library for parsing the above. I might use this as a basis for writing my own parser, if I feel sufficiently crazy.
Metadata
- YAML Ain’t Markup Language (YAML™) Version 1.2 - This is the metadata format that Jekyll and apparently several other state-site generators use as the front matter for their posts. I’m a fan of it because
- It’s plain text, so hypothetically easy to parse in future
- It’s designed to be human-readable, like Markdown, so you can have text files that both make sense if you just look at them, but can be reliably and processed into something else via software
- It’s a superset of JSON, the other simple and ubiquitious textual metadata format, which could come in handy
So I plan to use YAML as the frontmatter for my generator (this also lets me easily-if-not-trivially migrate my existing content from Jekyll when the time comes).
- GitHub - aaubry/YamlDotNet: YamlDotNet is a .NET library for YAML - I’ll need some way to parse YAML, so I’m going to… write my own parser. That’s the plan, anyway. Like this entire project, there’s no good reason to write your own parser when solid ones already exist, except as an exercise in learning how to write a parser. So that’s exactly what I’m doing. I intend to write it in F#, building on Understanding parser combinators - F# for fun and profit. I’m linking to this existing .NET YAML parser, because I’ll probably want to use its code as a reference.