3 ms·
Some 15 years ago or so I made a PHP script that took a Word document, saved in XML format, and turned into a static HTML page as part of my blog. It would rely
by magicalhippo 6y ago
Some 15 years ago or so I made a PHP script that took a Word document, saved in XML format, and turned into a static HTML page as part of my blog. It would rely on the paragraph style, turning "Header 1" into <h1> etc, as well as extract images and such.
Lately I've been seriously thinking of reimplementing that, as I just can't seem to find a decent static site generator. They all seem to require a bunch of plugins and configuration just to do the bare minimum a blog requires.
I just want to write, add some code or images, have it look somewhat decent and publish it without worrying about getting hacked due to some WordPress security issue.
- kemayo 6y agoDepending on what you think of as "the bare minimum", I'd think Jekyll or Hugo would work. E.g. the Hugo quick start guide is pretty much just "install Hugo, pick a theme, add your content" and gets you a barebones sequence-of-posts blog: https://gohugo.io/getting-started/quick-start/ https://gohugo.io/getting-started/quick-start/
- magicalhippo 6y agoThe issue with the quick start is that it's a bit too bare bones by the look of it, and the documentation for anything more complicated gets very confusing by someone new to it. I'll give it a whirl tho, thanks!
- tristor 6y ago> I just can't seem to find a decent static site generator. Maybe you and I have very different ideas of what is required to write a blog, but it sounds like you should be able to use Hugo + the theme of your choice and just go with it. It's /very/ easy, and posts are all written in Markdown.
- magicalhippo 6y agoThanks for the input. For me a bare-bones blog needs to support simple-to-use images, that is auto-resizing images with link to full etc without a ton of hoopla, syntax highlighter for code and some tex-ish thing for math. From what I can see Hugo does seem to have a lot of that these days, so I'll try that. One immediate issue is the highlighter not supporting my language at work (Delphi/Pascal) but I assume it being Pygments-compatible means I should be able to add that without much fuss.
- Lammy 6y agoThe images are going to be the hard part. Nothing out there suited my needs/wants in that regard, so I've been working on my own Jekyll plugin that is still nowhere near production ready https://github.com/okeeblow/DistorteD https://github.com/okeeblow/DistorteD
- tristor 6y agoThose features in Hugo are mostly reliant on themes. Hugo has a concept called "shortcodes" which allow you to add capabilities that rely on adding additional JS, or HTML blocks in at specific points in your Markdown. The theme I use on my website for instance has a shortcode called "fluid_imgs" which handles images pretty well, and I also wrote my own shortcode addition to support embedding images from Flickr more easily. Additionally the theme I'm using integrates MathJax and HighlightJS, which it utilizes in the standard way for Markdown (e.g. in most Markdown implementations you can specify the language after triple backticks to start a code block) by invoking highlighting on code blocks. Getting what you're asking for should be pretty simple in Hugo with the appropriate theme or minimal effort anyway.
- pwdisswordfish0 6y ago> Lately I've been seriously thinking of reimplementing that, as I just can't seem to find a decent static site generator. If that's the case, go with that instead of trying to assimilate into workflows around existing static site generators. The world benefits from diversity, even diversity in software. Consider pouring your effort into making OpenLiveWriter work the way you want, if it doesn't already.