Need suggestion for static site gen

Hi guys,
so for a few years now I've been running a site of sorts, just some small stuff with WordPress. I have become increasingly sick of WordPress, how big it is, etc. So I need a suggestion for static site generator...here are my requirements:
  1. Markdown; i.e I should just be able to write a "blog-post-1.mkd" and copy it somewhere, run some command and have said post added neatly to my posts. (Same with pages).
  2. The top/nav menu MUST be able to have submenus.
    • e.g. All blogs are under one menu entry, and a drop down submenu from "Blog" to show a bunch of categories and sub-categories.
Currently I have tried a few of the popular ones like pelican, cactus and Nikola, none of them have the above two requirements without jumping through a LOT of hoops
  • Note: If getting the proper navigation menu requires me to actually start programming some python and css I might as well roll my own site generator.
 
  • Thanks
Reactions: Oko
All of them support Markdown. Not all of them support subcategories (if I remember correctly, only Pelican does with a plug-in). Your primary problem might be that you'll have to do the front-end work (creating your menu structure) yourself, but that can be done entirely in HTML. However, I'm pretty sure that Pelican already has a theme with submenus...

That said, I've been playing with SSGs for a while now. The most interesting one seems to be Grav, written in PHP and providing a complete web backend (like WordPress); it's rather a flat-file CMS than a real static one though. If you prefer a classic one (requiring you to write your stuff in a real editor), my favorites are Pelican (you can do everything with plug-ins here), Coleslaw (because it's in Lisp), Frog (because its author is very responsive) and Statocles (because it has a very nice feature set out of the box, although the default theme sucks). Note that you might have to use tags instead of subcategories in most of them.
 
  • Thanks
Reactions: Oko
I use Jekyll, which works fairly well.

Automatically generating submenus looks easy enough. For example, I do this to get a list of all posts:

Code:
    {% for post in site.posts %}
        <div class="weblog-brief">
            <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
            <em>Created on {{ post.date | date_to_string }}</em>
            {{ post.excerpt }}
        </div>
    {% endfor %}

Looking at the docs, you also have a "categories" and "tags" properties, so you can use that to generate a submenu. I think it's also trivial to add a new property, either by just adding it to the post, or through a very small Ruby extension.

Note: If getting the proper navigation menu requires me to actually start programming some python and css I might as well roll my own site generator.

Nothing will behave and appear as you would like by only by flicking a single switch. You will require some basic programming for pretty much all non-trivial tasks (such as this). With Jekyll, this is pretty easy. If you're "rolling your own", it will be a lot harder...
 
  • Thanks
Reactions: Oko
The screenshot is the result of the my post in another thread. The only requirements is writing you own theme and tools configurations. In my case, pages are not written directly into the built-in editor for the content of the pages, the pages, instead, are AsciiDoc text files maintained in a directory tree (on another machine and updated using Subversion), they are 'compiled' in HTML files with the same name and .php extension.

If you want to go on with this, write me a PM or what is used here.

fbsd01.jpg
 
  • Thanks
Reactions: Oko
You might like fBlog. Written in Fortran and I can report that it compiles and runs perfectly on FreeBSD 10.1. I've been using it lately and it's about as utilitarian as it gets.
 
Fortran? Sweet. Is there also a blog in COBOL?

Jekyll is well-known but probably not the wisest choice here as it is more like a framework and the OP prefers easy setups.
 
I would start here. In response to your specific requirements:

  1. You'd be hard-pressed to find a static site generator that doesn't support Markdown. What flavor of Markdown they support is pretty much the only markup language difference you'll find.
  2. This relies on your code, not the generator. Making a nested menu with HTML and CSS is pretty basic and easy to do. I don't know of any generator that does this automatically, but then, a good static site generator won't actually generate essential elements for you, as that basically defeats the purpose.
  • Note: If getting the proper navigation menu requires me to actually start programming some python and css I might as well roll my own site generator.

I'll be frank: if you're going to use a static site generator, you will be writing code. What you're hoping for is that someone, somewhere has the exact same needs you do and has already created something with the exact features that you want, that will generate a website comprising exactly the elements you want that function in exactly the manner you want so you won't have to do anything extra. To say that's unlikely is an understatement, and even if such a project exists it's probably not going to be something you can rely on long-term. On top of that, easy fire-and-forget solutions don't typically come in small, efficient packages. WordPress is big precisely because it includes all those things that make using it so easy and convenient. Any site at all can have a nested menu, regardless of how it's made; if you know HTML and CSS, it's fifteen minutes of work. If you don't know HTML and CSS, and have no intention of learning, well, that's why projects like WordPress and Squarespace exist. Really, SSGs are geared toward people who already know how to make websites, and exist to cut out the tedious parts, not create ready-made sites. They allow users to create a template from scratch and feed content into that template so they don't have to repeat all the code and tag every paragraph and header and such as they write. Some come with nice extra features, like categories and tags to manage lists and such, but automatically generated elements that the user didn't code themselves aren't very common.

I guess I'd say start with Octopress and Ruhoh, since they're geared toward out-of-the-box blogging. I don't believe you need to write any CSS or HTML for them, but there's little sense in using a static site generator if you're not going to take advantage of it. I use Hugo, myself. It's insanely fast, makes it easy to manage content and organize a site (the site organization mirrors that of your working directory), and its preview server automatically reloads the web page every time you make a change. The documentation is garbage. though.
 
Jekyll is well-known but probably not the wisest choice here as it is more like a framework and the OP prefers easy setups.

Jekyll is dead easy:

Code:
jekyll new mysite
cd mysite
jekyll build

Congratulations. You now have a site in mysite/_site/ All you need to do now is add Markdown-formatted posts in mysite/_posts and run jekyll build again.

As I explained above, adding the expanding menu will require some minor templating and a few lines of CSS, which will be true for *any* standard software.
 

Here's a more complete list.

I guess I'd say start with Octopress and Ruhoh, since they're geared toward out-of-the-box blogging.

Actually, Ruhoh is more like a site generator than a blog generator. That said, the four generators I mentioned above are also primarily used for blogs.

I don't believe you need to write any CSS or HTML for them, but there's little sense in using a static site generator if you're not going to take advantage of it.

It depends. Just like WordPress, you could be creative, but you could also use one of the gazillions free themes available. Pelican has an overwhelming choice (mostly with screenshots), others like Coleslaw could be improved by you.

I use Hugo, myself. It's insanely fast, makes it easy to manage content and organize a site (the site organization mirrors that of your working directory), and its preview server automatically reloads the web page every time you make a change. The documentation is garbage. though.

Also, there is not a single good-looking theme for it. (YMMV)
 
Looking over the suggestions makes me think of Linux distros. It also reminds me: give me C, nginx and FreeBSD and I'm good to go (ignoring variations of the first two). But I don't do static sites.
 
Wondering if there are any new opinions on this old thread?
Javascript people assembling their list of SSGs: https://jamstack.org/generators/
The simplest, most unix SSG ever: https://www.romanzolotarev.com/ssg.html (ssg5)

ssg5 might be too basic for me; I want something that generates menus and submenus automatically, and works well with bootstrap.

I should try out SSGs from the jamstack list but I am trepidatious because they seem like bloat will sneak in. I hate Javascript and don't want to write it or have it load as part of my site.

Just need to set aside some time for tests to find the one that hits the sweet spot.
 
I thought that having Python as a (the only) requirement was as low impact as you could get, so first I checked out Pelican. After having used for a while, I found out that it broke easily. Next up, I tried out Ivy - quite low key, right? Well, it turns out that author has decided (for some reason) to get on Python's upgrade now bandwagon; Ivy now requires Python 3.8 (and has done so for quite a few versions). Unfortunately, the machine on which I use Ivy is a shared host and Python 3.8 isn't available, which made me jump through quite a few "rounds" before figuring out how to install an old enough version that it would work with Python 3.7.

TL;DR no matter what you choose you will end up fixing it or switching to something else after some time.
 
Actually, TL;DR: Avoid Python-based tools because they’ll break with the next major Python update.

I have found Zola to be a relatively good SSG (like Hugo, but in Rust and with a better template engine) and I am trying to finally replace my aging WordPress with it. But converting the comments is the tricky part yet.

The simplest, most unix SSG ever: https://www.romanzolotarev.com/ssg.html (ssg5)
blogc is also quite good:
 
Just write HTML and CSS. Unless you need to dynamically load and change content all the time, and all you have is a few pages, it solves all issues, loads the fastest, works everywhere without third party anything. And if you want to use JavaScript later you won't have to install anything or make any changes.
 
Just write HTML and CSS. Unless you need to dynamically load and change content all the time, and all you have is a few pages, it solves all issues, loads the fastest, works everywhere without third party anything. And if you want to use JavaScript later you won't have to install anything or make any changes.
Yea that's what I currently do. But it gets error prone to have to go through every page and and make a change whenever I just want to change the header or menu bar, for example. So I'm thinking that if my site gets much bigger I should use a tool to streamline things without adding bloat.
 
Actually, TL;DR: Avoid Python-based tools because they’ll break with the next major Python update.

I have found Zola to be a relatively good SSG (like Hugo, but in Rust and with a better template engine) and I am trying to finally replace my aging WordPress with it. But converting the comments is the tricky part yet.


blogc is also quite good:
Zola looks like its worth a try. I was also going to try Hugo because its Go. Thanks!
 
If you're concerned about your site getting bigger then even SSGs will fall apart at some point. You may hate Javascript but all the good and popular frameworks, the simpler ones, use it as their programming language. Svelte for example which is what I was going to suggest. Others use PHP.

It's all a crap shoot. I would just pick one and go with it until you find you don't like it. Then you'll know what to look for on your next search. But they're all someone else's idea of how things should be done. That's why we never use them.

(Avoid WordPress like the plague!)
 
I utilize the ContentTools, this is a WYSIWYG on site editor written in JS. I set the link to the demo already. Click on the purple pencil and start editing. Normal editing happens completely on the client's side. And therefore, you need a backend which is involved when storing the results and for uploading images, etc.

I use this together with my ContentCGI backend written in C and some Objective-C for all my sites. Others use Python based backends. My backend takes also care for searching the site utilizing the ultrafast local search engine Zettair, which is open source written in C.

My BLog does not have menus, but my company’s site (Cyclaero, a lot of content is still missing) does.

Anyway, here the combination of ContentTools+ContenCGI produces static web pages, which do not need to contain any JavaScript. In the course of editing on site, JavaScript is used of course, otherwise you won’t be able to edit directly your web page and see instantly — there might be a time gap of perhaps a few microseconds — what you did.

aw16, depending on the degree of your aversion against JavaScript, this might be acceptable for you or even not. Again, JavaScript is utilized solely in the course of site editing, and is loaded only into the browser of the website author. Website visitors won’t see a single ';' of JS, other than has been purposefully added by the author (i.e. you). Website authors do not program the editor's JavaScript code, they use it, exactly like you don't program the code of vi(1) while you're editing text with it, you use is. That means no knowledge of JS is necessary in order to use the ContentTools. However, if your index finger suffers burns already, while clicking the mouse pointing on a website's button which is operated by JavaScript, then of course the ContentTools are not for you.
 
The simplest, most unix SSG ever: https://www.romanzolotarev.com/ssg.html (ssg5)
I do actually quite like this. Though I can't quite understand the point of markdown / lowdown in this mix. For example:
Code:
**Header**

Isn't much easier than:

Code:
<h1>Header</h1>

And for the complex things that HTML makes fairly horrible, markdown can't do anyway (or falls back to HTML).

I am not much of a web developer so my advice is probably not ideal but I personally use m4 and the rest of the UNIX stack. You can check out my sites Makefile here:


You can also see I have made some m4 "functions" for awkward things like hyperlinks and inline code:

The key feature that m4 provides is "include" so that you can separate out the site. Up until semi-recently I actually used the clang CPP preprocessor just to do this (with #include) but it was awkward for unbalanced ' quotes "

It looks OK: http://thamessoftware.co.uk/
Possibly a little indie (which is fine for personal projects). Admittedly we are looking to get a rewrite by a proper designer in the coming months with one of our next releases. They will probably drag in 12 different scripting languages and half of the CPAN / PIP. Probably chuck some Rust and crates.io in there for good measure ;)
 
Well, I spent a day converting from hand-made HTML/Bootstrap CSS to Zola. It took 2 or 3 attempts for me to understand the templating language concept, but I have to say one I got it, the transition was way smooth! Zola let me combine HTML and markdown in the markdown files, which is not super clean, I guess, but made it easy to port. Now I met my basic goal, which is to stop having to duplicate header and footer code on every page.
 
I took my static site down but every page was hand typed valid XHTML and CSS.

I used CSS buttons for nav but I do remember making a dropdown menu when we were trying to fix the code on the freebsd.org index page..

All I've ever used was a text editor and Gimp, and that's all I needed. I learned to write XHTML at w3schools.com when it first came out. I never used any scripting on my sites and valid code is an absolute must, or it isn't considered to be XHTML, and every page had a button to check it.
 
  • Thanks
Reactions: a6h
Back
Top