Started working on the frontend

- Added the new post frontend
- Hooked up publishing of posts to the site publisher
- Added an site exporter as a publishing target
This commit is contained in:
Leon Mika 2026-02-21 10:22:10 +11:00
parent a59008b3e8
commit e77cac2fd5
40 changed files with 1427 additions and 84 deletions

View file

@ -1,7 +1,10 @@
---
date: 2026-02-18T22:17:00+11:00
id: atHn1bZa7Z0D
title: First Post
date: 2026-02-18T11:17:00Z
tags: []
slug: /2026/02/18/first-post
---
Hello World!

View file

@ -1,7 +1,10 @@
---
date: 2026-02-19T22:17:00+11:00
id: ANRTjDSaCZcj
title: About a DB
date: 2026-02-19T11:17:00Z
tags: []
slug: /2026/02/19/about-a-db
---
Hello again.

View file

@ -0,0 +1,8 @@
---
id: XFpDGhCLRSiV
title: Another Publish Tests
date: 2026-02-20T22:51:32Z
tags: []
slug: /2026/02/21/another-publish-tests
---
Okay, that wasn't as smooth sailing as I was hoping for. I forgot to set the publish key so Netlify refused to publish the site. Let see how this attempt goes.

View file

@ -0,0 +1,8 @@
---
id: yvLBWj26Zsgp
title: Export As Publish Target
date: 2026-02-20T23:17:26Z
tags: []
slug: /2026/02/21/export-as-publish
---
I've added a site exporter which will export the site as a series of Markdown files whenever I publish a post. With any luck, both the exporter and the Netlify publisher will work when I publish this. This will save the posts I've made so far, while allowing me to init the database without having to save new migrations.

View file

@ -0,0 +1,14 @@
---
id: ARFyO2TiZ0Ju
title: First Attempt at Posting From the UI
date: 2026-02-20T22:48:58Z
tags: []
slug: /2026/02/21/first-attempt-at
---
If you're seeing this, then posting from the UI works.
The UI is using service-side HTTP rendering, so there's nothing fancy going on here. I've chosen to use Boostrap for the frontend. It's a little traditional but hey, it looks good. I can't post a screenshot of the UI as Weiro doesn't have attachments yet, but I will once I have attachments working.
The new post should have been saved in the Sqlite3 database, which should trigger a rebuild of the site and a publish to Netlify. The existing posts should still be there too. At the moment, the publishing is done inline, which won't be the case for long, but I want to make sure the publishing flow is working properly.
Okay, here we go.

View file

@ -1,8 +1,13 @@
---
date: 2026-02-20T17:36:00+11:00
id: Go4SilAxyruR
title: Direct Publish To Netlify
date: 2026-02-20T06:36:00Z
tags: []
slug: /2026/02/20/netlify
---
Just a quick one right now. Integrated the Netlify client allowing direct publish to Netlify.
Previous attempts were using the Netlify CLI, but after learning that Go has a Netlify client,
I have zero use for that now.
I have zero use for that now.
I think we're ready to start building the UI.

View file

@ -0,0 +1,13 @@
---
id: f-mK1xJDUlUg
title: Success!
date: 2026-02-20T22:59:18Z
tags: []
slug: /2026/02/21/success
---
Okay, publishing from the frontend works.
Of course now I need to make sure all these posts are kept, as I would like to prevent a publish every time I make a change. So either enable a local preview mode or have a way to export the posts I save: both possible with the multiple publishing targets. And I want to be able to easily save posts as drafts, and also allow for local saves should the updated post be unable to reach the server.
Basically, I want to make sure the writing and publishing flow is as good as it can be, otherwise I wouldn't be comfortable using it. And for any blogging CMS, having a way to write posts and be comfortable that your words won't be lost is paramount.

View file

@ -1,6 +1,3 @@
title: Weiro
tagline: A blogging CMS
base_url: https://jolly-boba-9e2486.netlify.app/
public:
netlify:
site_id: 55c878a7-189e-42cf-aa02-5c60908143f3
base_url: https://jolly-boba-9e2486.netlify.app