New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for "lead section" #503
Comments
As a workaround, one could use this class to show that part and hide the rest, with a bit of JS tweaking, but the main issue would still be performance. Phones won't deal with the large DOM easily. |
I have seen some define the value for the lead in the metadata header for the file, not saying it's ideal but it's one solution. |
Hi, I am using a simple trick, and maybe it works for you. I am using thymleaf for templating engine. I use a divider and than use substring funcion to show only first part of post as summary. In my posts I add a simple html comment like this . This is a divider between summery shown on posts index page and whole text that is shown on separate post page. In my posts index template i have than this:
I hope this helps. I banged my head how to solve this issue. |
Thanks for taking the time to share your solution @slavus |
On the index page(s), the template author can only use 1-line title, or the full content.
But it's a common practice to have lead section. Content authors then keep this in mind stylistically and treat the lead section as a bait for the reader.
This can be quite easily done - good markup languages support adding CSS classes to sections in some way. JBake could simply take the first
//div[@class='leadParagraph']|//section[@class='leadParagraph']|
and store it's inner HTML to an extra ODocument field.Example in Texy:
Would you like that?
The text was updated successfully, but these errors were encountered: