pmoreno-rodriguez / grav-theme-mundana

Mundana Jekyll theme ported to Grav
MIT License
7 stars 2 forks source link

Summary printed twice. #3

Closed ventoux84 closed 6 months ago

ventoux84 commented 6 months ago

Thanks for this theme that I'm trying to use. I can't see where I'm wrong, but on each article the summary is treated twice. Once in smaller type and then a second time with all the rest of the article text.

Can you please tell me how to avoid this? Thank you for your help.

El artículo que estoy probando Lorem ipsum dolor sit amet, consectetur adipiscing elit. … 12-03-24 15:34

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Sed convallis venenatis vehicula. Morbi ultrices finibus neque, ac vestibulum ante pharetra cursus. Nullam faucibus leo non dui porttitor, a sodales quam pharetra. Aliquam viverra, purus sit amet dictum rhoncus, sapien arcu vestibulum lacus, ac lobortis nunc dolor nec dui. Nullam cursus ligula at mi semper interdum. Donec id sapien ac justo pretium fringilla. Integer in sollicitudin turpis, a dignissim tellus. Nam ligula tortor, sagittis sit amet convallis eu, lacinia ut urna. Mauris volutpat metus at arcu ornare, vel sollicitudin sapien pulvinar. Ut efficitur ultricies ultricies. In efficitur felis enim, non mollis diam gravida nec. Phasellus odio risus, bibendum

I use TinyMCE Editor Integration v1.3.3 and the editor's window is only available in expert mode.
I also tried Telephasic. In the latter, TinyMCE Editor is available in standard mode and the summary is shown once.

pmoreno-rodriguez commented 6 months ago

The purpose of this summary is to be displayed after the title and subtitle, and before the image, date of the article and authors. The article will be shown later, but obviously, like everything in text, summary included. However, you can disable the summary on each blog page, in the blog article tab.

In this article you can find information on how to exclude the summary of the content of the page. Maybe in the next version I will implement this option in the theme.

ventoux84 commented 6 months ago

Thank you for these explanations. If I understand the logic of this feature, the summary is not a part of the article text as in the Telephasic theme, and in many others, but a separate text like a preface.

I'm going to adapt to this way of doing things. It's different but no worse .

ventoux84 commented 6 months ago

Please, where may I past the code ? In the article's text ?

{% set content = page.content|slice(page.summary|length) %}
{{ content|raw }}
pmoreno-rodriguez commented 6 months ago

Near line 68, replace {% page.content|raw %} with:

{% set content = page.content|slice(page.summary|length) %}
{{ content|raw }}

However, I am giving some thought to this behavior of the summary, because it does not convince me. In the next version, I will make some modifications to this.

ventoux84 commented 6 months ago

In the next version, I will make some modifications to this.

Thanks, I'll keep an eye on it.

In the meantime, I consider that the summary is quite a sub-title.

pmoreno-rodriguez commented 6 months ago

Please, test the latest version 1.1.0 to view new option to show summary on pages, indepent of summary in blog list items.

ventoux84 commented 6 months ago

Thank-you for that. I don't have time this morning, but i tested the new summary function. I see the parameter in the admin and thanks, it works fine. The page is displayed without the summary.

Now the summary can bee the start of the article.

ventoux84 commented 6 months ago

Now the summary can bee the start of the article.