Testing Hugo with bootstrap5

This commit is contained in:
Franz Klotsche
2025-11-09 19:57:15 +01:00
parent 16edfac859
commit a08038b6f9
23 changed files with 9431 additions and 6 deletions

View File

@@ -0,0 +1,3 @@
<footer>
<small>Copyright {{now.Format "2006"}} Me.</small>
</footer>

View File

@@ -0,0 +1,31 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- <link rel="stylesheet" href="{{ "css/style.css"
| relURL }}"> -->
<title>{{ .Site.Title }}</title>
<!-- https://rodneymaiato.dev/posts/how-to-add-the-official-bootstrap-module-in-a-hugo-site/ -->
{{/* Load Bootstrap SCSS. */}}
{{ $options := dict "enableSourceMap" true }}
{{ if hugo.IsProduction }}
{{ $options := dict "enableSourceMap" false "outputStyle" }}
{{ end }}
{{ $styles := resources.Get "scss/styles.scss" }}
{{ $styles := $styles | resources.ToCSS $options }}
{{ if hugo.IsProduction }}
{{ $styles = $styles | fingerprint }}
{{ end }}
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
{{/* Load Bootstrap JS. */}}
{{ $js := resources.Get "js/index.js" }}
{{ $params := dict }}
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
{{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2018" "params" $params }}
{{ $js = $js | js.Build $opts }}
{{ if hugo.IsProduction }}
{{ $js = $js | fingerprint }}
{{ end }}
<script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
</head>

View File

@@ -0,0 +1,3 @@
<header>
<h1>{{ .Site.Title }}</h1>
</header>

View File

@@ -0,0 +1,6 @@
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/resume">Résumé</a>
<a href="/contact"></a>
</nav>