7 ms·
What's the best static site generator that meets the following requirements: a) Doesn't use node.js. b) Has built-in syntax highlighting for C#, SQL, PowerShe
by jiggawatts 6y ago
What's the best static site generator that meets the following requirements:
a) Doesn't use node.js.
b) Has built-in syntax highlighting for C#, SQL, PowerShell and Rust at a minimum.
c) Is also good at "photo journals" or galleries.
I played around with Hugo, but the themes were ugly and it was very weak at managing pictures associated with an entry instead of the entire site.
- pyr0hu 6y agoCheck out Jigsaw, it's a PHP based static site generator
- willvarfar 6y agoI have set non-technical people up using Markdown+pelican. I have no idea what made us use Pelican instead of something else, nor if those advantages still hold weight, but it’s been great.
- frenchyatwork 6y agoFor what it's worth, I prefer Pelican, largely because I can write a plugin if I need, without incurring significant brain damage. I've written code in PHP, Ruby, and JavaScript before, it's just not my first choice.
- dgellow 6y agoNot a static site generator (if that's what you mean), but I personally went with Grav: https://getgrav.org/ https://getgrav.org/. It's a small CMS written in modern PHP where the content is defined and managed via markdown files (so no need for a database). You have a bunch of themes and plugins directly installable through the admin interface and the documentation is good.
- deleted 6y ago[deleted]
- axegon_ 6y agoSome time ago I asked myself the same question. Ideally I wanted not so much a generator but rather something that is completely self-contained. Essentially add a markdown or html file, commit and move on. Surprisingly enough I couldn't find anything that does that so I ended up building one myself. Doesn't support syntax highlighting at the moment but I've considered looking into it. Perhaps I should open source it and see if someone wants to give a hand, who knows...
- deleted 6y ago[deleted]
- d13 6y agohttps://github.com/kittykatattack/thepoetrybook https://github.com/kittykatattack/thepoetrybook Did something like that years and years ago as a learning project. Works great! Drop in some markdown and you’re done. The source is only a few hundred lines; no build or package manager.
- cxr 6y ago> Ideally I wanted not so much a generator but rather something that is completely self-contained. Essentially add a markdown or html file, commit and move on. Could you explain what you mean here?
- axegon_ 6y agoAs I said, make it fully self-contained without relying on "builds" or any other mumbo-jumbo, the way you would with sphinx or hugo or whatever. Essentially add a new html or markdown file, put whatever you want in it, let's call it "something.md". Then add a link from your index page to "#/something.md" and not deal with builds or styling or whatever, simply commit and move on and have it take care of all the html. And in the case of markdown, parse it and render it as html on the client.
- retor 6y agoI searched for something similar. Considered Caddy and Nginx/Apache with markdown plugins, but wanted to be able to create and edit pages/files and made a small script with Flask instead.
- jojobas 6y agoTry Jekyll. In addition to the above it generates static pages rather than looking into the database and templates all the time.
- joseluisq 6y agoYeah, or other options like https://gohugo.io/ https://gohugo.io/. I prefer that tool for static web content like a blog.
- jacobkania 6y agoYou might check out mine!! Been waiting ages to share this. You create a folder of markdown files, you have 2 template HTML files (index and blog post), and you run my program (MMSSG). It compiles the index page with a list of all the posts, then renders the HTML for each markdown file into a separate blog post. That's it. Handles the linking and everything for you. It’s all open source and the templates are already made, modify to your heart’s content. It's also REALLY simple, so should be easy to understand my code. It’s what I used to generate my blog, and there’s instructions in the readme to get going quickly :) It's super simple and I really love it. This is my post about it, and the github link: https://jacobkania.com/2020-01-18-the-great-blog-project/ https://jacobkania.com/2020-01-18-the-great-blog-project/ https://github.com/jacobkania/mmssg https://github.com/jacobkania/mmssg -- Edit: Just reverted a couple of commits from a WIP plugins feature that I got bored of and quit, and created new versions of the binaries (Linux and Windows are untested). Also updated this comment with a better description. I'm going to bed, feel free to respond with any feedback! Thanks for looking :)
- Brajeshwar 6y agoWow! I just did this few months back. I started collecting my writings, all in Markdown and some HTML. Just a bunch of folders as topics, and then write markdown files inside them. Then, a week or so ago, I threw in Jekyll and now they are published as the cheapest form of Digital Garden for me and hopefully, my family - https://oinam.fyi https://oinam.fyi The crappy code is at https://github.com/oinam/oinam.fyi https://github.com/oinam/oinam.fyi and is not even worth being a template.
- hamandcheese 6y agoa) seems like a very arbitrary restriction
- saagarjha 6y agoSome people just don’t like that ecosystem, and that’s OK I guess.
- AdmiralGinge 6y agoI'm one of them, the most frustrating thing with working with modern JavaScript is definitely the ecosystem rather than the language. React Native is particularly an issue, the recommended react-native-community geolocation library just flat-out fails on many Android vendor's phones, and the replacement someone made for it still isn't exactly reliable (although to be fair, it only broke on OnePlus devices which were later patched so it could well have been an phone-level issue). I get it, I shouldn't complain about the quality of open-source and freely offered software and the onus is on me to audit the libraries I put in my code, but blimey some people take an awful lot of liberty with the truth when they claim something is "production ready". I reckon a lot of people just build some rushed, poorly-written JavaScript libraries so they can pad out their CVs as an "open-source contributor" but the only thing they're actually contributing is a massive headache for muppets like me who foolishly use said code in their own projects.
- imtringued 6y agoFrom my point of view it is a very informed decision.
- phone8675309 6y agoIt doesn't seem like an arbitrary restriction to me though. The node.js ecosystem is a complete disaster if you're not tuned in to it, and if I want a fire and forget blog generated from static files then that's the complete opposite of node.js where you have to unfuck the imbred dependencies that form in the bloated, always changing ecosystem when someone decides to go CADT with their components.
- avian 6y ago> Is also good at "photo journals" or galleries. I have also been looking for something like this for a while and I can't find it. All the static HTML gallery generators seem to be focused on dumping all images into them at single time. They don't have RSS feeds, or a convenient option to add entries one at a time as you go along like you would in a blog. On the other hand, blog generators generally aren't optimized for mostly displaying images (e.g. automatic resizing, thumbnail view, etc.)
- Lammy 6y agoI’m a big fan of Jekyll, and it meets your A and B requirements out of the box. Hugo lit a fire under them with regard to build speed, and the 4.x line is a huge speed boost. It does syntax highlighting with Rouge, and the default Markdown engine is Kramdown. I never found a solution for requirement C that I liked, so I’ve been building my own. It’s still very rough and not exactly in shape to publish, but its capabilities already by far exceed my previous solution: https://github.com/okeeblow/DistorteD https://github.com/okeeblow/DistorteD I left my WIP site running (‘jekyll serve’ using WEBrick) on my laptop and I’m going to bed, so these links may get hugged or just crash and become unavailable, but here you can get an idea of what I’ve been playing with for multi-image layouts: https://beta.cooltrainer.org/distorted/ https://beta.cooltrainer.org/distorted/ And on the index page is a random smattering of some other media types I’ve been testing, like support for image-rendering SVGs, TTFs, and old DOS-codepage Nfos, mbedding PDFs, etc: https://beta.cooltrainer.org/ https://beta.cooltrainer.org/ Anyway, big Jekyll fan. Try it out :)
- kibwen 6y agoSince you mentioned Rust and since this is turning into a "suggest a static site generator" thread, I'll mention Zola: https://github.com/getzola/zola https://github.com/getzola/zola , although I can't say how well it works for photo galleries.
- notmyfriend 6y agoI recommend https://gohugo.io https://gohugo.io the speed of rendering makes it possible to write your posts with a close to realtime rendering response. It also has a big community and lots of themes available.
- api 6y agoCobalt, Jekyll, Hugo
- dkersten 6y agoI use Jekyll. It’s simple, easy to use and well supported. Also has lots of free and paid themes available.
- dspillett 6y agoAny particular reason for "Doesn't use node.js", given that a static site generator isn't going to use the runtime once the site is (re)generated so you don't have any efficiency or stability concerns from your reader's PoV? (I'm considering node for a personal project or two, though as much as possible avoiding the mess that NPM seems to be as the projects are small enough I can manage the few dependencies manually, so insight into pitfalls I'm not aware of could be useful)
- dredmorbius 6y agohttps://news.ycombinator.com/item?id=23915700 https://news.ycombinator.com/item?id=23915700
- solarkraft 6y agoI personally like Hugo, but there are lots of static site generators. https://staticgen.com https://staticgen.com has a good overview over the most popular ones.
- amelius 6y ago> What's the best static site generator that meets the following requirements: a) Doesn't use node.js. So even if a node.js solution would be the best solution, you would still not want to use it? Why? Anyway, I'd recommend to write a static site generator yourself. It isn't very difficult, you get exactly what you need, and you never get stuck because someone abandoned their project or doesn't want to fix the bugs you reported.
- randomdude402 6y agoNot OP, but asking for a static site generator implies simplicity. Node is pretty famous for generally having large dependency trees and churn with tooling. It doesn't seem that strange to want to avoid it for such a project.
- lawik 6y agoNot the author. But my main concern would be maintainability issues from package churn. But also that I don't enjoy working with JS and its tooling. It is so common a choice now so it might be worth calling out explicitly.
- sails 6y agoRegarding (c), have a look at this jekyll theme [1] for photo galleries. Jekyll is really nice to use, but the photo galleries are pretty few and far between. Disclaimer, I couldn't get this to deploy using Github pages (which is nice) because it uses unsupported plugins. I have it split across two branches and works nicely enough. Certainly the most responsive gallery I've found. Edit: removed direct link to the person's pictures :) [1] https://github.com/dansku/photoGallery https://github.com/dansku/photoGallery
- randomdude402 6y agoI've been thinking about putting something out there as well. I'll probably end up using Pelican since I'm a Python fan. As a side note, I can't believe how many people are salty that you don't want to use node. It would be funny if it weren't so sad.
- cdrc 6y agoFor the photo journal, I can recommend you this Jekyll theme https://github.com/maxvoltar/photo-stream https://github.com/maxvoltar/photo-stream
- aabbcc1241 6y agoWho do you want to avoid node.js? It's dependencies are too big? It cannot be hosted by cheap webhost? It's not secure ?
- ex_amazon_sde 6y agoAll of those.
- marcosdumay 6y agoI have had a great experience with statik. It's in Python (pip install...), it uses a very complete and flexible Markdown library (never found a language that it didn't support, but syntax highlighting is in a plugin), and is a site generator, not a blog generator. But it takes some up-front programming to define your site structure.