4 ms·
Fascinating. For those who click to read the comments before the actual article, this is Mr. Preston-Werner's introduction of Jekyll, the Ruby static site gener
by Eiriksmal 7y ago
Fascinating. For those who click to read the comments before the actual article, this is Mr. Preston-Werner's introduction of Jekyll, the Ruby static site generator, to the world. He lays out his reasons for creating the tech:
>>>First, all my writing would be stored in a Git repository. This would ensure that I could try out different ideas and explore a variety of posts all from the comfort of my preferred editor and the command line. I’d be able to publish a post via a simple deploy script or post-commit hook. Complexity would be kept to an absolute minimum, so a static site would be preferable to a dynamic site that required ongoing maintenance. My blog would need to be easily customizable; coming from a graphic design background means I’ll always be tweaking the site’s appearance and layout.
Which are the exact same wishes I had with my own blog, and I assume many other "hacker" types have for theirs, as well. I don't remember why I settled on Pelican (Python) over Jekyll (Ruby), but either tool is a fantastic choice for blogs... and I now understand that's because Jekyll was literally created to support those goals!
- h2odragon 7y agoI have been playing with both over the past two days and am using Pelican because I couldn't get a functioning enough ruby install put together for Jekyll. Either tool looks about equivalent in actual usage... Which is an incredible improvement on the state of the world 12 years ago when i last cared at all about generating web content.
- xtagon 7y agoAnd there are many more options now, in various languages. StaticGen.com has a pretty big list.
- greggman2 7y agoI switched to a static site gen and a git repo. I lost the ability to preview. Sure, if I'm at home I can run the build script, launch a simple server, navigate to the page on localhost but it's a long way from say wordpress (previous solution) where it was a much nicer experience to preview. Adding images into a post was also nicer. Just drag and drop instead of copy into folder, check into git, manaully type urls like it is now. I use a private repo on github so at least I can add something without having to be at my computer but still no preview or nice UI. Any static generators have well designed solutions for this?
- chmaynard 7y ago> I lost the ability to preview. Not really. You can keep the local server running and a browser window open. The server can be configured to regenerate the site as changes are made. Simply refresh the page to see your changes.
- greggman2 7y agoI have many machines I work from. So no that won't work as easy as a non-static site. Wordpress I can edit and post from my phone. Can't run the static site generator on my phone
- Eiriksmal 7y agoA markdown-based blog lets you preview, if you're typing into an editor that supports previewing markdown. I do my long-form writing in LibreOffice Writer (because Fedora), then the "blogging"/translating bit in PyCharm in a markdown file. PyCharm has a rich markdown previewer, so I can write short posts in it, without the translation step. I'm not personally aware of a static site generator that supports drag-and-drop images, but nothing stops such an extension/plugin from existing. When I want to embed an image on my site, it goes into an /images/[year]/ folder and is referenced in the markdown file with the manually-typed partial URL, as you mentioned.
- greggman2 7y agoMy blog uses many custom features not found in plain markdown so a simple markdown preview found in some editors isn't helpful for verifying the post will work correctly.
- tylery 7y agoIf you use Netlify to deploy your static site, they have a nice Preview feature you can use.