mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-16 01:46:52 -04:00
Theme Warning: Remove note about unquoted URLs
See https://github.com/gohugoio/hugo/issues/5488#issuecomment-449552225
This commit is contained in:
parent
4c8f7d6837
commit
a13751ac53
@ -21,7 +21,6 @@ wip: true
|
|||||||
|
|
||||||
{{% warning "Use Absolute Links" %}}
|
{{% warning "Use Absolute Links" %}}
|
||||||
If you're creating a theme with plans to share it on the [Hugo Themes website](https://themes.gohugo.io/) please note the following:
|
If you're creating a theme with plans to share it on the [Hugo Themes website](https://themes.gohugo.io/) please note the following:
|
||||||
- If using relative URLs in links, they must be quoted, e.g `<a href="{{ "/blog" | relURL }}">` and `<img src="{{ "/images/logo.png" | relURL }}">`
|
|
||||||
- If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">`
|
- If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">`
|
||||||
- Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme's demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets.
|
- Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme's demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets.
|
||||||
{{% /warning %}}
|
{{% /warning %}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user