Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for extensions option #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _src/_includes/snippets/commands/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
<td>Show a directory listing for the server</td>
</tr>

<tr>
<td>--extensions</td>
<td>Specify file extension fallbacks</td>
</tr>

<tr>
<td>--proxy</td>
<td>Proxy an existing server</td>
Expand Down
6 changes: 6 additions & 0 deletions _src/_includes/snippets/options/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ server: {
index: "index.htm"
}

// Serve files from the app directory, with custom file extension fallbacks
server: {
baseDir: "app",
extensions: ["html","json"]
}

// Since version 1.2.1
// The key is the url to match
// The value is which folder to serve (relative to your current working directory)
Expand Down
6 changes: 6 additions & 0 deletions docs/command-line/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ <h3 id="command-line-options" class="section-link">
<td>Show a directory listing for the server</td>
</tr>

<tr>
<td>--extensions</td>
<td>Specify file extension fallbacks</td>
</tr>

<tr>
<td>--proxy</td>
<td>Proxy an existing server</td>
Expand Down Expand Up @@ -191,6 +196,7 @@ <h3 id="command-line-options" class="section-link">

</table>


<h3 id="files-example" class="section-link">
<a href="#files-example" class="page-anchor">Files Examples</a>
<a href="#page-top" class="back-to-top">^ TOP</a>
Expand Down
6 changes: 6 additions & 0 deletions docs/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ <h3 id="option-server" class="section-link">
index: <span class="hljs-string">"index.htm"</span>
}

<span class="hljs-comment">// Serve files from the app directory, with custom file extension fallbacks</span>
server: {
baseDir: <span class="hljs-string">"app"</span>,
extensions: [<span class="hljs-string">"html"</span>,<span class="hljs-string">"json"</span>]
}

<span class="hljs-comment">// Since version 1.2.1</span>
<span class="hljs-comment">// The key is the url to match</span>
<span class="hljs-comment">// The value is which folder to serve (relative to your current working directory)</span>
Expand Down