Merge pull request #304 from smcdougall/master
Changed content to match docs changes.
This commit is contained in:
commit
daca1b7495
@ -10,18 +10,24 @@ Congratulations, you have successfully installed [Pico](http://picocms.org/).
|
|||||||
|
|
||||||
## Creating Content
|
## Creating Content
|
||||||
|
|
||||||
Pico is a flat file CMS, this means there is no administration backend or
|
Pico is a flat file CMS. This means there is no administration backend or
|
||||||
database to deal with. You simply create `.md` files in the `content-sample`
|
database to deal with. You simply create `.md` files in the `content` folder and
|
||||||
folder and that becomes a page. For example, this file is called `index.md`
|
those files become your pages. For example, this file is called `index.md` and
|
||||||
and is shown as the main landing page.
|
is shown as the main landing page.
|
||||||
|
|
||||||
If you create a folder within the content folder (e.g. `content-sample/sub`)
|
When you install Pico, it comes with a `content-sample` folder. Inside this
|
||||||
and put an `index.md` inside it, you can access that folder at the URL
|
folder is a sample website that will display until you add your own content.
|
||||||
`http://example.com/pico/?sub`. If you want another page within the sub folder,
|
You should create your own `content` folder in Pico's root directory and place
|
||||||
|
your files there. No configuration is required, Pico will automatically use the
|
||||||
|
`content` folder if it exists.
|
||||||
|
|
||||||
|
If you create a folder within the content folder (e.g. `content/sub`) and put an
|
||||||
|
`index.md` inside it, you can access that folder at the URL
|
||||||
|
`http://example.com/?sub`. If you want another page within the sub folder,
|
||||||
simply create a text file with the corresponding name and you will be able to
|
simply create a text file with the corresponding name and you will be able to
|
||||||
access it (e.g. `content-sample/sub/page.md` is accessible from the URL
|
access it (e.g. `content/sub/page.md` is accessible from the URL
|
||||||
`http://example.com/pico/?sub/page`). Below we've shown some examples of
|
`http://example.com/?sub/page`). Below we've shown some examples of locations
|
||||||
locations and their corresponding URLs:
|
and their corresponding URLs:
|
||||||
|
|
||||||
<table style="width: 100%; max-width: 40em;">
|
<table style="width: 100%; max-width: 40em;">
|
||||||
<thead>
|
<thead>
|
||||||
@ -32,41 +38,42 @@ locations and their corresponding URLs:
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>content-sample/index.md</td>
|
<td>content/index.md</td>
|
||||||
<td><a href="%base_url%">/</a></td>
|
<td><a href="%base_url%">/</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>content-sample/sub.md</td>
|
<td>content/sub.md</td>
|
||||||
<td><del>?sub</del> (not accessible, see below)</td>
|
<td><del>?sub</del> (not accessible, see below)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>content-sample/sub/index.md</td>
|
<td>content/sub/index.md</td>
|
||||||
<td><a href="%base_url%?sub">?sub</a> (same as above)</td>
|
<td><a href="%base_url%?sub">?sub</a> (same as above)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>content-sample/sub/page.md</td>
|
<td>content/sub/page.md</td>
|
||||||
<td><a href="%base_url%?sub/page">?sub/page</a></td>
|
<td><a href="%base_url%?sub/page">?sub/page</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>content-sample/a/very/long/url.md</td>
|
<td>content/a/very/long/url.md</td>
|
||||||
<td><a href="%base_url%?a/very/long/url">?a/very/long/url</a> (doesn't exist)</td>
|
<td>
|
||||||
|
<a href="%base_url%?a/very/long/url">?a/very/long/url</a>
|
||||||
|
(doesn't exist)
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
If a file cannot be found, the file `content-sample/404.md` will be shown. You
|
If a file cannot be found, the file `content/404.md` will be shown. You can add
|
||||||
can add `404.md` files to any directory, so if you want to use a special error
|
`404.md` files to any directory. So, for example, if you wanted to use a special
|
||||||
page for your blog, simply create `content-sample/blog/404.md`.
|
error page for your blog, you could simply create `content/blog/404.md`.
|
||||||
|
|
||||||
Instead of adding your own content to the `content-sample` folder, you should
|
|
||||||
create your own `content` directory in Pico's root directory. You can then add
|
|
||||||
and access your contents as described above.
|
|
||||||
|
|
||||||
As a common practice, we recommend you to separate your contents and assets
|
As a common practice, we recommend you to separate your contents and assets
|
||||||
(like images, downloads etc.). We even deny access to your `content` directory
|
(like images, downloads, etc.). We even deny access to your `content` directory
|
||||||
by default. So if you want to use a asset (e.g. a image) in one of your content
|
by default. If you want to use some assets (e.g. a image) in one of your content
|
||||||
files, upload it to the (to be created) directory `assets` and use it as
|
files, you should create an `assets` folder in Pico's root directory and upload
|
||||||
follows: <code>!\[Image Title\](%base_url%/assets/image.png)</code>
|
your assets there. You can then access them in your markdown using
|
||||||
|
<code>%base_url%/assets/</code> for example:
|
||||||
|
<code>!\[Image Title\](%base_url%/assets/image.png)</code>
|
||||||
|
|
||||||
### Text File Markup
|
### Text File Markup
|
||||||
|
|
||||||
@ -93,8 +100,8 @@ There are also certain variables that you can use in your text files:
|
|||||||
* <code>%base_url%</code> - The URL to your Pico site; internal links
|
* <code>%base_url%</code> - The URL to your Pico site; internal links
|
||||||
can be specified using <code>%base_url%?sub/page</code>
|
can be specified using <code>%base_url%?sub/page</code>
|
||||||
* <code>%theme_url%</code> - The URL to the currently used theme
|
* <code>%theme_url%</code> - The URL to the currently used theme
|
||||||
* <code>%meta.*%</code> - Access any meta variable of the current page,
|
* <code>%meta.*%</code> - Access any meta variable of the current
|
||||||
e.g. <code>%meta.author%</code> is replaced with `Joe Bloggs`
|
page, e.g. <code>%meta.author%</code> is replaced with `Joe Bloggs`
|
||||||
|
|
||||||
### Blogging
|
### Blogging
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user