Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 165 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,169 @@ Thumbs.db
.tmp
.sass-cache
npm-debug.log
node_modules
builds
package-lock.json
public
resources
.env
.env

# Created by https://www.toptal.com/developers/gitignore/api/hugo
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo

### Hugo ###
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock

# End of https://www.toptal.com/developers/gitignore/api/hugo
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

# End of https://www.toptal.com/developers/gitignore/api/node
28 changes: 22 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
FROM registry.hub.docker.com/klakegg/hugo:0.111.3-ext-alpine AS builder
# Getting node modules installed
FROM docker.io/library/node:22-alpine AS npm-builder

COPY . /src
WORKDIR /src

RUN hugo --minify
COPY package.json package-lock.json* ./
RUN npm ci

FROM nginxinc/nginx-unprivileged:1.29-alpine
COPY . .
RUN npm run mdlint || true

# Getting hugo page build
FROM ghcr.io/hugomods/hugo:0.154.5 AS hugo-builder

WORKDIR /src

COPY --from=npm-builder /src/node_modules .
COPY . .
RUN hugo

# Creating deployment container
FROM docker.io/nginxinc/nginx-unprivileged:1.29-alpine

# prevent nginx from adding ports in redirects
USER root

COPY nginx.conf /etc/nginx/nginx.conf

USER 101

COPY --from=builder /src/public /usr/share/nginx/html
COPY --from=hugo-builder /src/public /usr/share/nginx/html
6 changes: 4 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ url = "https://www.puzzle.ch"
[params]
copyright = "Puzzle ITC"
github_repo = "https://github.com/puzzle/ansible-training"
github_branch = "master"
imagePrefix = "puzzle_"
enabledModule = "base"

Expand All @@ -80,7 +81,7 @@ sidebar_search_disable = false
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
navbar_logo = true
# Set to true to disable the About link in the site footer
footer_about_disable = true
footer_about_enable = false

############################## social links ##############################
[params.links]
Expand All @@ -103,7 +104,8 @@ url = "https://linkedin.com/company/puzzle-itc/"
path = "github.com/puzzle/docsy-puzzle"
disable = false
[[module.imports]]
path = "github.com/acend/docsy-plus"
path = "github.com/kreativmonkey/docsy-plus"
version = "v0.1.1"
disable = false
[[module.imports]]
path = "github.com/google/docsy"
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
description = "Hugo Docsy-Plus Development Environment";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
hugo
nodejs_20
];

shellHook = ''
echo "Hugo Dev-Shell geladen."
echo "Hugo Version: $(hugo version)"

# NPM-Pakete für PostCSS/Autoprefixer lokal installieren
echo "=== Installing npm packages ==="
npm install postcss postcss-cli autoprefixer

export PATH="$PWD/node_modules/.bin:$PATH"

# Helper function to run check-build
check-build() {
set -e

echo "=== Running npm install ==="
npm install

echo "=== Running hugo mod tidy ==="
hugo mod tidy

echo "=== Running hugo mod graph ==="
hugo mod graph

echo "=== Running hugo --gc --minify build ==="
hugo --gc --minify 2>&1 | tee build.log

# Scan output for errors
if grep -qiE "(error|failed|fatal)" build.log 2>/dev/null; then
echo "ERRORS detected in build output!"
exit 1
else
echo "Build completed successfully - no errors detected."
rm -f build.log
fi
}
export -f check-build
'';
};
});
}
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/puzzle/ansible-training
go 1.19

require (
github.com/acend/docsy-acend v0.0.0-20220406070448-8027986336dc // indirect
github.com/acend/docsy-plus v0.0.0-20220428195954-da462686a1f4 // indirect
github.com/google/docsy v0.4.0 // indirect
github.com/google/docsy/dependencies v0.4.0 // indirect
github.com/puzzle/docsy-puzzle v0.0.0-20220406081603-2cd9f7c8d79a // indirect
github.com/google/docsy v0.14.3 // indirect
github.com/google/docsy/dependencies v0.7.2 // indirect
github.com/kreativmonkey/docsy-plus v0.1.0 // indirect
github.com/kreativmonkey/docsy-puzzle v0.0.0-20260401154337-031cd95a8734 // indirect
github.com/puzzle/docsy-puzzle v0.0.0-20250822081608-44bcd465abfa // indirect
)
Loading
Loading