Refine "Continue Reading" link in the blog index page #6759
-
Hi! If I use the However, if I omit the What I'd like to be able to do in this second case is to either:
is that possible today with a sprinkling of jinja/partials, or is this something that might need code changes in the associated plugin? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hello @wez, mkdocs-material/material/templates/partials/post.html Lines 52 to 59 in a6286ef Also the <div class="md-post__content md-typeset">
{{ post.content }}
{% if config.plugins["material/blog"].config.post_excerpt_separator in post.post.content %}
<nav class="md-post__action">
<a href="{{ post.url | url }}">
{{ lang.t("blog.continue") }}
</a>
</nav>
{% endif %}
</div>
|
Beta Was this translation helpful? Give feedback.
Hello @wez,
yes you would have to modify the
partials/post.html
template, because you want the "Continue Reading" link to be dynamic based on if the<!-- more -->
is present. Currently it's always being printed, there is no configuration setting to change it:mkdocs-material/material/templates/partials/post.html
Lines 52 to 59 in a6286ef
Also the
post
in this template is actually anExcerpt
object. EachView
/Post
has anExcerpt
but there is no "flag" that keeps track …