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

github.com/zwbetz-gh/minimal-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwbetz <zwbetz@gmail.com>2018-10-15 22:29:02 +0300
committerzwbetz <zwbetz@gmail.com>2018-10-15 22:29:02 +0300
commit4d7c9aae3e8afe8d4e3a89f14730719dfdc8906f (patch)
tree957003cdd1175bc06ac366110125a0c232cce243
parent59b863b31f8f05c4dc714ca19807653a154d22d6 (diff)
Add includeBootstrapJs config option
-rw-r--r--README.md12
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/bootstrap-js.html6
3 files changed, 18 insertions, 1 deletions
diff --git a/README.md b/README.md
index 98e6bf0..3ab1fa3 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,7 @@ pygmentsStyle = "pygments"
showPostSummary = false
googleAnalytics = "UA-123456789-1"
cookieConsent = true
+ includeBootstrapJs = false
faviconSafariPinnedTabColor = "#5bbad5"
faviconMsApplicationTileColor = "#da532c"
@@ -211,7 +212,7 @@ customBlockquoteStyle = true
```
* Optional (but **recommended**, so that your blockquotes are formatted nicely)
* If set to `true`, this will use custom blockquote styles
-* See [blockquote](#blockquote)
+* See [blockquote](#blockquote) shortcode
### Post Summary
@@ -239,6 +240,15 @@ cookieConsent = true
* If set to `true`, this will show a cookie consent popup in order to be compliant with GDPR
* To configure the cookie consent popup see [Configure Cookie Consent](#configure-cookie-consent)
+### Include Bootstrap JS
+
+```
+includeBootstrapJs = false
+```
+* Optional
+* If set to `true`, this will include the Bootstrap JS scripts (they are not included by default)
+* This is only necessary if you plan to override the theme and need to use Bootstrap functionality that requires its JS scripts
+
### Favicon Colors on Various Platforms
```
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 313c86b..131b9a0 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -17,6 +17,7 @@ enableGitInfo = false
showPostSummary = false
googleAnalytics = "UA-123456789-1"
cookieConsent = true
+ includeBootstrapJs = false
faviconSafariPinnedTabColor = "#5bbad5"
faviconMsApplicationTileColor = "#da532c"
diff --git a/layouts/partials/bootstrap-js.html b/layouts/partials/bootstrap-js.html
new file mode 100644
index 0000000..a0b8d84
--- /dev/null
+++ b/layouts/partials/bootstrap-js.html
@@ -0,0 +1,6 @@
+{{ if eq .Site.Params.includeBootstrapJs true}}
+{{ $jqueryJs := "js/jquery-3.3.1.slim.min.js" -}}
+<script src="{{ $jqueryJs | absURL }}"></script>
+{{ $bootstrapJs := "js/bootstrap.bundle.min.js" -}}
+<script src="{{ $bootstrapJs | absURL }}"></script>
+{{ end }} \ No newline at end of file