diff --git a/.gitmodules b/.gitmodules index b76244d3..3bb4d12b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ +[submodule "themes/github.com/twbs/bootstrap"] + path = themes/github.com/twbs/bootstrap + url = https://github.com/twbs/bootstrap.git +[submodule "themes/github.com/FortAwesome/Font-Awesome"] + path = themes/github.com/FortAwesome/Font-Awesome + url = https://github.com/FortAwesome/Font-Awesome.git [submodule "themes/docsy"] path = themes/docsy url = https://github.com/google/docsy.git diff --git a/Dockerfile b/Dockerfile index 6d46a18a..0394a12c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,18 @@ -FROM klakegg/hugo:0.111.3-ext-ubuntu as builder +FROM registry.access.redhat.com/ubi10/ubi as builder + +ARG HUGO_VERSION=0.155.2 + +WORKDIR /src + +RUN dnf install -y golang git nodejs +RUN curl -sL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz \ + | tar -C /usr/bin -xzf - hugo COPY . /src/ RUN set -x && HUGO_ENV=production make generate -FROM nginxinc/nginx-unprivileged:1.18-alpine +FROM nginxinc/nginx-unprivileged:1.29-alpine COPY --from=builder /src/public/ /usr/share/nginx/html/ COPY --from=builder /src/static/googlea8e04f239c597b8a.html /usr/share/nginx/html/ diff --git a/Makefile b/Makefile index d8debd6d..b0159141 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,4 @@ generate: - npm install -D --unsafe-perm=true --save postcss postcss-cli autoprefixer && cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify + npm install --save-dev postcss postcss-cli autoprefixer && git submodule update -f --init && hugo --gc --minify +image: + podman build -t ci-docs -f Dockerfile . diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 00000000..25b67521 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/hack/codeescape.sh b/hack/codeescape.sh deleted file mode 100755 index 6ff22355..00000000 --- a/hack/codeescape.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -getRegex() { - echo -n "s/\b(? - - diff --git a/layouts/partials/head-css.html b/layouts/partials/head-css.html deleted file mode 100644 index a3d018e8..00000000 --- a/layouts/partials/head-css.html +++ /dev/null @@ -1,49 +0,0 @@ - -{{ $scssMain := "scss/main.scss"}} -{{ if .Site.IsServer }} -{{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}} -{{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" true) }} - -{{ else }} -{{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" false) | postCSS | minify | fingerprint }} - - -{{ end }} - -{{/* Everything above here is copied from themes/docsy/layouts/partials/head-css.html to add the below section */}} - - diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index b36d176c..00000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,325 +0,0 @@ - - -{{ hugo.Generator }} -{{- $outputFormat := partial "outputformat.html" . -}} - -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - -{{ if and hugo.IsProduction (ne $outputFormat "print") -}} - -{{ else -}} - -{{ end -}} - -{{ partialCached "favicons.html" . }} -