Skip to content

Commit

Permalink
Document the cutoff, since it's nontrivial now
Browse files Browse the repository at this point in the history
  • Loading branch information
clarfonthey committed Jul 21, 2024
1 parent 5a81666 commit 415b11d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/content/documentation/content/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,18 @@ template = "page.html"
You can ask Zola to create a summary if, for example, you only want to show the first
paragraph of the page content in a list.

To do so, add <code>&lt;!-- more --&gt;</code> in your content at the point
To do so, add `<!-- more -->` in your content at the point
where you want the summary to end. The content up to that point will be
available separately in the
[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 href="{{ page.permalink }}#continue-reading">Continue Reading</a>`.

If the `<!-- more -->` marker exists in the middle of a line, the summary will contain a span with a `summary-cutoff` class so you can configure the way the cutoff is rendered. For example, this CSS will display it as an ellipsis:

```css
.summary-cutoff::before {
content: "\2027";
}
```

0 comments on commit 415b11d

Please sign in to comment.