I need to fix my brain. Every time I see "static sites", I think "oh great, no dynamic server or client code, just static HTML/CSS for fast loading".
If I'm going to have to undergo a "compile step" for my website, it's going to do something worthwhile, darn it.
If nobody else does I guess eventually I'll get fed up and build it myself :\
You can generate a HTML fragment, or an HTML file, or HTML with table of contents, CSS, and footer, etc. http://pandoc.org/demos.html
It has some pretty heavy dependencies, but so far I haven't found anything better for generating a true static site from Markdown. I probably haven't looked hard enough either.
Pandoc is written in Haskell, but when built it's just a regular binary.
I use it a lot, I've collected of quite large collection of long form articles/"opinion pieces"/etc from websites and used pandoc to translate them into epub. (after manually pruning some html)
git clone [email protected]:prettydiff/biddle.git
cd biddle
node biddle (parses the readme.md file to the terminal)
node biddle get http://example.com/document.md
node biddle markdown downloads/document.md
node biddle markdown downloads/document.md 60 (word wrap at 60 character width)Example: https://alexanderteinum.github.io/
Lately I was searching for static site generator that would require no configuration. It is written in single file of straightforward go. It gives you just two sections: posts and pages.
EDIT: Oops, Pandoc was already mentioned. I should have refreshed the site.
At first I agreed with many of the other posters, that this just had more overhead than it needed, so I didn't take it seriously.
But when I saw this comment, I got it.
It's an MVP! You launched it before it was ready, but not before you were ready. Which is exactly what we're supposed to do. Grow a thick skin, share it, and take your lumps. This way, your baby will grow up much faster than it would have it you went it alone.
Many of us here, including myself, are too chicken to do that as early as we should. Thank you for showing the way.
Respect.
I don't think it is because the platform is "heavy" (I assume in productive features) but rather it is what you are probably most recently familiar with.
For example I have built similar CMS tools for internal documentation with Java + Postgres (markdown and mustache.java) in less than a day. The development time was quick because I know Java and SQL... and basic HTML + request response handling.
The fact is it is even easier to pump this stuff out if you don't do Javascript heavy stuff because you can use so many different languages for basic HTTP + HTML + storage. Hell you might even be able to have a RDBMS (like postgres) with a couple plugins itself power the whole thing.
A Minimum Viable Product could be done in a few minutes with pandoc, a popular and standard tool that supports markdown to html conversation out of the box.
Add a few CSS styles and here you go! Awesome looking static pages, with 0 javascript whatsoever, based on proven battle-tested software ;)
apt-get install pandoc
# convert from markdown to html
pandoc -f markdown -t html article.md
Just to be clear. Pandoc is a rather trivial command line tool. It's not comparable to learning a framework or a toolset.I've learned a great deal reading these comments, so thank you for posting your project.
But it should be rendering the site without a loading indicator. There's no reason that should be displayed
I'm not sure I follow on the instant page pushes. Are you talking about a little dialog that pops up and "says a new version of the page" kind of thing?
Second is there features you saw that required Javascript (as it appeared to me most could be done with CSS)?
And no I don't think it is "completely fine" to use JavaScript particularly if you are trying to spread the word as quickly as possible and don't care about looks (ie most devices, loads fast, low power). There are also a growing amount of people that have Javascript disabled in general.
Completely useless for static sites, but nice to have while authoring.
I guess I'm just an old web 1.0 guy but I just don't see and understand why everything must be done in a super dynamic way. Hell sometimes I like clicking on a link and watching the browser do the loading as it is confirmation for me the thing actually got loaded. Particularly when buying/shopping for stuff (ie traditional POST).