mirror of
https://github.com/ditatompel/insights.git
synced 2025-01-08 03:12:06 +07:00
Compare commits
No commits in common. "449a53f2222057ee0b8ffc3d84151fa09331655e" and "b0f6618a712a737bef31dcbeed33e88e8c0b1adb" have entirely different histories.
449a53f222
...
b0f6618a71
2 changed files with 56 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
###############
|
||||||
|
# Build Stage #
|
||||||
|
###############
|
||||||
|
FROM hugomods/hugo:exts as builder
|
||||||
|
# Base URL
|
||||||
|
ARG HUGO_BASEURL=
|
||||||
|
ENV HUGO_BASEURL=${HUGO_BASEURL}
|
||||||
|
# Module Proxy
|
||||||
|
ARG HUGO_MODULE_PROXY=
|
||||||
|
ENV HUGO_MODULE_PROXY=${HUGO_MODULE_PROXY}
|
||||||
|
# Build site
|
||||||
|
COPY . /src
|
||||||
|
RUN hugo --minify --gc --enableGitInfo
|
||||||
|
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled, please replace the `en` with your default language code.
|
||||||
|
RUN cp ./public/en/404.html ./public/404.html
|
||||||
|
|
||||||
|
###############
|
||||||
|
# Final Stage #
|
||||||
|
###############
|
||||||
|
FROM hugomods/hugo:nginx
|
||||||
|
COPY --from=builder /src/public /site
|
35
netlify.toml
Normal file
35
netlify.toml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[build]
|
||||||
|
command = "npm ci && hugo --minify --gc -b $URL" # change to suite your needs.
|
||||||
|
publish = "public"
|
||||||
|
|
||||||
|
[build.environment]
|
||||||
|
NODE_VERSION = "19"
|
||||||
|
HUGO_VERSION = "0.111.3"
|
||||||
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
HUGO_ENV = "production"
|
||||||
|
GO_VERSION = "1.20"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/*"
|
||||||
|
[headers.values]
|
||||||
|
Referrer-Policy = "strict-origin-when-cross-origin"
|
||||||
|
X-Content-Type-Options = "nosniff"
|
||||||
|
X-Frame-Options = "deny"
|
||||||
|
X-XSS-Protection = "1; mode=block"
|
||||||
|
|
||||||
|
[[redirects]]
|
||||||
|
from = "/en/*"
|
||||||
|
to = "/en/404.html"
|
||||||
|
status = 404
|
||||||
|
|
||||||
|
[[redirects]]
|
||||||
|
from = "/id/*"
|
||||||
|
to = "/id/404.html"
|
||||||
|
status = 404
|
||||||
|
|
||||||
|
# fallback 404 page.
|
||||||
|
[[redirects]]
|
||||||
|
from = "/*"
|
||||||
|
# to = "/404.html"
|
||||||
|
to = "/en/404.html" # use this instead if defaultContentLanguageInSubdir is enabled.
|
||||||
|
status = 404
|
Loading…
Reference in a new issue