mirror of
https://github.com/getzola/zola
synced 2024-12-13 22:02:29 +00:00
commit
4c6e6c721f
2 changed files with 5 additions and 1 deletions
|
@ -170,7 +170,7 @@ impl Page {
|
|||
permalinks,
|
||||
anchor_insert
|
||||
);
|
||||
let res = markdown_to_html(&self.raw_content, &context)?;
|
||||
let res = markdown_to_html(&self.raw_content.replacen("<!-- more -->", "<a name=\"continue-reading\"></a>", 1), &context)?;
|
||||
self.content = res.0;
|
||||
self.toc = res.1;
|
||||
if self.raw_content.contains("<!-- more -->") {
|
||||
|
|
|
@ -77,3 +77,7 @@ paragraph of each page in a list for example.
|
|||
To do so, add `<!-- more -->` in your content at the point where you want the
|
||||
summary to end and the content up to that point will be also available separately
|
||||
in the [template](./documentation/templates/pages-sections.md#page-variables).
|
||||
|
||||
An anchor link to this position is created so you can link directly to it if needed
|
||||
for example:
|
||||
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`
|
||||
|
|
Loading…
Reference in a new issue