Marked 2 uses Bear note identifier as %title for PDF export
I need to use the note title (the first H1 in the Bear note) in the header. Unfortunately, Marked 2 (Setapp edition) is using the Bear note identifier (a random string of characters & numbers) instead of the title.
The only work-around I can see is to manually enter the title into the Marked header preferences for each doc I want to export.
Is there a setting I'm missing, or can this be fixed in the next version of Marked?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 09 Apr, 2019 07:11 PM
Is Bear exporting metadata with the note? If no title meta is provided,
it should technically be using the first H1 anyway.
-Brett
2 Posted by robinlandy on 09 Apr, 2019 07:45 PM
The 'Keep tags during export' is [on] in the Bear preferences. There's no Bear preference (afaik) for toggling export metadata.
I'm using Bear's native integration with Marked via the Bear Menubar: Note > Preview in Marked
Support Staff 3 Posted by Brett on 09 Apr, 2019 07:53 PM
I'll have to look into this further. You do have the option of adding a
line at the top of the file to force the title for a note:
title: Title of Note
-Brett
4 Posted by robinlandy on 09 Apr, 2019 08:04 PM
I tried using that - but it doesn't appear to make a difference (see attached screenshot)
Also, note that Bear forces the use of category tags in each note (in this example #blog) as a filing method. (See: https://bear.app/faq/Tags%20&%20Linking/Nested%20Tags/)
Is it possible to add Bear-specific setting to Marked to ignore category tags so that that they don't appear in Marked?
Support Staff 5 Posted by Brett on 09 Apr, 2019 08:42 PM
How would I ever determine what was a category tag and what was a
headline?
-Brett
Support Staff 6 Posted by Brett on 09 Apr, 2019 08:43 PM
In your screenshot you show "title: Title" inside the h1. To work as
Meta it has to come before the h1, at the very top of the note. Maybe
that's not even possible with Bear…
-Brett
7 Posted by robinlandy on 10 Apr, 2019 10:36 AM
Although it's not Bear's default behaviour, it is possible to insert a line before the first H1. However, this seems to result in a completely blank preview in Marked (i.e. the entire content of the Bear note is missing) and the Marked title is still the note ID, rather than the title.
Screenshot attached: blank Marked window next to the Bear note with a title line inserted before first H1
Support Staff 8 Posted by Brett on 10 Apr, 2019 11:09 AM
I'll have to dig in and see exactly what Markdown Bear is producing.
- Brett
Support Staff 9 Posted by Brett on 10 Apr, 2019 04:17 PM
So I tested with the metadata and it actually seems to work fine. You need to make sure there's no formatting, that it's the very first line, and that it's followed by a blank line. Also note that this will only work if using the MultiMarkdown processor.
As far as using the first H1 as the title, it's something I'd considered in the past but haven't implemented. I think it's a good idea, though, so hopefully I'll be able to incorporate it into a future update.
Support Staff 10 Posted by Brett on 10 Apr, 2019 04:21 PM
Actually, I take it back about MultiMarkdown. I'd forgotten that I actually incorporated handling for that with Discount (GFM) as well. The difference is that the metadata will also show up in your document, but you can use HTML comments to hide it, e.g.
-Brett
11 Posted by robinlandy on 10 Apr, 2019 04:36 PM
Thanks for your help with this. Yes - I've got it working now too with your instructions. I think the blank line was the missing ingredient (Note: if I omit the blank line, then Marked still shows a completely empty preview)
Using first H1 as %title would be a great feature.
Support Staff 12 Posted by Brett on 10 Apr, 2019 04:42 PM
Yeah, without the blank line it basically considers everything following
it to be part of the metadata. Which would lead to a really messed up
title :).
-Brett