Comment by chazeon

2 years ago

I feel like this will be super interesting when pairing with static site generator such as eleventy. Using static site generator is sometimes difficult because of lacking a web backend and ghost is too heavy for me.

Could you explain a bit more this setup? I have been looking for a way to have a tool to fill pages for a static site generator that's local and then just git push in a simplified way.

The idea is to create a website for my mother, without having to deal with hosting at all (static github pages).

Does this combination work that way?

  • Yes.

    Some static site generators have good support for generating pages from a dynamic source, say API, database or anything you can access using programming language.

    See eleventy, for instance, has the “Javascript data files” [1], it run some JS code to generate a list of posts, here we can fetch from pocketbase, then, we can generate pages dynamically [2].

    Pocketbase in this case just act as a lightweight CMS.

    Is this what you’re talking about?

    [1]: https://www.11ty.dev/docs/data-js/

    [2]: https://www.11ty.dev/docs/pages-from-data/

  • No. PocketBase runs on a server. It needs a host.

    It is simple, so its single program is (1) a webserver, (2) runs server-side code, and (3) hosts a DB. I'm running a $12-per-month server on Vultr and its only service is PocketBase.

    You don't need to host the webpages on PocketBase. If you wanted all your webpages to be on Github Pages, you could do that.

    • You won’t need to really run server all the time, you can run locally and use it as a lightweight CMS, and run only when you need to edit and generating anything. You can choose to only upload the generated HTML files to GitHub.

      See my explanation on my reply to the original post.