summaryrefslogtreecommitdiffstats
path: root/docs/content/en/themes/creating.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/themes/creating.md')
-rw-r--r--docs/content/en/themes/creating.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/content/en/themes/creating.md b/docs/content/en/themes/creating.md
index 3950472a5..d96942a58 100644
--- a/docs/content/en/themes/creating.md
+++ b/docs/content/en/themes/creating.md
@@ -20,7 +20,10 @@ wip: true
---
{{% 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 that your theme's demo will be available in a sub-directory of website and for the theme's assets to load properly you will need to create absolute paths in the templates by using either the [absURL](/functions/absurl) function or `.Permalink`. Also make sure not to use a forward slash `/` in the beginning of a `PATH`, because Hugo will turn it into a relative URL and the `absURL` function will have no effect.
+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 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.
+- If using external CSS and JS from a CDN, make sure to load these assets over `https`. Please do not use relative protocol URLs in your theme's templates.
{{% /warning %}}
Hugo can initialize a new blank theme directory within your existing `themes` using the `hugo new` command: