From 5ea8c5c8ecc32227d3a626cf40207763e9e7ad1a Mon Sep 17 00:00:00 2001 From: Adam Whitlock Date: Tue, 11 Jan 2022 22:07:11 -0600 Subject: Added scripts.html to layout --- README.md | 19 +++++++++++++++++++ layouts/_default/baseof.html | 2 ++ layouts/partials/scripts.html | 0 3 files changed, 21 insertions(+) create mode 100644 layouts/partials/scripts.html 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 @@ {{- partial "footer.html" . -}} + + {{- partial "scripts.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 -- cgit v1.2.3