Skip to content

Commit c71071f

Browse files
committed
docs: Updates.
1 parent c21d223 commit c71071f

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

docs/index.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ <h3 id="serve-command">serve command</h3>
166166
-launch
167167
-port PORT
168168
-v</code></pre>
169-
<ul><li><code>-port</code> sets the server port number to <code>PORT</code> (defaults to 1212).</li><li>The <code>-launch</code> option opens the project home page in the default web browser.</li><li>Press the <em>R</em> key followed by the <em>Enter</em> key to force a complete rebuild.</li></ul><h4 id="partial-rebuilds">Partial rebuilds</h4>
169+
<ul><li><code>-port</code> sets the server port number to <code>PORT</code> (defaults to 1212).</li><li>The <code>-launch</code> option opens the project home page in the default web browser.</li><li>Press the <em>R</em> key followed by the <em>Enter</em> key to force a complete rebuild.</li><li>The server strips the <code>urlprefix</code> from URLs in HTML files before sending them
170+
to the browser. This allows the build to be tested irrespective of the
171+
<code>urlprefix</code> value.</li><li>To enable browser live reloads the server inserts the
172+
<a href="http://livereload.com/">LiveReload</a> script tag into HTML files prior to
173+
sending them to the browser.</li></ul><h4 id="partial-rebuilds">Partial rebuilds</h4>
170174
<p>To speed up live reloads and to make the content creation process easier and
171175
more responsive the <a href="#serve-command">serve command</a> automatically performs
172176
partial builds when content files are modified, added or deleted.</p>
@@ -249,10 +253,6 @@ <h3 id="configuration-files">Configuration files</h3>
249253
</dd><dt><code>urlprefix</code></dt><dd>This parameter is prepended to all synthesized document and index
250254
page <a href="#urls">URLs</a>. Its default value is a blank string. TOML examples:<pre class="no-highlight"><code>urlprefix = "/blog" # Root-relative URL prefix.
251255
urlprefix = "https://www.example.com" # Absolute URL prefix.</code></pre>
252-
<p><i class="sans-font">NOTE</i>: If an absolute URL prefix is specified then it will be ignored by the
253-
<a href="#serve-command">serve command</a> and is assigned the default blank value. You
254-
must run the <a href="#build-command">build command</a> before deploying a site with an
255-
absolute URL prefix (this restriction will be removed in a future release).</p>
256256
</dd><dt><code>user</code></dt><dd>This is a user defined key/value map and provides a mechanism for
257257
defining custom template variables. Both keys and values are strings and the
258258
keys must be legal <a href="https://golang.org/ref/spec#Identifiers">Go identifier</a>. For
@@ -455,10 +455,12 @@ <h2 id="urls">URLs</h2>
455455
correctly. For example, if are deploying to the server <code>http://example.com/blog</code>
456456
directory you need to set <code>urlprefix</code> to <code>/blog</code>.</p>
457457
<p>To synthesize absolute URLs include the URL domain in the <code>urlprefix</code>.</p>
458+
<p><i class="sans-font">NOTE</i>: The hindsite <a href="#serve-command">serve command</a> strips the <code>urlprefix</code> from
459+
HTML responses before sending them to the browser.</p>
458460
<h2 id="building-hindsite">Building hindsite</h2>
459461
<p>If you have the <a href="https://golang.org/">Go language</a> installed and want to compile
460-
hindsite from source code then run the following command to automatically
461-
download, compile and install hindsite:</p>
462+
hindsite from source code then run the following command to download, compile
463+
and install hindsite:</p>
462464
<pre class="no-highlight"><code>go get github.com/srackham/hindsite </code></pre>
463465
<p><i class="sans-font">NOTE</i>:</p>
464466
<ul><li><code>go get</code> downloads the <em>HEAD</em> from the <em>master</em> branch which may not be the

docsrc/content/reference.rmu

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ Applicable options:
257257
- `-port` sets the server port number to `PORT` (defaults to 1212).
258258
- The `-launch` option opens the project home page in the default web browser.
259259
- Press the _R_ key followed by the _Enter_ key to force a complete rebuild.
260+
- The server strips the `urlprefix` from URLs in HTML files before sending them
261+
to the browser. This allows the build to be tested irrespective of the
262+
`urlprefix` value.
263+
- To enable browser live reloads the server inserts the
264+
[LiveReload](http://livereload.com/) script tag into HTML files prior to
265+
sending them to the browser.
266+
260267

261268
#### Partial rebuilds
262269
To speed up live reloads and to make the content creation process easier and
@@ -404,16 +411,10 @@ TOML example:
404411

405412
`urlprefix` †:: This parameter is prepended to all synthesized document and index
406413
page [URLs](#urls). Its default value is a blank string. TOML examples:
407-
..
414+
408415
urlprefix = "/blog" # Root-relative URL prefix.
409416
urlprefix = "https://www.example.com" # Absolute URL prefix.
410417

411-
NOTE: If an absolute URL prefix is specified then it will be ignored by the
412-
[serve command](#serve-command) and is assigned the default blank value. You
413-
must run the [build command](#build-command) before deploying a site with an
414-
absolute URL prefix (this restriction will be removed in a future release).
415-
..
416-
417418
`user`:: This is a user defined key/value map and provides a mechanism for
418419
defining custom template variables. Both keys and values are strings and the
419420
keys must be legal [Go identifier](https://golang.org/ref/spec#Identifiers). For
@@ -791,11 +792,14 @@ directory you need to set `urlprefix` to `/blog`.
791792

792793
To synthesize absolute URLs include the URL domain in the `urlprefix`.
793794

795+
NOTE: The hindsite [serve command](#serve-command) strips the `urlprefix` from
796+
HTML responses before sending them to the browser.
797+
794798

795799
## Building hindsite
796800
If you have the [Go language](https://golang.org/) installed and want to compile
797-
hindsite from source code then run the following command to automatically
798-
download, compile and install hindsite:
801+
hindsite from source code then run the following command to download, compile
802+
and install hindsite:
799803

800804
go get github.com/srackham/hindsite
801805

0 commit comments

Comments
 (0)