Improve docs (#1506)
* Docs: Mention page.summary for summary * Docs: Link global functions * Docs: Fix typos
This commit is contained in:
parent
b292f452bd
commit
7fab9b4774
|
@ -149,7 +149,7 @@ paragraph of the page content in a list.
|
||||||
To do so, add <code><!-- more --></code> in your content at the point
|
To do so, add <code><!-- more --></code> in your content at the point
|
||||||
where you want the summary to end. The content up to that point will be
|
where you want the summary to end. The content up to that point will be
|
||||||
available separately in the
|
available separately in the
|
||||||
[template](@/documentation/templates/pages-sections.md#page-variables).
|
[template](@/documentation/templates/pages-sections.md#page-variables) via `page.summary`.
|
||||||
|
|
||||||
A span element in this position with a `continue-reading` id is created, so you can link directly to it if needed. For example:
|
A span element in this position with a `continue-reading` id is created, so you can link directly to it if needed. For example:
|
||||||
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`.
|
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`.
|
||||||
|
|
|
@ -10,7 +10,7 @@ try [Tera macros](https://tera.netlify.com/docs#macros).
|
||||||
|
|
||||||
Broadly speaking, Zola's shortcodes cover two distinct use cases:
|
Broadly speaking, Zola's shortcodes cover two distinct use cases:
|
||||||
|
|
||||||
* Inject more complex HTML: Markdown is good for writing, but it isn't great when you need add inline HTML or styling.
|
* Inject more complex HTML: Markdown is good for writing, but it isn't great when you need to add inline HTML or styling.
|
||||||
* Ease repetitive data based tasks: when you have [external data](@/documentation/templates/overview.md#load-data) that you
|
* Ease repetitive data based tasks: when you have [external data](@/documentation/templates/overview.md#load-data) that you
|
||||||
want to display in your page's body.
|
want to display in your page's body.
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ This will create a shortcode `books` with the argument `path` pointing to a `.to
|
||||||
titles and descriptions. They will flow with the rest of the document in which `books` is called.
|
titles and descriptions. They will flow with the rest of the document in which `books` is called.
|
||||||
|
|
||||||
Shortcodes are rendered before the page's Markdown is parsed so they don't have access to the page's table of contents.
|
Shortcodes are rendered before the page's Markdown is parsed so they don't have access to the page's table of contents.
|
||||||
Because of that, you also cannot use the `get_page`/`get_section`/`get_taxonomy` global functions. It might work while
|
Because of that, you also cannot use the [`get_page`](@/documentation/templates/overview.md#get-page)/[`get_section`](@/documentation/templates/overview.md#get-section)/[`get_taxonomy`](@/documentation/templates/overview.md#get-taxonomy) global functions. It might work while
|
||||||
running `zola serve` because it has been loaded but it will fail during `zola build`.
|
running `zola serve` because it has been loaded but it will fail during `zola build`.
|
||||||
|
|
||||||
## Using shortcodes
|
## Using shortcodes
|
||||||
|
|
|
@ -57,7 +57,7 @@ jobs:
|
||||||
|
|
||||||
This script is pretty simple, because the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action) is doing everything for you. You just need to provide some details. For more configuration options check out the [README](https://github.com/shalzz/zola-deploy-action/blob/master/README.md).
|
This script is pretty simple, because the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action) is doing everything for you. You just need to provide some details. For more configuration options check out the [README](https://github.com/shalzz/zola-deploy-action/blob/master/README.md).
|
||||||
|
|
||||||
By commiting the action your first build is triggered. Wait until it's finished, then you should see in your repository a new branch *gh-pages* with the compiled *Zola* page in it.
|
By committing the action your first build is triggered. Wait until it's finished, then you should see in your repository a new branch *gh-pages* with the compiled *Zola* page in it.
|
||||||
|
|
||||||
Finally we need to check the *Github Pages* section of the repository settings. Click on the *Settings* tab and scroll down to the *Github Pages* section. Check if the source is set to *gh-pages* branch and the directory is */ (root)*. You should also see your *Github Pages* link.
|
Finally we need to check the *Github Pages* section of the repository settings. Click on the *Settings* tab and scroll down to the *Github Pages* section. Check if the source is set to *gh-pages* branch and the directory is */ (root)*. You should also see your *Github Pages* link.
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ next: String?;
|
||||||
pages: Array<Page>;
|
pages: Array<Page>;
|
||||||
// Which pager are we on
|
// Which pager are we on
|
||||||
current_index: Number;
|
current_index: Number;
|
||||||
// Total number of pages accross all the pagers
|
// Total number of pages across all the pagers
|
||||||
total_pages: Number;
|
total_pages: Number;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue