diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..a5d8e2c --- /dev/null +++ b/.env.dev @@ -0,0 +1,2 @@ +HUGO_PARAMS_ISSO_URL=http://localhost:8080/ +HUGO_BASEURL=/ diff --git a/.env.prod.example b/.env.prod.example new file mode 100644 index 0000000..eae4707 --- /dev/null +++ b/.env.prod.example @@ -0,0 +1,2 @@ +HUGO_PARAMS_ISSO_URL=https://comments.example.com/ +HUGO_BASEURL=https://example.com/ diff --git a/.gitignore b/.gitignore index 8af31da..5ace69a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ isso-dev.db -.hugo_build.lock \ No newline at end of file +.hugo_build.lock +.env.prod \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a774d9 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +include .env.dev +export + +.PHONY: dev dev-hugo dev-isso prod-build + +# Run hugo dev server + isso in parallel +dev: + $(MAKE) dev-isso & $(MAKE) dev-hugo; wait + +dev-hugo: + hugo server -D --bind 0.0.0.0 + +dev-isso: + isso -c isso.dev.cfg run + +# Build for production using .env.prod +prod-build: + @test -f .env.prod || (echo "Error: .env.prod not found. Copy .env.prod.example to .env.prod and fill in your values." && exit 1) + export $$(cat .env.prod | xargs) && hugo --minify diff --git a/public/posts/hi-post/index.html b/public/posts/hi-post/index.html index 10383e2..2889c95 100644 --- a/public/posts/hi-post/index.html +++ b/public/posts/hi-post/index.html @@ -1,5 +1,5 @@ - + @@ -32,15 +32,15 @@