From 6d0c155c82b4d1de8d1bc4ce4784d76d547ce292 Mon Sep 17 00:00:00 2001 From: Alexandros Date: Sat, 22 Dec 2018 09:42:48 +0200 Subject: [PATCH] Add note about relative protocol URLs See https://github.com/gohugoio/hugoThemes/pull/521#issue-239913619 for the need to have this note about relative protocol URLs in themes. --- content/en/themes/creating.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/themes/creating.md b/content/en/themes/creating.md index 3e8950c6a..d96942a58 100644 --- a/content/en/themes/creating.md +++ b/content/en/themes/creating.md @@ -23,6 +23,7 @@ wip: true 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. `
` - 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: