about summary refs log tree commit diff stats
path: root/internal/builder
diff options
context:
space:
mode:
authorAlan Pearce2024-06-25 20:11:20 +0200
committerAlan Pearce2024-06-25 20:11:20 +0200
commit2fcf88ac2e088cdb7692ccfd7fccce01dd0cd523 (patch)
tree1a10913622f35818cade49d1856f0d999ff65fbd /internal/builder
parent1b734d8731f4d5ada6ca0da07e2bcf59e00f209d (diff)
downloadwebsite-2fcf88ac2e088cdb7692ccfd7fccce01dd0cd523.tar.lz
website-2fcf88ac2e088cdb7692ccfd7fccce01dd0cd523.tar.zst
website-2fcf88ac2e088cdb7692ccfd7fccce01dd0cd523.zip
refactor server startup
Diffstat (limited to 'internal/builder')
-rw-r--r--internal/builder/builder.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index d2d86a6..1181802 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -4,7 +4,6 @@ import (
 	"context"
 	"fmt"
 	"io"
-	"net/url"
 	"os"
 	"path"
 	"slices"
@@ -24,8 +23,7 @@ import (
 type IOConfig struct {
 	Source      string `conf:"default:.,short:s,flag:src"`
 	Destination string `conf:"default:website,short:d,flag:dest"`
-	BaseURL     config.URL
-	Development bool `conf:"default:false,flag:dev"`
+	Development bool   `conf:"default:false,flag:dev"`
 }
 
 type Result struct {
@@ -267,13 +265,6 @@ func BuildSite(ioConfig IOConfig) (*Result, error) {
 	config.InjectLiveReload = ioConfig.Development
 	compressFiles = !ioConfig.Development
 
-	if ioConfig.BaseURL.URL != nil {
-		config.BaseURL.URL, err = url.Parse(ioConfig.BaseURL.String())
-		if err != nil {
-			return nil, errors.WithMessage(err, "could not re-parse base URL")
-		}
-	}
-
 	if ioConfig.Development && ioConfig.Destination != "website" {
 		err = os.RemoveAll(ioConfig.Destination)
 		if err != nil {