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

Use Markdown Render Hooks for images and links #43

Closed
reuixiy opened this issue Dec 23, 2019 · 5 comments
Closed

Use Markdown Render Hooks for images and links #43

reuixiy opened this issue Dec 23, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@reuixiy
Copy link
Owner

reuixiy commented Dec 23, 2019

https://github.com/gohugoio/hugo/releases/tag/v0.62.0

@reuixiy reuixiy added the enhancement New feature or request label Dec 23, 2019
@reuixiy
Copy link
Owner Author

reuixiy commented Dec 23, 2019

Note that this is only supported with the Goldmark renderer.

https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks

So I will work on this once this issue and this issue related to goldmark is resolved.

@reuixiy
Copy link
Owner Author

reuixiy commented Jan 6, 2020

Annoying goldmark problems:

  1. Linkify extension
    1. https://example.com/中文 -> <a href="https://example.com/">https://example.com/</a>中文
    2. 中文:https://www.google.com -> 中文:https://www.google.com
  2. Typographer extension
    Apostrophes in contractions are not converted to right single quote yuin/goldmark#39

Solution for 1: use < and > to include URL, e.g. <https://example.com/中文>, 中文:<https://www.google.com>. Ref: yuin/goldmark#70 (comment)

@reuixiy
Copy link
Owner Author

reuixiy commented Jan 8, 2020

Currently, I have encountered some problems in Hugo Markdown Render Hooks, such as it won't append to the links that handled by auto link. So temporary I won't work on this until Hugo release a more stable version. And close this issue temporarily.

@dawnow
Copy link

dawnow commented Jan 10, 2020

昨天Hugo和Meme都更新到了最新,我也是遇到同样的问题,发现图片链接里面有空格就渲染不了,我还改链接改了一篇,上来一查,果然是hugo的问题,现在用开发者的方法就可以了,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants