diff options
author | zwbetz <zwbetz@gmail.com> | 2018-10-15 22:29:02 +0300 |
---|---|---|
committer | zwbetz <zwbetz@gmail.com> | 2018-10-15 22:29:02 +0300 |
commit | 4d7c9aae3e8afe8d4e3a89f14730719dfdc8906f (patch) | |
tree | 957003cdd1175bc06ac366110125a0c232cce243 | |
parent | 59b863b31f8f05c4dc714ca19807653a154d22d6 (diff) |
Add includeBootstrapJs config option
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/bootstrap-js.html | 6 |
3 files changed, 18 insertions, 1 deletions
@@ -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 |