Testing Hugo with bootstrap5
This commit is contained in:
3
themes/bootstrap5/layouts/partials/footer.html
Normal file
3
themes/bootstrap5/layouts/partials/footer.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer>
|
||||
<small>Copyright {{now.Format "2006"}} Me.</small>
|
||||
</footer>
|
||||
31
themes/bootstrap5/layouts/partials/head.html
Normal file
31
themes/bootstrap5/layouts/partials/head.html
Normal 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>
|
||||
3
themes/bootstrap5/layouts/partials/header.html
Normal file
3
themes/bootstrap5/layouts/partials/header.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<header>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
</header>
|
||||
6
themes/bootstrap5/layouts/partials/nav.html
Normal file
6
themes/bootstrap5/layouts/partials/nav.html
Normal 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>
|
||||
Reference in New Issue
Block a user