Local Resources
Hugo Narrow support import local resources such as images with three methods:
- Page Bundles (markdown folder)
- Global Resources (assets folder)
- Static Resources (static folder)
Tip
Hugo Narrow follow the order to index the local resources:Page Bundles > Global Resources > Static Resources
Page Bundles
Page Bundles refer to resource files located in the same directory as the Markdown file. This is the most recommended method for managing image resources.
- post-1.md
- post-1.zh-cn.md
- index.md
- index.zh-cn.md
- featured.jpg
- image-1.jpg
- image-2.jpg
Use in Markdown:


Note
See Hugo documentation for more details.
Global Resources
Global resources are placed in the assets folder at the root directory of the site: ~/assets/. Resources placed in this folder will be processed by Hugo during the build.
- hero.jpg
Use in Markdown:
Note
See Hugo documentation for more details.
Static Resources
Static resources are placed in the assets folder at the root directory of the site: ~/static/. Resources placed in this folder will NOT be processed by Hugo during the build.
- hero.jpg
Use in Markdown:
Note
See Hugo documentation for more details.
Different
| Location | Use | |
|---|---|---|
| Page Bundles | ~/content/posts/post-1/featured.jpg | featured.jpg |
| Global Resources | ~/assets/images/featured.jpg | images/featured.jpg |
| Static Resources | ~/static/images/featured.jpg | /images/featured.jpg |
Note
images is not necessary, you can change it.