omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
13.88k stars 970 forks source link

FR: Respect certain markdown formatting in template (e.g. callouts) #3652

Closed FitzFrobozz closed 1 day ago

FitzFrobozz commented 8 months ago

There could be a way around this for all I know, but I'm noticing that {{{ content }}} placed inside a callout escapes the callout after the first paragraph break or so. (I.e. paragraphs after the first one insert lines between the callout (>) lines.

Would love to see support for that added, assuming it's possible, or get input on how I might work around/through the issue.

jacksonh commented 8 months ago

Hey, can you make a quick example of what output you are looking for?

jacksonh commented 8 months ago

I am thinking you want it on each line?

FitzFrobozz commented 8 months ago

I'll share a short version and a long version of what I'm looking for. (Prefer the long version but the short version would be my ideal.)

If I could implement this, I'd be super thrilled:

> [!multi-column|webclip] Web Clipping: {{{title}}} - {{{author}}} ({{{date_saved}}})
> 
>> [!webclip|webclipdetails wide-4] {{{title}}}
>> 
>> {{{ content }}}
>> 
>> ---
>> 
> 
>> [!webclip|webclipsidebar] Clipping Stuff
>> 
>> | | |
>> |:------------ |:------------ 
>> | Title | {{{title}}} |
>> | Author | {{{author}}} |
>> | Date saved | {{{dateSaved}}} |
>> | Date published | {{{datePublished}}} |
>> | Date archived | {{{dateArchived}}} |
>> | Word count | {{{wordsCount}}} |
>> | Site name | [{{{siteName}}}](originalUrl) |
>> | Category | {{{type}}} |
>> | Description | {{{description}}} |
>> | Reading status | {{{state}}} |

But in a pinch something a little simpler like this might work:

> [!webclip] Web Clipping: {{{title}}} - {{{author}}} ({{{date_saved}}})
> 
> {{{ content }}}
> 
> **Title:** {{{title}}}
> **Author:** {{{author}}}
> **Date saved:** {{{dateSaved}}}
> **Date published:** {{{datePublished}}}
> **Date archived:** {{{dateArchived}}}
> **Word count:** {{{wordsCount}}}
> **Site name:** [{{{siteName}}}](originalUrl)
> **Category:** {{{type}}}
> **Description:** {{{description}}}
> **Reading status:** {{{state}}}
jacksonh commented 8 months ago

Thanks yeah thats what i expected. the issue is content is not line delimited necessarily. Its probably possible with a more powerful templating language but not with mustache, you'd have to somehow pass the data into content to tell it to append to each line

FitzFrobozz commented 8 months ago

Ah, I figured it'd be something like that. Thanks for looking into it!