top | item 45106408

(no title)

arandomhuman | 6 months ago

I was expecting a sort of MD to HTML conversion since it's hard to think of a simpler way of doing this. I don't see how react or nextjs constitutes this being easy or simple unless you're targeting folks with domain knowledge with those ecosystems.

discuss

order

pseudosavant|6 months ago

I was expecting a really simple static-site generator too, but this idea is interesting as well. The heavyweight aspect of using Next/React dampen things a bit.

If it is a client-side solution, I'm imagining a single index.html file (with inline JS/CSS) that you could have a content/ or markdown/ child folder for. The HTTP server would have directory listing on for that folder. The index.html file enumerate/fetch the markdown in the content and folder and render it. You could route using the URL hash.

No build process. Just a single file + your markdown content. Maybe I just like this kind of stuff (https://github.com/pseudosavant/player.html, https://github.com/pseudosavant/folder.api)? So tempted to vibe-code an example...

pvtmert|6 months ago

This is exactly how my (personal) page(s) work! I wrote it pre-covid.

Initially I was using the hash as you suggested, but the redirect/404 was flaky when I use github-pages as the host, hence I reverted to the query-string (? or search) as it creates a complete refresh. Which allows me to set up "virtual" routes like `/blog`.

Topping with worker/service worker, it is quite robust!

Link: https://mert.akeng.in/

dtedesco1|5 months ago

These are great for adding more flavor to md -> html, but I want to be able to use React components sometimes, not just JS/CSS.

dtedesco1|5 months ago

You’re getting close. The biggest thing is that I want to be able to use React components sometimes and anywhere on the page. If you just want md -> html, there are of course much better options.

JohnKemeny|6 months ago

Agreed. Pandoc with some webpage template (bootstrap).