Re:I wrote JavaScript to avoid JavaScript
by muspimerol on Monday November 09, 2020 @08:03AM
(#25034318)
I definitely understand the desire to avoid a build-time tool. Especially Gatsby is way harder than it should be to get up and running. But for me, portability and data integrity trumps ease-of-publishing. If you want to move your blog to a new system in 5 years, you'll have to migrate a bunch of HTML. If you had the posts in markdown, chances are it would be a plug-and-play with the new system.
That's the reason I pointed out the <span> usage - your source of truth for your data is HTML, but in this case it's already getting mixed up with design-related oddities.
Not bashing your choice for your blog, I think it's reasonable. I just wonder if HTML is the most resilient way to store blog data. It's something I considered a lot when redoing my blog last year.
Re:I wrote JavaScript to avoid JavaScript
by d3nj4l on Monday November 09, 2020 @09:08AM
(#25034927)
You can use Jekyll for a JS-less markdown to static site generator.
Re:I wrote JavaScript to avoid JavaScript
by asaaki on Monday November 09, 2020 @12:41PM
(#25037296)
Also zola, hugo, and other pretty light weight generators are quite okay. I'm using zola which runs nicely on Win/Mac/Linux. All you need to get started is some theme/template and your blog posts in Markdown. Then enrich it with whatever floats your boat.
Regarding the use of <span> is because the <p> tag with the chosen CSS leaves too much space after <h*> tags, while <span> doesn't, and as I wanted to just use HTML tags and not create my own version of the CSS, I found <span> the easiest way to achieve that.