From 415b11d4583a072419be1c15bc5c0d1114b06ce1 Mon Sep 17 00:00:00 2001 From: ltdk Date: Sat, 20 Jul 2024 23:54:28 -0400 Subject: [PATCH] Document the cutoff, since it's nontrivial now --- docs/content/documentation/content/page.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index 30f2af581..d97e0abf7 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -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 <!-- more --> in your content at the point +To do so, add `` 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: `Continue Reading`. + +If the `` 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"; +} +```