Hi all!
I am trying to build a Hugo site based on a 3rd party Bootstrap theme. I started out by copying their HTML code and splitting it up into the various parts, starting with the template’s section.
The theme is including various CSS, JS and other files, which I placed in the assets directory:
...
assets
|- img
|- favicon.ico
...
themes/<mytheme>
|- assets
|- css
|- vendor
|- aos
|- bootstrap-icons
|- ...
For some reason, none of these resources are being loaded (404). Here are two examples of how I am trying to load them in the section of my page as defined in themes/<mytheme>/layouts/baseof.html
:
<head>
...
<link href="{{ "assets/img/favicon.ico" | relURL }}" rel="icon">
<link href="{{ "assets/vendor/bootstrap-icons/bootstrap-icons.css" | relURL }}" rel="stylesheet">
...
</head>
I have tried
- moving these files to the main static directory (and changing the links, naturally)
- moving these files into just a single assets directory on both root and theme level
- defining staticDirs explicitly
- adding mount instructions in both the main and theme config files
I feel like I am doing something very basic wrong. I am stuck on what it might be however. Any (obvious) ideas?