4 ms·
My recommendation for people using anything like Jekyll: just bite the bullet and write a custom build script. A 200 line script that takes can handle Jinja tem
by rtpg 4y ago
My recommendation for people using anything like Jekyll: just bite the bullet and write a custom build script. A 200 line script that takes can handle Jinja templates or markdown or something will mean you actually understand all that is happening and aren't trying to fight the system or just figure out how to do anything.
And of course don't write a plugin system or something you would share with others! Just write the thing that you need, and change it as you need to!
Static site generators are great for people less comfortable doing this, but having to deal with all the _stuff_ is a major waste of time for what it's offering for people who don't need it.
- hombre_fatal 4y agoI have the opposite advice: optimize for writing, minimize janitorial stuff like tweaking your own tooling. It just distracts you from writing and offers only masturbatory value. The best path depends on your personality, but building my own blog tooling killed my writing. I'd start writing something only to realize I needed to tweak something. Then I wouldn't even write the post or I wouldn't have the energy to fix the tooling and I'd do neither. And then I stopped writing. I didn't start writing again until I used Wordpress which let me focus on writing, though after proving myself for a year, I switched to Jekyll + Github Pages so that everything was on Github.
- csande17 4y ago100% agreed. The things a static site generator does are typically very simple: load some Markdown into memory, run it through some HTML templates, and maybe scale some pictures with ImageMagick if you're feeling especially fancy. Writing a script to do those things is way easier than trying to learn and wrangle a Static Site Generator(tm). The one time static stie generators are helpful is if you really, really like the out-of-the-box look and behavior of some existing theme.
- rtpg 4y agoTo this point: Markdown is a nice format for ingest because you can just paste in HTML. I am a bit more courageous and have some custom directives for my Markdown stuff, but it's all really 20 lines of code. I think it's tempting to add a bunch of "time saving" features for writing, but lots of time just going with the HTML is fine. Maybe if you're writing out a post every couple of days then you can focus on time saves. Until then MD will get you most of the way, and otherwise you can always hack in some special case for your unique post
- chrismorgan 4y agoMarkdown is lousy in significant part because its interactions with HTML are ridiculously complex and moderately difficult to learn, and almost no one tries to actively learn Markdown in a principled fashion, and even fewer try teaching it in a principled fashion, so it ends up unreliable and fairly unpredictable to almost everyone. Things like: if you start a “paragraph” (of which “what comes after a blank line” is a fair approximation) with a block HTML element (e.g. <p>, <div>), inline Markdown syntax won’t work until you start a new “paragraph”. This is related to what I find to be the real killer for just pasting HTML: if you use blank lines followed by lines that are either indented (by at least four spaces or a tab) or don’t start with a block HTML element, then Markdown will mangle your input fiercely. And that’s extremely common (it’s basically recommended formatting for various content). <aside> Markdown syntax is *not* interpreted here, and this is a text node inside an aside. </aside> —⁂— <aside> <p>Markdown syntax is *not* interpreted here, and this is a text node inside a p inside an aside.</p> </aside> —⁂— <aside> Markdown syntax *is* interpreted here, and `aside > p > em` should match. </aside> —⁂— <aside> <p>Markdown syntax is *not* interpreted here, and this is a text node inside a p inside an aside.</p> </aside> —⁂— <aside> <p>This line is a code block (pre) inside an aside.</p> </aside> —⁂— And all that is without taking into account variations in Markdown flavours, and what may happen with unprincipled and inconsistent extension of Markdown. All up, I say if you want sanity that will last, go HTML and avoid Markdown strenuously for anything beyond simple prose.
- rtpg 4y agoI think here you are also somewhat proving the point because you can "go HTML", since the problem is more about markdown not kicking in. I'm mostly kidding but since we are talking about "blogs" (mostly pictures and text) it's OK for there to be a bit of jank. Remember, this is a script for you! You do not have to justify the jank to anyone! Seriously though, I think that what you're describing is a real failing of Markdown. I wanted at one point to use Restructured Text but really you want Sphinx and Sphinx is not meant to be used as a library unfortunately.
- 4y ago