diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..a9bfbeb --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,25 @@ +steps: + - name: build hugo + image: alpine:3.19.1 + commands: + - apk update + - apk add hugo + - hugo -b 'https://music.guerilla.studio' + + - name: upload + when: + branch: + - main + image: plugins/s3 + settings: + bucket: music.guerilla.studio + endpoint: https://garage.deuxfleurs.fr + region: garage + access_key: + from_secret: aws_access_key_id + secret_key: + from_secret: aws_secret_access_key + source: public/**/* + target: / + strip_prefix: public/ + path_style: true diff --git a/README.md b/README.md index 5316128..3ae1865 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,11 @@ npm ci ### Admin your website in local -Go to you website's local url + `/admin` (by default it's `http://localhost:1313/admin`). Enjoy! +Go to you website's local url + `/admin` (by default it's `http://localhost:1312/admin`). Enjoy! ## Credits - * [Higgcss](https://github.com/robinparisi/higgcss) - The minimal CSS framework use as skeleton + * [Higgcss](https://github.com/robinparisi/higgcss) - The minimal CSS framework used as skeleton * Wryk for the help and support 💜 + * [Deuxfleurs](https://deuxfleurs.fr) for the wonderful distributed hosting infrastructure (running [Garage](https://garagehq.deuxfleurs.fr)) \ + ![Website hosted by Deuxfleurs](hosted_by_deuxfleurs.png) ![Infrastructure powered by Garage ](powered_by_garage.png) diff --git a/config.toml b/config.toml index aca010f..717ff1e 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "http://localhost:1313/" +baseURL = "http://localhost:1312/" languageCode = "en-us" title = "Now Playing" mainSections = ["a"] @@ -17,4 +17,9 @@ disableKinds = ["taxonomy"] quality = 95 [security] [security.funcs] - getenv = [ "^HUGO_", "CONTEXT", "URL" ] + getenv = [ "^HUGO_", "CONTEXT", "URL", "BASE_URL" ] + +## Deploy into a Garage bucket at Deuxfleurs +[[deployment.targets]] +name = "deuxfleurs" +URL = "s3://music.guerilla.studio&endpoint=garage.deuxfleurs.fr®ion=garage&s3ForcePathStyle=true" diff --git a/hosted_by_deuxfleurs.png b/hosted_by_deuxfleurs.png new file mode 100644 index 0000000..3058ac9 Binary files /dev/null and b/hosted_by_deuxfleurs.png differ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8a2eece..dbb7e12 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -42,8 +42,12 @@ {{ end }} {{ end }} + {{ $opts := dict + "vars" site.Params.styles + "enableSourceMap" (not hugo.IsProduction) + }} {{ $sass := resources.Get "/scss/style.scss" }} - {{ $style := $sass | resources.ToCSS | minify | fingerprint }} + {{ $style := $sass | resources.ToCSS $opts | minify | fingerprint }} {{ $secureStyle := $style | resources.Fingerprint "sha512" }} diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 1dc6399..0000000 --- a/netlify.toml +++ /dev/null @@ -1,43 +0,0 @@ -[build] - publish = "public" - command = "hugo -b $URL" -[build.environment] - HUGO_VERSION = "0.124.1" - - -[context.production.environment] - HUGO_VERSION = "0.124.1" - HUGO_ENV = "production" - command = "hugo -b $URL" - -[context.deploy-preview] - command = "hugo -b $DEPLOY_PRIME_URL" - -[[headers]] - for = "/*" - [headers.values] - X-Frame-Options = "DENY" - X-XSS-Protection = "1; mode=block" - X-Content-Type-Options = "nosniff" - -[[redirects]] - force = true - from = "/a" - to = "/" - -# Old urls - -[[redirects]] - force = true - from = "/musics" - to = "/" - -[[redirects]] - force = true - from = "/musics/*" - to = "/a/:splat" - -[[redirects]] - force = true - from = "/page:*" - to = "/page/:splat" diff --git a/powered_by_garage.png b/powered_by_garage.png new file mode 100644 index 0000000..d927586 Binary files /dev/null and b/powered_by_garage.png differ