mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-17 20:44:48 -04:00
Propose archetype usage for summary divider in content-management/summaries.md
Comment by @rdwatters: Nice catch. See PR rdwatters/hugo-docs-concept#89
This commit is contained in:
parent
8aaa5e171f
commit
0fff8177db
@ -48,7 +48,7 @@ The concept of a *summary divider* is not unique to Hugo. It is also called the
|
||||
{{% /note %}}
|
||||
|
||||
* Pros: Freedom, precision, and improved rendering. All HTML tags and formatting are preserved.
|
||||
* Cons: Extra work for content authors, since they need to remember to type <code><!--more--></code> (or `# more` for [org content][org]) in each content file.
|
||||
* Cons: Extra work for content authors, since they need to remember to type <code><!--more--></code> (or `# more` for [org content][org]) in each content file. This can be automated by adding the summary divider below the front matter of an [archetype](/content-management/archetypes/).
|
||||
|
||||
{{% warning "Be Precise with the Summary Divider" %}}
|
||||
Be careful to enter <code><!--more--></code> exactly; i.e., all lowercase and with no whitespace. Any mistakes in the divider will tell Hugo to treat the divider as a regular comment and will fail to store your desired content in the `.Summary` variable.
|
||||
@ -56,7 +56,7 @@ Be careful to enter <code><!--more--></code> exactly
|
||||
|
||||
## Example: First 10 Articles with Summaries
|
||||
|
||||
You can show content summaries with the following code. You could use the following snipper, for example, in a [section template][].
|
||||
You can show content summaries with the following code. You could use the following snippet, for example, in a [section template][].
|
||||
|
||||
{{% code file="page-list-with-summaries.html" %}}
|
||||
```html
|
||||
|
Loading…
x
Reference in New Issue
Block a user