The summarizer module automatically computes page.summary — a plain-text excerpt of each page's content. Summaries are used by the RSS module for feed descriptions and by the Cards module for social media meta tags (og:description, twitter:description).
The summarizer runs before layout processing, so it summarizes the rendered content body (after Markdown/Scriban evaluation) but before it is wrapped in a layout template.
Only pages with HTML content type are processed. Markdown, CSS, JavaScript, and other content types are skipped.
The algorithm:
<!-- lunet:summarize --> comment is present, skips all text before it.<!-- more --> comment is present, uses only the text before it as the summary.summary_word_count words (default: 70), adding an ellipsis (…).page.summary.| Property | Scope | Type | Default | Description |
|---|---|---|---|---|
summary_word_count |
page or site | int | 70 |
Maximum number of words in the summary |
summary_keep_formatting |
page or site | bool | false |
When true, preserves some HTML formatting in the extracted text |
Properties are looked up on the page first, then fall back to the site object.
Set site-wide defaults in config.scriban:
summary_word_count = 100
summary_keep_formatting = false
Or override per page in front matter:
summary_word_count: 50
<!-- more --> commentInsert a <!-- more --> comment in your content to manually control where the summary ends. All text before the marker becomes the summary, and the word count limit is not applied:
This is the introduction that will appear in feeds and social cards.
<!-- more -->
This content will not appear in the summary.
<!-- lunet:summarize --> commentInsert a <!-- lunet:summarize --> comment to mark where the summarizable content begins. All text before this marker is excluded from the summary. This is useful when pages start with navigation, hero sections, or other non-content elements:
<div class="hero">Welcome to my site</div>
<!-- lunet:summarize -->
This is the actual content that should be summarized.
Both markers can be combined: text before <!-- lunet:summarize --> is skipped, and text after <!-- more --> is excluded. The summary becomes the content between the two markers.
summary_word_count values are treated as the default (70).page.summary, even if set in front matter. To provide a manual summary for an HTML page, the page must be processed differently (e.g. non-HTML content type).page.summary for feed item descriptionspage.summary for social media meta tags