commit
4c6e6c721f
|
@ -170,7 +170,7 @@ impl Page {
|
||||||
permalinks,
|
permalinks,
|
||||||
anchor_insert
|
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.content = res.0;
|
||||||
self.toc = res.1;
|
self.toc = res.1;
|
||||||
if self.raw_content.contains("<!-- more -->") {
|
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
|
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
|
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).
|
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