mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
update summary doc
This commit is contained in:
parent
9e029fe412
commit
73ec09258b
1 changed files with 8 additions and 4 deletions
|
@ -10,16 +10,20 @@ title: Summaries
|
|||
weight: 65
|
||||
---
|
||||
|
||||
Hugo generates summaries of content for easily showing snippets in summary views. The summary view snippets are automatically generated by Hugo. Where a piece of content's summary is split depends on whether the split is Hugo defined or use defined.
|
||||
Hugo generates summaries of content for easily showing snippets in summary views. The summary view snippets are automatically generated by Hugo. Where a piece of content is split for the content summary depends on whether the split is Hugo-defined or user-defined.
|
||||
|
||||
Content summaries provide links to the original content, usually in the form of a `Read More` link.
|
||||
|
||||
## Automatic summary split
|
||||
## Hugo-defined: automatic summary split
|
||||
|
||||
By default, Hugo automatically splits content after 70 words, with the content prior to the split being used for the content summary. This way you don't have to worry about content summary unless you want to customize it; the summary is automatically created for you, and available to be used by Hugo, without any additional work on your part.
|
||||
|
||||
## User defined summary split
|
||||
## User-defined: manual summary split:
|
||||
|
||||
Hugo also provides an easy way to customize a piece of content's split with its summary content divider: <code><!--more--></code>. If the summary content divider exists within a piece of content, Hugo will split the content at that point, instead of the default 70 words. The content prior to the summary content provider will be used as that content's summary. The summary content provider, <code><!--more--></code>, will be elided from the rendered content.
|
||||
Hugo also provides an easy way to customize where a piece of content will be split with its summary content divider: <code><!--more--></code>. The summary content divider is Hugo's version of a "more tag", "summary divider", "excerpt separator", etc. found in other systems. For the summary content divider to be valid, it most be entered as <code><!--more--></code>; with no additional spaces or other characters between the `<code>` and `</code>` tags.
|
||||
|
||||
If the summary content divider exists within a piece of content, Hugo will split the content at that point, instead of its default split point of 70 words. The content prior to the summary content provider will be used as that content's summary and the summary content divider will be replaces with a `Read More` link. When the full content is rendered, the summary content provider, <code><!--more--></code>, is elided from the output.
|
||||
|
||||
A primary benefit of using <code><!--more--></code> is that a user-defined summary split preserves all of the summary formatting.
|
||||
|
||||
The summary content divider only applies to the content that it appears in.
|
||||
|
|
Loading…
Reference in a new issue