Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-bootstrap-scss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-01-11 15:07:36 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-01-11 16:16:10 +0300
commitd39dff61dd17fd348a96b7a642f982382ee9fc91 (patch)
treea25e15f4a8c770fb815150e573b9a5c7e79af545
parenta343c11948a7b2a8fac44f05377e58864edcc47a (diff)
Add simple v4 exampleSite
-rw-r--r--.gitignore3
-rw-r--r--exampleSite/assets/scss/styles.scss1
-rw-r--r--exampleSite/config.toml10
-rw-r--r--exampleSite/go.mod11
-rw-r--r--exampleSite/go.sum7
-rw-r--r--exampleSite/layouts/index.html38
6 files changed, 69 insertions, 1 deletions
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 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>
+ {{ .Title }}
+ </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 }}
+ <link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
+ </head>
+ <body>
+ <div class="container mt-5">
+ <div class="row">
+ <div class="col-sm-4">
+ <h3>Column 1</h3>
+ <p>Lorem ipsum dolor..</p>
+ </div>
+ <div class="col-sm-4">
+ <h3>Column 2</h3>
+ <p>Lorem ipsum dolor..</p>
+ </div>
+ <div class="col-sm-4">
+ <h3>Column 3</h3>
+ <p>Lorem ipsum dolor..</p>
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file