The World's Simplest "Static Site Generator"

David Wickes on October 19, 2018

What's the fastest way to start a blog? Wordpress? Jekyll? Any one of the hundreds of static site generators out there? Nah, it's pandoc and now.... [Read Full]
markdown guide
 

Pandoc really is an amazing gift to the open source publishing community.

It does so much.

For instance the book I'm working on is also written in markdown and it's so simple to create a epub files github.com/quii/learn-go-with-test... and pretend you're a real author.

 

Excellent post! Here's the oneliner bash loop ;)

for POST in *.md; do pandoc --to=html5 --output=$(basename ${POST%.md}).html --standalone $POST; done

The $(basename ${POST%.md}).html strips out the .md file extension, and also removes the directory path (helpful if your posts are stored in a folder). I found this stackoverflow question a helpful guide.

I'd also recommend eleventy as a no nonsense static site generator.

 

Not seen the basename trick before - very, very nice.

 

Thanks for the great post. Pandoc is pretty fun and simple.

A few edits :

pandoc --output=index.html --to=html5 --standalone index.md

instead of

pandoc --output=index.html --to=html5 --standalone index-world.md
# My Quick Blog

- [Hello World](hello-world.html)
- [My second post](my-second-post.html)

instead of

# My Quick Blog

- [Hello World][hello-world.html]
- [My second post][my-second-post.html]
 

Publish in haste - regret at leisure!

I'll make the changes - thanks!

 

I love this! I've never used pandoc, gonna check it out now!

IGNORE THE WARNINGS, we don't have time to explain! Ship it now! Now! NOW!

I cracked up 😂

Thanks David!

 
 
 
 

Its made specifically for hosting static sites, but it can have forms 😮. I hear it also makes working with AWS lamda functions a bit easier, although I haven't tried that yet.
You can use Github, Gitlab or Bitbucket and it will update the site with every merge.
I've personally only used it for single-page HTML websites, but I hear it integrates nicely with static site generators.
And it has a generous free tier :)

 

So, build your own hugo out of seemingly conveniently shaped pieces?

 
code of conduct - report abuse