From 06d16504ff6774388bc022ee986babde1caecc81 Mon Sep 17 00:00:00 2001
From: Natanael Arndt
site.url
+
+ Contains the url of your site as it is configured in the _config.yml
.
+ For example, if you have url: http://mysite.com
+ in your configuration file, then it will be accessible in Liquid as
+ site.url
. For the development environment there is
+ an exception,
+ if you are running jekyll serve
in a development environment
+ site.url
will be set to the value of host
,
+ port
, and SSL-related options. This defaults to
+ url: http://localhost:4000)
.
+
+
site.[CONFIGURATION_DATA]
All the variables set via the command line and your
_config.yml
are available through the site
- variable. For example, if you have url: http://mysite.com
- in your configuration file, then in your Posts and Pages it will be
- stored in site.url
. Jekyll does not parse changes to
- _config.yml
in watch
mode, you must restart
- Jekyll to see changes to variables.
+ variable. For example, if you have foo: bar
+ in your configuration file, then it will be accessible in Liquid as site.foo
.
+ Jekyll does not parse changes to _config.yml
in
+ watch
mode, you must restart Jekyll to see changes to variables.