JS or no JS, that's a problem - towards a ZERO JS blog
[This post is to be updated]
I prefer managing my posts with plaintext/flatfiles. I don’t want any database in my CMS and I don’t need to edit the posts. I used hexo before but it requires that you have Node.js installed to render the site. I abandoned it because I dislike node’s way of package management1. I switched to hugo, a single binary that works.
Can you write a responsive frontend without JS? YES YOU CAN! For example I have some CSS like this for mobiles.
> Not too boring
While I’m a huge fan of the motherfucking website , I still want to make my site “cooler”. You may argue that vanilla plaintext is the true cool, which I much agree… but anyways I think I’ve done a pretty good job ricing the site without losing the plaintext nature, including
- Logo and navigation panel
- Pretty cool listing of posts
- A colorscheme that works for color-blind people(me)
- Markdown and Code rendering, thanks to Hugo.
However as you can see this setup breaks our no-js promise. There is an open [issue] (https://github.com/gohugoio/hugo/issues/10044) requesting server side math rendering feature. Also this thread has some good insights, I may take a look in the future.
Also regarding richer text, hugo has support for GoAT:
> While looking good in the terminal
This one is a bit tricky because it means you can’t abuse
<div> in your site.
In my experience w3m simply puts every new
<div> into a new line, which means
you can’t make them positioned side-by-side…. or the epic question:“how to
center a div?”… No you don’t.
So to make a good layout the good old
<table> is required..
> And interactive features? (I mean comments).
In the previous post I have a sketch of a duct-tapped “static” comment system.
I learned that hugo could “get and cache remote resource” in the compiling pipeline. This offers a new option to integrate the comments.
> Thoughts and reasonale
seriously, why are you ok with installing 1k node packages only to do the simplest things? I’m not! ↩︎
[+] click to leave a comment [+]
the comment system on this blog works via email. The button below will generate a mailto: link based on this page's url and invoke your email client - please edit the comment there! [optional] even better, encrypt the email with my public key - don't modify the subject field - specify a nickname, otherwise your comment will be shown as anonymous - your email address will not be disclosed - you agree that the comment is to be made public. - to take down a comment, send the request via email.>> SEND COMMENT <<