Live data from Hacker News

Offbase: Static site generator in a browser

offbase.org

41–50 of 96 posts

Re: Offbase: Static site generator in a browser

#41

Doesn't https://www.netlifycms.org combined with Netlify itself (or any other CDN) achieve the same?

Netlify CMS stores content on their cloud. This looks like it lets you store on your own git repository directly from the browser, avoiding potential lock-in.

Re: Offbase: Static site generator in a browser

#42
This is great!

The whole "Git is eating the database world" trend is picking up steam.

MDN/Yari, mentioned recently on here was another similar one https://github.com/mdn/yari

I am planning on doing something similar to Offbase with Dub (https://github.com/treenotation/dumbdown/tree/master/dub).

Each post will be written in Dumbdown, but then also a whole "blog" (posts, settings, pages, etc), you will be able to view/edit in a single textarea, and copy/paste the whole thing. So you should be able to write a whole site in the client side JS app, use local storage for persistence, and then copy/paste either the raw Tree Notation files to import/export the site, or just the compiled HTML. Then just need a one click "write this site to a Git repo", and then GitHub/GitLab/etc can handle long term persistence, version control, and site hosting.

Happy to talk more to the authors off offbase if it would help. I think there could be some synergy here.

Re: Offbase: Static site generator in a browser

#43

Doesn't https://www.netlifycms.org combined with Netlify itself (or any other CDN) achieve the same?

Netlify CMS stores content on their cloud. This looks like it lets you store on your own git repository directly from the browser, avoiding potential lock-in.

Right on the landing page of Netlify CMS it says: "Content is stored in your Git repository alongside your code..."

Re: Offbase: Static site generator in a browser

#44
post #3

Hmm...it uses the CDN's servers. So "no server" or "getting rid of the server" seems a tad inaccurate.

CDN is by all means considered "serverless". Yes in anything that is "serverless" there's a server somewhere but you don't have to maintain it, you get charged by usage only so no running cost. Now their claim about being deplatform resistant is probably not true though as someone is running that CDN and can just as easily deplatform you. But serverless in the ops community does not mean literally no server is running.

For instance Lambda must have a server running these tasks, it mean it is not of your concern and you don't pay for a long running process.

Re: Offbase: Static site generator in a browser

#45
I hate to be the person that needs to point it out, but you can't say replace "the cloud with x" and replace "servers with x" and then 500 pixels down the page talk about how you're pushing your static site to a CDN. Perhaps the target audience won't recognize how dishonest that is, but it's still a lie.

Re: Offbase: Static site generator in a browser

#46
post #42

This is great! The whole "Git is eating the database world" trend is picking up steam. MDN/Yari, mentioned recently on here was another similar one https://github.com/mdn/yari I am planning on doing something similar to Offbase with Dub ( https://github.com/treenotation/dumbdown/tree/master/dub ). Each post will be written in Dumbdown, but then also a whole "blog" (posts, settings, pages, etc), you will be able to vi…

Thank you, in the video I intentionally positioned Offbase as a "static site generator" and a "blogging engine" just to focus the minimal viable product and avoid confusion, but the actual platform I'm working toward releasing is really a generic shell that can run anything, the blogging package will be the one thing I will focus on building myself, but since it will be a completely open platform where you can download any git repository into the browser, anyone should be able to build their own package. For example you can build a documentation engine package, or an image editor package. And going further, even the static site generator logic itself is nothing more than a single use case where it simply runs a template logic and writes to the virtual file system, while using the service worker to render the files in realtime, for example. You can think of Offbase as something like Electron, but in a browser. This means a lot of things that you used to need a server for, you can build with Offbase purely inside the browser. Which means, I think Offbase may fit right in with what you're trying to build, it should handle a lot of headaches you might otherwise have. Will try to get this rolled out public as soon as I can, it's almost there, just trying to deal with some last mile problems and documentation.

Re: Offbase: Static site generator in a browser

#47
Perfectly sound architecture that does not need an intermediary like Netflify:

1. Browser-Side Service Worker

2. Git - mutable file system via REST

3. CDN - deploy to multiple CDNs

I didn't look at the code but I suspect it could be made to be isomorphic and run in Cloudflare Workers but the code surrounding credentials used for Git and CDN access probably needs to distinguish between the browser-side and server-side.

Re: Offbase: Static site generator in a browser

#48
How does it pull from and push to a Git remote?

(I wouldn’t have thought that there was any good option. If you reject the use of an intermediary proxy, then I think the only two options are: to do something forge-specific, which is rather limiting and quite contrary to the purport of the project; or to use the smart protocol over HTTPS, but that’s going to be CORS-blocked, to say nothing of the security aspect probably being a pain—if I recall correctly, GitHub for one now requires you to use a token for authentication over the HTTPS protocol, so it’s never just a single step any more.)

Re: Offbase: Static site generator in a browser

#49
Maybe I'm missing something, but it appears that the only difference between this and other static site generators is that you can edit stuff in the browser, right?

I usually just edit my pages in VS Code, or any other markdown editor. Then I push to a Git repository, and my CDN (Netlify, Vercel, etc) builds the site automatically.

Post reply on HN