summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Whitlock <adam@adamwhitlock.com>2022-01-11 22:07:11 -0600
committerAdam Whitlock <adam@adamwhitlock.com>2022-01-11 22:21:21 -0600
commit5ea8c5c8ecc32227d3a626cf40207763e9e7ad1a (patch)
tree6d1a1384663618b982a7ec71ed78fdb99e0c30ef
parenta28c742a1a9848d9ab21bc6e78bacd76d2c90a5b (diff)
Added scripts.html to layout
-rw-r--r--README.md19
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/scripts.html0
3 files changed, 21 insertions, 0 deletions
diff --git a/README.md b/README.md
index a9d7e17..eb6c774 100644
--- a/README.md
+++ b/README.md
@@ -296,6 +296,25 @@ src="x400_board.png"
alt="This is sample image" %}}
+## Addiitonal Scripts
+
+Huey supports loading scripts after the footer loads (Example: Javascript for site analytics). Adding new code directly to Huey's existing `huey/layouts/partials/scripts.html` is the fastest method to get started. However, to maintain core site code separate from your theme create a `layouts/partials/scripts.html` file in the base site directory. When generating a new site, Hugo will load the base folder `scripts.html` accoording to the order of precedence.
+
+Example Layout Showing New scripts.html:
+
+```
+hugo-site
+├── layouts/
+├── partials/
+│└── scripts.html
+... more files ...
+├── themes/
+│└── huey/
+...
+
+```
+
+
## Site Local Assets and Online Dependencies
Bulma CSS is stored as part of the project theme, in `assets/css/bulma`. This ensures you can move your site around without needing network access. If a newer version of Bulma is necessary, either replace the Bulma CSS directory completely or use a public Bulma CSS location. The location is specified in `layouts/partials/head.html`.
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 55aeb23..f7e8ead 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -10,6 +10,8 @@
</div>
</div>
{{- partial "footer.html" . -}}
+
</div>
+ {{- partial "scripts.html" . -}}
</body>
</html> \ No newline at end of file
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/scripts.html