-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Extend blockquote alerts to support Obsidian AlertTitle #12805
Comments
I guess this relates to #12801 ... This feature was added to support "GitHub syntax" which is pretty wide spread. My question for both of these issues are: How big/widespread is Obsidian. I just heard about it days ago, so I'm guessing it's a pretty new product. |
The first release was in March 2020 so it's not brand new. Other than that I can only answer with anecdotes that sum to "it seems quite popular". However, I think that this should be split into two issues.
If you want to make this issue the bug I can actually follow the contribution guidelines and start with a feature request on the forum to make a proposal. |
This needs to wait on #12801 - if that gets implemented, then this isn't a bug anymore. I'm not spending any time on a bug now if it becomes a feature tomorrow. |
I can see doing the work at the same time, but it's a different issue, isn't it? This bug affects |
Testing this, i see these variants:
So, I suggest we add:
Above rendered by GitHub
|
* Make the alert type parsing more flexible to support more types * Add `AlertTitle` and `AlertSign` (for folding) Note that GitHub will not render callouts with alert title/sign. See https://help.obsidian.md/Editing+and+formatting/Callouts Closes gohugoio#12805 Closes gohugoio#12801
* Make the alert type parsing more flexible to support more types * Add `AlertTitle` and `AlertSign` (for folding) Note that GitHub will not render callouts with alert title/sign. See https://help.obsidian.md/Editing+and+formatting/Callouts Closes gohugoio#12805 Closes gohugoio#12801
* Make the alert type parsing more flexible to support more types * Add `AlertTitle` and `AlertSign` (for folding) Note that GitHub will not render callouts with alert title/sign. See https://help.obsidian.md/Editing+and+formatting/Callouts Closes gohugoio#12805 Closes gohugoio#12801
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
In addition to custom alert typo (see #12801) it would also be nice to support Obsidian's callout titles too. At least enough for me to use a blockquote render hook to support it. As is, if this markdown is sent to the render hook:
The the text "Alerts are awesome" (the "title") is not passed to the render hook at all; it just vanishes. It would be great if the render hook got
.AlertTitle
or something so I could implement an alert with a title myself, even if the default was to do nothing with it (current behavior).However, the following illustrates how GitHub handles things.
Note
Title Test 2: I have no title
As you can see, GitHub doesn't even render the blockquote as an alert if there's a title. So maybe Hugo's current behavior should be considered a bug (feel free to change the tag to "bug" if you agree). If a title is present then Hugo shouldn't consider the blockquote to be an alert at all;
.AlertType
should be empty and.Text
should contain the entire contents of the blockquote. Fixing this would allow me to parse the title myself if I want to.The text was updated successfully, but these errors were encountered: