rochacbruno / marmite

Markdown makes sites - A Static Site Generator for Blogs
https://rochacbruno.github.io/marmite/
GNU Affero General Public License v3.0
340 stars 19 forks source link

Repeated title annoyance #92

Closed rdenadai closed 4 days ago

rdenadai commented 4 days ago

Sorry, had to open a small fix for this ... I added the trim_start_matches at the end of the options, but probably would be better to become first and then truncate (just to keep the 100 chars correct).

Also, if you find it useful I create this branch which checks for a description field in the metadata of .md (just like title). I don't like because it needs to reprocess the html to get the description.

But ... https://github.com/rochacbruno/marmite/compare/main...rdenadai:repeated-title-annoyance-complex?expand=1

rochacbruno commented 4 days ago

Regarding the description, it can be added as an optional field to the content Option, if not defined it is None.

On template we can check for description, or if None, use the current approach of taking the excerpt.

We can move that to a template macro if becomes too complex.

Some SSGs also have the concept of stop marks

# Title 

This is the description of the content,

<-- more -->

Content continues.

Then on processing it splits the part before the marker to ahow on the home page.

rdenadai commented 4 days ago

Ok, cool ... I'll fix the branch to follow the approach you comment.