[ prog / sol / mona ]

prog


Static website generator for blogs

1 2022-08-08 07:33

For those of you who have a personal blog, what tools do you use to generate the static webpages? There are so many static website generators these days. What are the simplest and most flexible solutions?

One solution is to write HTML directly, perhaps with the aid of some templating tool (m4 macros?). Another solution is to write in Markdown, and generate the HTML using a Markdown to HTML conversion tool (e.g. cmark), Makefiles, and perhaps some shell scripts. Yet another possible solution is to write the contents of the blog as s-expressions, and write a Lisp program to transform the s-expressions into HTML files.

2 2022-08-08 09:13

https://dthompson.us/projects/haunt.html

Beta piece of shit, which lacks numerous features, but in Scheme, glory to Allah!

3 2022-08-08 09:42

>>2
I don't understand why it uses Markdown when it could have used s-expressions instead. Blog posts should be written using an s-expression format like SXML for maximum flexibility.

4 2022-08-08 13:39

>>3 You can use s-expressions, and it's provided by default. Markdown support is an additional feature and you need to install commonmark for it.

My concern is that a stupid murican Dave Thompson thinks there are no languages except for English and has built in functionality to convert in-text titles into slugs. Therefore I can't use this piece of amateur shit for a cyrillic blog, if I don't want shitty cyrillic slugs, which no one uses.

Stupid murican Dave Thompson should have put a bit of thought into his creation and convert filename into slugs, which is moreover essentially easier to achieve in a function.

Yeah, I can rewrite that "slug-bla-bla-bla" function and probably I will need to do so for my autist Scheme blog. But that's not an excuse for stupid muricans.

5 2022-08-08 15:09

Writing HTML directly with an "index" link at the top is the best way. There's some other stuff you can do if you really want, pandoc is pretty great for converting markdown, you can write custom programs, Emacs' org-mode has a built in HTML generator. It's all kind of a pain in the ass though when you can just write HTML and keep it in git.

6 2022-08-08 15:28 *

just write
generators are useless shit

7 2022-08-08 15:57

>>5
The best reply.

I just edit plain HTML with Emacs hotkeys comfy and supply XML sitemap, rss with bash-script lightweight generators, written by myself.

I was thinking of rewriting generators in sxml, but I concluded not to since I have a retarded reason: if I'm fascinated by Scheme this fashion season, it doesn't mean I have to rewrite all my stuff in it.

8 2022-08-08 17:55

What do you all have against Markdown? It's easier to write and gives readable formatted ASCII text files.
>>1

cmark

libupskirt is much better.

9 2022-08-09 00:12

>>8

It's easier to write.

nope

gives readable

nopeĀ²

10 2022-08-09 00:35

>>8
Markdown is difficult to write portably. Markdown is difficult to parse correctly.

11 2022-08-09 12:52

I write HTML and CSS by hand and I use M4 and vim (emacs is fine, too).

12 2022-08-09 13:24

>>8
Why? Isn't cmark faster and more predictable?

13 2022-08-09 14:53

>>11

I use M4

You should publish a blog post to teach people how to use m4 for blog templating.

14 2022-08-09 16:54

I don't have a blog because code should be self-explanatory.

15 2022-08-09 17:19

I write ASCII files by hand and I use Notepad (Notepad++ is fine, too).

16 2022-08-09 22:01

I write it by hand. I've recently written a Lisp program to regenerate the index, but it's pure string concatenation and nothing fancy. This makes it easy to have pages with custom CSS and other things.

17 2022-08-10 08:48

On the topic of lisp- what I actually do not do because I have a phlog but when people want a website, I get them to customise emacs org-mode's html export elisp. It holds baby hands into making their own templates.

18 2022-08-10 12:23

>>13
Actually I'm new to M4. I just read these:

http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf
http://www.cs.stir.ac.uk/~kjt/research/pdf/expl-m4.pdf
https://mbreen.com/m4.html

Currently, I use it like I would use the C Pre-Processor but I'm aware that M4 offers more advanced features.

19 2022-08-14 06:16

Scribble?
https://docs.racket-lang.org/scribble/index.html

20 2022-08-21 10:24

Why aren't static website generators more popular? Why does it have a small economy? The WordPress economy is so much bigger, with a whole ecosystem of open source themes and plugins.

21 2022-08-21 10:42

>>20
Because people use WordPress to make money while static site generators are only used so people can put realname.github.io on their CV.

22 2022-08-21 11:11

>>20
Because they are useless.

23 2022-08-22 00:55

>>20
WordPress is older and more entrenched. When you have knowledge and infrastructure built up around a certain solution, it can be very difficult to switch to an alternative, even if the alternative might be intrinsically better. The cost of switching over disincentivizes switching over. Most static site generators that exist are also oriented towards developers. Not everybody is a developer. A lot of "normies" just want pretty-looking pages. Moreover, "WordPress" is a specific, branded product. "Static site generators" are a general technical methodology. Brands and products are more marketable to normies.

24 2022-08-22 07:08

>>23

Brands and products are more marketable to normies.

Brands and products such as SchemeBBS and textboard.org.
Ben should create SchemeBBS Corporation, so that Scheme will cease to be the laughingstock of the "enterprise software" world.

25 2022-08-22 15:35

How do I become a static website and WordPress tycoon?

26 2022-08-22 19:57

Circumcision

27 2022-08-22 21:29

>>25
It was all about advertisement money, but from what I have read it is no longer profitable. Now YouTube is where all the money is. Maybe you could start a widely successful channel about Scheme programming?

28 2022-08-22 23:24

Circumcision

29 2022-08-23 05:42

>>27
Perhaps there should be an advertising network just for static websites. Just look at the spartan simplicity of typical static websites. All that wasted precious web real estate that could make so much money from banner ads!

30 2022-08-23 06:06

Just use WordPress and then visit your blog, right click, "Save as" article1.htm, article2.htm ... update index.htm accordingly and voila you have the perfect static blog.

31


VIP:

do not edit these