Skip to content
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

Adding a render hook for blockquotes #7876

Closed
davidsneighbour opened this issue Oct 23, 2020 · 6 comments
Closed

Adding a render hook for blockquotes #7876

davidsneighbour opened this issue Oct 23, 2020 · 6 comments

Comments

@davidsneighbour
Copy link
Contributor

Short version: I propose to add a render hook for blockquote markup. Current Markdown just adds a blockquote tag around it, but I would like "better quotes" in my code.

Long version:

  • I have a shortcode currently that adds a blockquote with some extra formats: {{< quote source="link to the source" title="title for the source link" >}}quote{{</quote>}} will add some code with a cite element and in there a link to the source
  • Using remark and remark-lint-write-good will mark my shortcode as bad quite often because I am employing a "no passive voice" policy and people in quotes tend to talk a lot in passive voice.
  • I have to add manually <!--lint disable write-good--> brackets around these shortcoded quotes
  • using remark on a simple blockquote markdown line (> the quote) does not fail (seems like they already catch language by "others", but I can't add a link to the source.

Another workaround would be:

> The secret to creativity is knowing how to hide your sources. 
> -- <cite>[Albert Einstein][1]</cite>

[1]: http://www.quotedb.com/quotes/2112

but that introduces HTML into my markdown which I consider bad style too.

@maelle
Copy link

maelle commented Nov 30, 2020

Although I had not thought of blockquotes, this reminds me of my wondering about render hooks for all sorts of tags. https://discourse.gohugo.io/t/markdown-render-hooks-for-all-the-things/28782

@bep
Copy link
Member

bep commented Nov 30, 2020

I have said this before, but: we're not adding render hooks for "all sorts of tags", including blockquotes. Adding styles to tags needs another solution.

@bep bep closed this as completed Nov 30, 2020
@davidsneighbour
Copy link
Contributor Author

The cite element is not a style. It's a sub-element to demark the source of a blockquote. You closed this without reading the issue on top. There is no way to write a cite element with proper markdown and without adding HTML to the markdown.

@maelle
Copy link

maelle commented Nov 30, 2020

PS: yes I used the wrong word, tag, and created confusion sorry. 🙈

@bep
Copy link
Member

bep commented Nov 30, 2020

See #7548

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants