Merged
Conversation
rochacbruno
approved these changes
Oct 28, 2024
rochacbruno
reviewed
Oct 28, 2024
| <article class="content-list-item"> | ||
| <h2 class="content-title"><a href="./{{content.slug}}.html">{{ content.title | capitalize }}</a></h2> | ||
| <p class="content-excerpt">{{ content.html | striptags | truncate(length=100, end="...") }}</p> | ||
| <p class="content-excerpt">{{ content.html | striptags | truncate(length=100, end="...") | trim_start_matches(pat=content.title) }}</p> |
Owner
There was a problem hiding this comment.
I like it! simple solution that works! thanks
Contributor
Author
|
One question here ... Wouldn't be better to grab that description from a property on the .md file? Like title and date right now? And fallback for the content if no description is given? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix the bug raised by #84
I tryed to leave as a minimal change ... change could be done inside
site.rsbut was more convoluted given this would need to happen before Tera convert everything to html, but it would be problematic for the content. It would probably need a new property on the Struct just for that.Closes: