diff options
| author | Adam Whitlock <adam@adamwhitlock.com> | 2022-01-11 22:07:11 -0600 |
|---|---|---|
| committer | Adam Whitlock <adam@adamwhitlock.com> | 2022-01-11 22:21:21 -0600 |
| commit | 5ea8c5c8ecc32227d3a626cf40207763e9e7ad1a (patch) | |
| tree | 6d1a1384663618b982a7ec71ed78fdb99e0c30ef | |
| parent | a28c742a1a9848d9ab21bc6e78bacd76d2c90a5b (diff) | |
Added scripts.html to layout
| -rw-r--r-- | README.md | 19 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
| -rw-r--r-- | layouts/partials/scripts.html | 0 |
3 files changed, 21 insertions, 0 deletions
@@ -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 |
