loading...

Only flat file CMS and serverless functions are enough for my needs

patarapolw profile image Pacharapol Withayasakpunt ・2 min read

This also obliviate the need to monitor your own database or entrust a third party to do it for you.

Still, you might need some functions you cannot rely on clients' web browser, such as adding search. Downloading indexes to client's machine is expensive and bad for SEO.

So, I use lunr.js instead.

I built two essential files on the fly, before starting up a Nuxt server.

  • db.json created by JSON.string(glob)
  • idx.json created by JSON.stringify(lunr)

See, polv's homepage -- /scripts/init.js

Do you know that you can rollup a temporary server, potentially needed by gatsby build or nuxt generate? Such solutions are

I still have an editor / CMS, though; but it specifically targets a flat file folder,

GitHub logo patarapolw / superflat

Flat file CMS generator and manager

Did I mentioned that I think I was wrong in thinking that I need a CMS? The truth is I still need a CMS, but I don't want to monitor a database.

One more thing I need is commenting engine. Indeed, an option is just use Disqus, but in the end, I hosted by own using Remark42, with a little tweak to make it work with SPA.

GitHub logo umputun / remark42

comment engine

Crossposted from https://www.polv.cc/post/2020/06/flat-file-cms-and-serverless-is-enough.

Posted on Jun 2 by:

patarapolw profile

Pacharapol Withayasakpunt

@patarapolw

Currently interested in TypeScript, Vue, Kotlin and Python. Looking forward to learning DevOps, though.

Discussion

markdown guide