refactor: simplify Hugo deployment config by moving from hugo.toml to config.toml and streamline nixpacks build process
This commit is contained in:
parent
740c1ab906
commit
408f17a9ca
@ -1,4 +1,4 @@
|
|||||||
baseURL = "https://blog-zko0k8k8osc4kcg0gco8k0s0.reflectonai.com"
|
baseURL = "https://blog-koo48w00w0cw4sscokc0448k.reflectonai.com"
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
title = "My New Hugo Site"
|
title = "My New Hugo Site"
|
||||||
theme = "" # You can specify a theme here later
|
theme = "" # You can specify a theme here later
|
||||||
@ -1,35 +1,11 @@
|
|||||||
# nixpacks.toml
|
|
||||||
|
|
||||||
# Explicitly set the provider to 'static'
|
|
||||||
[provider]
|
|
||||||
name = "static"
|
|
||||||
website = "https://gohugo.io/"
|
|
||||||
|
|
||||||
# This section ensures that Hugo is available in the build environment.
|
|
||||||
# Nixpacks will use Nix to provide the 'hugo' package.
|
|
||||||
[phases.setup]
|
[phases.setup]
|
||||||
providers = ["node", "rust", "go"] # Ensures common build toolchains are available
|
aptPkgs = ["hugo"]
|
||||||
nix_pkgs = ["hugo"]
|
|
||||||
|
|
||||||
# This section defines variables used during the build
|
|
||||||
[variables]
|
|
||||||
NIXPACKS_STATIC_COMMAND = "hugo --verbose --minify"
|
|
||||||
|
|
||||||
# This section defines the command(s) to build your Hugo site.
|
|
||||||
# Using "--verbose" can give more detailed output from Hugo during the build if needed.
|
|
||||||
# Using "--minify" is good practice to reduce file sizes.
|
|
||||||
[ phases.build ]
|
[ phases.build ]
|
||||||
cmds = ["$NIXPACKS_STATIC_COMMAND"]
|
cmds = ["hugo --minify"]
|
||||||
|
|
||||||
# This section tells Nixpacks where your built static site will be located.
|
[ environment ]
|
||||||
# Coolify will then use this 'public' directory to serve your website.
|
HUGO_VERSION = "0.147.5"
|
||||||
[start]
|
|
||||||
public_dir = "public"
|
|
||||||
# No 'cmd' is needed here for static sites, as Coolify handles the serving.
|
|
||||||
|
|
||||||
# Make sure the static site server is used
|
[[ nixpacks.included_files ]]
|
||||||
[phases.install]
|
paths = ["/public"]
|
||||||
cmds = ["echo 'Using Hugo to build a static site'"]
|
|
||||||
|
|
||||||
[staticserver]
|
|
||||||
package = "nginx"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user