Browser Git CMS
While thinking about how my new website should work, I wanted to make sure I can edit pages from anywhere easily, so I made a very simple web app in svelte to use git in the browser.
You can find it at cms.emmabyte.de.
What can it do?
- Home: The main page with a list of all the files and folders, a text editor in the middle, and a preview of the file on the right. This is also where you commit changes.
- Config: Edit configuration options like git username and email, and the repository URL.
- State: View the current state of the repository, like the commit history.
- Top Bar: Two buttons for pulling and pushing changes to the remote repository, and a button to open a dialog with logs from the git commands.
Why Git?
Because I want to be able to host my website statically, a dedicated backend was out of the question. The browser would need to communicate with a pre-made backend for code-sharing natively. There are things like sveltia-cms which I looked at, but (at least at the time of writing), it doesn't support my git server forgejo, because it relies on APIs from the supported services, rather than the git implementation itself.
Why Svelte?
I knew from the start that the CMS would be a much more dynamic application than, for example, this blog, so it made sense to use a framework that supports reactivity. Based on a recommendation from Owlive, I decided to use Svelte. I've never really used any framework before, so svelte made sense as a fairly light-weight option and one that I had someone to ask for help.