diff --git a/layouts/_partials/event.ics b/layouts/_partials/event.ics index 206bd8b17..a99dad901 100644 --- a/layouts/_partials/event.ics +++ b/layouts/_partials/event.ics @@ -1,5 +1,5 @@ {{- /* Override of component event.ics — uses .Site.Language.Lang instead of .Locale (requires Hugo 0.159+) */ -}} -{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnidf "debug-partial-used" "Partial used: %s" templates.Current.Name }}{{ end -}} +{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnf "Partial used: %s" templates.Current.Name }}{{ end -}} {{- $timezone := partial "ical/get_timezone.ics" . -}} {{- $lang := .Site.Language.Lang -}} {{- $endDate := "" -}} diff --git a/layouts/_partials/header.ics b/layouts/_partials/header.ics index 9af200765..020a23b64 100644 --- a/layouts/_partials/header.ics +++ b/layouts/_partials/header.ics @@ -1,4 +1,4 @@ -{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnidf "debug-partial-used" "Partial used: %s" templates.Current.Name }}{{ end -}} +{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnf "Partial used: %s" templates.Current.Name }}{{ end -}} {{/* Override of component header.ics — uses .Site.Language.Lang instead of .Locale (requires Hugo 0.159+) */}} {{ with dict `` ` ` "name" (dict "text" "PowerShell.org Community Calendar" "lang" .Site.Language.Lang) `` ` diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..4a7b0f073 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,31 @@ +[build] + base = "/" + command = "hugo --minify" + publish = "public" + +[build.environment] + HUGO_VERSION = "0.155.1" + HUGO_ENVIRONMENT = "production" + TZ = "UTC" + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-Content-Type-Options = "nosniff" + Referrer-Policy = "strict-origin-when-cross-origin" + +[[headers]] + for = "/discord/*" + [headers.values] + Cache-Control = "public, max-age=3600" + +[[headers]] + for = "/*.css" + [headers.values] + Cache-Control = "public, max-age=31536000, immutable" + +[[headers]] + for = "/*.js" + [headers.values] + Cache-Control = "public, max-age=31536000, immutable" diff --git a/package.json b/package.json index 279e5d1a1..be6016c1a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "preview": "hugo server --environment production" }, "devDependencies": { - "hugo-extended": "^0.121.0", + "hugo-extended": "^0.155.1", "node-fetch": "^3.3.2" } } \ No newline at end of file