Docs: `site.url` behavior on development and production environments (#6270)
Merge pull request 6270
This commit is contained in:
parent
0aa55dbffb
commit
06d16504ff
|
@ -185,17 +185,32 @@ following is a reference of the available data.
|
|||
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p><code>site.url</code></p></td>
|
||||
<td><p>
|
||||
|
||||
Contains the url of your site as it is configured in the <code>_config.yml</code>.
|
||||
For example, if you have <code>url: http://mysite.com</code>
|
||||
in your configuration file, then it will be accessible in Liquid as
|
||||
<code>site.url</code>. For the development environment there is
|
||||
<a href="/news/#3-siteurl-is-set-by-the-development-server">an exception</a>,
|
||||
if you are running <code>jekyll serve</code> in a development environment
|
||||
<code>site.url</code> will be set to the value of <code>host</code>,
|
||||
<code>port</code>, and SSL-related options. This defaults to
|
||||
<code>url: http://localhost:4000)</code>.
|
||||
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p><code>site.[CONFIGURATION_DATA]</code></p></td>
|
||||
<td><p>
|
||||
|
||||
All the variables set via the command line and your
|
||||
<code>_config.yml</code> are available through the <code>site</code>
|
||||
variable. For example, if you have <code>url: http://mysite.com</code>
|
||||
in your configuration file, then in your Posts and Pages it will be
|
||||
stored in <code>site.url</code>. Jekyll does not parse changes to
|
||||
<code>_config.yml</code> in <code>watch</code> mode, you must restart
|
||||
Jekyll to see changes to variables.
|
||||
variable. For example, if you have <code>foo: bar</code>
|
||||
in your configuration file, then it will be accessible in Liquid as <code>site.foo</code>.
|
||||
Jekyll does not parse changes to <code>_config.yml</code> in
|
||||
<code>watch</code> mode, you must restart Jekyll to see changes to variables.
|
||||
|
||||
</p></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue