From 45a2e290aa2bc59deb5971255accba517500cc25 Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Wed, 19 Jun 2024 13:50:37 +0200
Subject: fix dev server/live reload
---
internal/builder/builder.go | 1 +
internal/builder/page.templ | 8 +++++++
internal/builder/template.go | 2 +-
internal/server/dev.go | 55 +++++++++++++++++++++++++++++++++++---------
internal/server/server.go | 7 ++++--
5 files changed, 59 insertions(+), 14 deletions(-)
(limited to 'internal')
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index b4ade4a..44ab402 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -267,5 +267,6 @@ func BuildSite(ioConfig IOConfig) (*Result, error) {
}
}
+ loadCSS()
return build(ioConfig.Destination, *config)
}
diff --git a/internal/builder/page.templ b/internal/builder/page.templ
index c99e315..7b3380f 100644
--- a/internal/builder/page.templ
+++ b/internal/builder/page.templ
@@ -52,6 +52,14 @@ templ page(site config.Config, page PageSettings) {
MIT
@counter(page.Path, page.Title)
+ if site.InjectLiveReload {
+
+ }