Add note about protocol-relative URLs

This commit is contained in:
unknown 2014-11-11 09:21:41 -05:00
parent d3a71a5ebc
commit 0513ea3946

View file

@ -100,7 +100,7 @@ Your site's logo, appears in the header below the navigation bar and is used as
#### url #### url
Used to generate absolute URLs for sitemaps, feeds and for generating canonical URLs in a page's `<head>`. When developing locally either comment this out or use something like `http://localhost:4000` so all assets load properly. *Don't include a trailing `/`*. Used to generate absolute URLs for sitemaps, feeds and for generating canonical URLs in a page's `<head>`. When developing locally either comment this out or use something like `http://localhost:4000` so all assets load properly. *Don't include a trailing `/`*. [Protocol-relative URLs](http://www.paulirish.com/2010/the-protocol-relative-url/) are a nice option but there are a few caveats[^protocol].
Examples: Examples:
@ -108,9 +108,12 @@ Examples:
url: http://mmistakes.github.io/so-simple-theme url: http://mmistakes.github.io/so-simple-theme
url: http://localhost:4000 url: http://localhost:4000
url: http://mademistakes.com url: http://mademistakes.com
url: //mademistakes.com
url: url:
{% endhighlight %} {% endhighlight %}
[^protocol]: If you decide to use a protocol-relative URL know that it will most likely break sitemap.xml that the Jekyll-Sitemap gem creates. If a valid sitemap matters to you I'd suggest [creating your own sitemap.xml](http://davidensinger.com/2013/03/generating-a-sitemap-in-jekyll-without-a-plugin/) and apply some Liquid logic to prepend links to posts/pages with `https:`.
#### Google Analytics and Webmaster Tools #### Google Analytics and Webmaster Tools
Google Analytics UA and Webmaster Tool verification tags can be entered under `owner` in `_config.yml`. For more information on obtaining these meta tags check [Google Webmaster Tools](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35179) and [Bing Webmaster Tools](https://ssl.bing.com/webmaster/configure/verify/ownership) support. Google Analytics UA and Webmaster Tool verification tags can be entered under `owner` in `_config.yml`. For more information on obtaining these meta tags check [Google Webmaster Tools](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35179) and [Bing Webmaster Tools](https://ssl.bing.com/webmaster/configure/verify/ownership) support.