Commit Graph

30 Commits

Author SHA1 Message Date
Kunthawat Greethong
6b77cc355e fix: use "portableText" instead of "richtext" field type
EmDash uses "portableText" as the field type name, not "richtext".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 13:44:08 +07:00
Kunthawat Greethong
be63c72048 fix: convert homepage text fields to richtext for live editing
Change field types from "text" to "richtext" and wrap content in PortableText
components. This enables proper inline live editing instead of jumping to backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 13:40:49 +07:00
Kunthawat Greethong
8094cec877 fix: enable live editing on homepage with {...homepage.edit.field} attributes
Adds content binding on Base component for homepage live editing navigation.
Uses homepage.id (entry ULID) not homepage.data.id (not in homepage schema).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 13:11:02 +07:00
Kunthawat Greethong
07725f9023 fix: add hero_image live editing with Image component from emdash/ui
Use Image component instead of img tag. Add hero_image to hero-visual
container with {...homepage.edit.hero_image} for live editing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 11:45:22 +07:00
Kunthawat Greethong
1c928a1217 fix: enable live editing on homepage with {...homepage.edit.field} attributes
Added {...homepage.edit.X} spread attributes to all editable elements
(hero, features, comparison, CTA sections). This is what the live
editing UI needs to enable inline editing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 11:32:53 +07:00
Kunthawat Greethong
d0868d000c fix: remove singleton flag from homepage collection
Singleton collections don't support live editing in EmDash.
Converting to regular collection enables live editing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 11:16:56 +07:00
Kunthawat Greethong
79465ae005 fix: use slug 'main' for homepage singleton entry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 11:15:12 +07:00
Kunthawat Greethong
1298e3c018 fix: show featured_image on posts list page
Use featured_image.src/alt instead of featuredImage. Add post-image CSS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 10:31:16 +07:00
Kunthawat Greethong
3c07db0406 fix: use {id, src, alt} format for image fields
EmDash image fields require {id, src, alt} not {url, alt}.
Runtime type: { id, src, alt, width?, height? }

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 10:27:41 +07:00
Kunthawat Greethong
ea8a725e52 fix: add _key to all PortableText blocks and spans
PortableText blocks in EmDash require a _key field. Added
to widgetAreas, sections, and all content entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 10:19:11 +07:00
Kunthawat Greethong
6327f87a4c chore: ensure uploads directory exists at container startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 09:25:54 +07:00
Kunthawat Greethong
433af238cf fix: remove $media wrapper from image fields in seed content
Image fields in EmDash seed content use { url, alt } format directly,
not {$media: { url, alt, filename } }

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 09:25:03 +07:00
Kunthawat Greethong
b861e3bab8 fix: add slug to homepage content entry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 23:51:23 +07:00
Kunthawat Greethong
734fad181e feat: enable full dynamic homepage content via EmDash
- Add homepage singleton collection with 30+ editable fields
- Update index.astro to fetch from getEmDashEntry("homepage", "homepage-main")
- Update Base.astro footer tagline/copyright from EmDash

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 23:44:37 +07:00
Kunthawat Greethong
620c63951f Remove user creation and chown (Easypanel manages permissions differently)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 20:45:47 +07:00
Kunthawat Greethong
e8d4e3e767 Chown entire /app directory to astro user for write access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 20:32:35 +07:00
Kunthawat Greethong
620cfb0371 Create astro user BEFORE copying data.db, fix chown order
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 19:58:28 +07:00
Kunthawat Greethong
7064a17716 Use numeric UID 1001 instead of username for chown
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 18:28:04 +07:00
Kunthawat Greethong
f5b402f272 Chown data.db to astro user to fix readonly database error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 18:13:19 +07:00
Kunthawat Greethong
4cda67324c Add kysely as dependency (required by emdash runtime)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 17:19:04 +07:00
Kunthawat Greethong
aca07743a1 Fix sqlite3 -> sqlite (Alpine package name)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 16:50:43 +07:00
Kunthawat Greethong
346c8003fa Add sqlite3 to builder for database debugging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 16:45:53 +07:00
Kunthawat Greethong
de4bc34019 Copy data.db from builder to runner (emdash init creates it at build time)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 15:51:38 +07:00
Kunthawat Greethong
2d67a53685 Run emdash seed after init to populate content and initialize the system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 15:17:33 +07:00
Kunthawat Greethong
fcf4803b29 Set HOST env var so emdash/astro binds to 0.0.0.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 14:43:23 +07:00
Kunthawat Greethong
6d52b7d39c Bind node server to 0.0.0.0 for Docker accessibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 14:19:47 +07:00
Kunthawat Greethong
a458082c5d Run emdash init at build time to initialize database before runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 13:25:04 +07:00
Kunthawat Greethong
854013cd43 Remove non-existent public and data.db from Dockerfile (generated at runtime)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 12:51:54 +07:00
Kunthawat Greethong
ccc1e33bbe Update Dockerfile: node:20 -> node:22 (Astro requires >=22.12.0)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 12:47:52 +07:00
Kunthawat Greethong
520c5f19e2 Initial commit: EmDash blog template
Fixed index.astro: escaped curly braces in code display block
to prevent Astro parser misinterpreting them as expressions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 12:41:59 +07:00