From d39dff61dd17fd348a96b7a642f982382ee9fc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 11 Jan 2022 13:07:36 +0100 Subject: Add simple v4 exampleSite --- .gitignore | 3 ++- exampleSite/assets/scss/styles.scss | 1 + exampleSite/config.toml | 10 ++++++++++ exampleSite/go.mod | 11 +++++++++++ exampleSite/go.sum | 7 +++++++ exampleSite/layouts/index.html | 38 +++++++++++++++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 exampleSite/assets/scss/styles.scss create mode 100644 exampleSite/config.toml create mode 100644 exampleSite/go.mod create mode 100644 exampleSite/go.sum create mode 100644 exampleSite/layouts/index.html diff --git a/.gitignore b/.gitignore index e54c19c..6452380 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ resources/ -public/ \ No newline at end of file +public/ +.hugo_build.lock \ No newline at end of file diff --git a/exampleSite/assets/scss/styles.scss b/exampleSite/assets/scss/styles.scss new file mode 100644 index 0000000..91d6725 --- /dev/null +++ b/exampleSite/assets/scss/styles.scss @@ -0,0 +1 @@ +@import "bootstrap/bootstrap"; diff --git a/exampleSite/config.toml b/exampleSite/config.toml new file mode 100644 index 0000000..fec79ff --- /dev/null +++ b/exampleSite/config.toml @@ -0,0 +1,10 @@ + +baseURL = "https://example.com" +disableKinds = ["page", "section", "taxonomy", "term"] + +[outputs] +home = ["HTML"] + +[module] +[[module.imports]] +path="github.com/gohugoio/hugo-mod-bootstrap-scss/v4" \ No newline at end of file diff --git a/exampleSite/go.mod b/exampleSite/go.mod new file mode 100644 index 0000000..f4d57bc --- /dev/null +++ b/exampleSite/go.mod @@ -0,0 +1,11 @@ +module github.com/gohugoio/hugo-mod-bootstrap-scss/exampleSite/v4 + +go 1.17 + +require ( + github.com/bep/empty-hugo-module v1.0.0 // indirect + github.com/gohugoio/hugo-mod-bootstrap-scss/v4 v4.0.0-20220111121503-d09c70837b61 // indirect +) + + +replace github.com/gohugoio/hugo-mod-bootstrap-scss/v4 => ../ \ No newline at end of file diff --git a/exampleSite/go.sum b/exampleSite/go.sum new file mode 100644 index 0000000..5ecb01a --- /dev/null +++ b/exampleSite/go.sum @@ -0,0 +1,7 @@ +github.com/bep/empty-hugo-module v1.0.0 h1:aYc9RWea644CdYjg9zCy8nkVF4KjC3fwhUTvvcXXg8s= +github.com/bep/empty-hugo-module v1.0.0/go.mod h1:whohinbSjMoFi/Skivj9kvdPs1tEgzYpZ4rXoQk/0/I= +github.com/gohugoio/hugo-mod-bootstrap-scss/v4 v4.0.0-20220111121503-d09c70837b61 h1:rclBs01LjSeTPeN8/I4VASzgL/14HBnbMio6UQvGlSk= +github.com/gohugoio/hugo-mod-bootstrap-scss/v4 v4.0.0-20220111121503-d09c70837b61/go.mod h1:QOfRknwQ8SbtzgHn+dkR+lnLbVSCG8U/1iqpDxk64QU= +github.com/twbs/bootstrap v4.6.1+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/twbs/bootstrap v5.1.3+incompatible h1:19+1/69025oghttdacCOGvs1wv9D5lZnpfoCvKUsPCs= +github.com/twbs/bootstrap v5.1.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/exampleSite/layouts/index.html b/exampleSite/layouts/index.html new file mode 100644 index 0000000..516b416 --- /dev/null +++ b/exampleSite/layouts/index.html @@ -0,0 +1,38 @@ + + + + + + {{ .Title }} + + {{/* styles */}} + {{ $options := dict "enableSourceMap" true }} + {{ if hugo.IsProduction}} + {{ $options := dict "enableSourceMap" false "outputStyle" "compressed" }} + {{ end }} + {{ $styles := resources.Get "scss/styles.scss" }} + {{ $styles = $styles | resources.ToCSS $options }} + {{ if hugo.IsProduction }} + {{ $styles = $styles | fingerprint }} + {{ end }} + + + +
+
+
+

Column 1

+

Lorem ipsum dolor..

+
+
+

Column 2

+

Lorem ipsum dolor..

+
+
+

Column 3

+

Lorem ipsum dolor..

+
+
+
+ + \ No newline at end of file -- cgit v1.2.3