Live data from Hacker News

No CMS? Writing Our Blog in React (2023)

getwaitlist.com

31–40 of 44 posts

Re: No CMS? Writing Our Blog in React (2023)

#32
> We recognized that a full-on SSG wasn't going to do the job.

Why? The article doesn't explain.

> it turns out that it's not so easy to "just use a CMS." Like many others, we initially looked into popular ones like Ghost, Hugo, Jekyll, and Publii

I don't know what Publii is; but Hugo and Jekyll aren't CMS's.

> all I really wanted was to be able to write Markdown, and then get some React Components that were styled well enough to use in my blog

Why was this a technical requirement? Why should the output from Markdown be a React component? Why does she need React for her blog? The article doesn't say.

Re: No CMS? Writing Our Blog in React (2023)

#33
post #11

Earlier quoted context omitted.

> if you want to keep your existing footer, header, CSS That's actually pretty simple, and is what CSS is meant to be helping with - there will be a pain of having to wrangle the framework's HTML to fit what you need, but it's doable, and a small price to pay for the benefits the tried-and-tested framework brings.

Yes, but in reality it's not that easy if you want to have a shared footer / header / navbar component. If you want to use for example Tailwind CSS classes in your blog you also need to integrate it with your build pipeline to add/remove unused classes from the final stylesheet.

I have client side includes using a custom element, that I can add to any HTML page and get the shared footer, header, etc.

Re: No CMS? Writing Our Blog in React (2023)

#34

I'm sorry but you lost me at “Write blog in React.” The art/science and tech of writing should be as decoupled as possible from the tools (CMS, React, etc.) Make people write -- then enable the features, UX, and the other facades of a blog with the tooling -- React, Vue, WordPress, Movable Type, Blogger, and FooBar.

I'm sorry, but Knuth wrote TeX in order to be able to write books up to his standards. Tools matter, because they enable you to realise and work with higher level concepts.

Re: No CMS? Writing Our Blog in React (2023)

#35
A project I've been slowly working on over the years is JSON Blog -> https://github.com/jsonblog/jsonblog-cli

The idea being you can have a file called blog.json, and your entire site structure can be generated from it. (in whatever fashion you want aka templates)

You can store the content of the blog posts in the blog.json or they blog posts can reference something at a quasi permanent place e.g. ipfs

Re: No CMS? Writing Our Blog in React (2023)

#36
So when the primary purpose of your blogs content is to deliver information accessibly, any user block JavaScript by default for security/privacy, any TUI browsers, & we crawlers get nothing but a blank screen—not even a noscript. You can’t convince me this is a rational usage of a technology—this is essentially static HTML. There’s a lot of justified complaints in here about how terribly limited Markdown is for creating blogs/documentation, but the solution shouldn’t be jumping to React but consider choosing something with better features & extensibility for actually writing something beyond a comment (such as reStructuredText or Asciidoctor).

Re: No CMS? Writing Our Blog in React (2023)

#37
post #24
post #21

Earlier quoted context omitted.

> If your content is mostly static, just use markup and sprinkle a bit of js on top of you must. Your visitors will be grateful. If you're building a web based application, which you're probably not, use React. This is solved by React server rendering or RSC, e.g. through Next. Your visitors will see HTML.

> This is solved by React server rendering or RSC, e.g. through Next. You realise that's just HTML with more steps?

HTML doesn't solve routes as well as markup reuse. If you want to copypaste markup into it's own HTML and edit the contents, then you do you.

Re: No CMS? Writing Our Blog in React (2023)

#39
“Specifically, sure we could write a Ghost blog that used our preferred font and colors, but it still wouldn't have the GetWaitlist navigation header or footer or "look and feel" of the rest of our website. Plus, if we wanted production deployment to be easy at all, then we'd have to host it on a subdomain.”

This is entirely incorrect. If you want to reproduce your header and footer in some other thing, simply copy your header and footer! View-Source, copy, paste. It’s that easy.

Hosting it on a subdomain? Nope, you don’t have to do that either. You can use nginx to serve the path, you can use httpd to serve the path, you can use AWS ALB’s, HAProxy, pretty much every web server that can load balance can host your path to the blog outside of the path to /.

I stopped reading after this failure to do due diligence and use common sense.

Re: No CMS? Writing Our Blog in React (2023)

#40
post #24

Earlier quoted context omitted.

> This is solved by React server rendering or RSC, e.g. through Next. You realise that's just HTML with more steps?

HTML doesn't solve routes as well as markup reuse. If you want to copypaste markup into it's own HTML and edit the contents, then you do you.

is completely reusable…
Post reply on HN