mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 18:15:45 +00:00
Incorporate feedback
See https://github.com/gohugoio/hugoDocs/pull/690/files/4fa760d7096692366c2d09606e43d9b58d792131#r242191660 https://github.com/gohugoio/hugoDocs/pull/690/files/4fa760d7096692366c2d09606e43d9b58d792131#r242195513
This commit is contained in:
1 parent
6f2b9cf0d6
commit
4c8f7d6837
1 file changed
+2
-3
@@ -21,10 +21,9 @@ 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 you choose to use relative URLs in your template you need to quote them.
|
- If using relative URLs in links, they must be quoted, e.g `<a href="{{ "/blog" | relURL }}">` and `<img src="{{ "/images/logo.png" | relURL }}">`
|
||||||
- In style tags you will need to use absolute URLs, for the linked assets to be served properly.
|
- 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 %}}
|
||||||
|
|
||||||
Hugo can initialize a new blank theme directory within your existing `themes` using the `hugo new` command:
|
Hugo can initialize a new blank theme directory within your existing `themes` using the `hugo new` command:
|
||||||
|
|||||||
Reference in new issue
Block a user