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

Inconsistent link between MarkDown and HugoServer #14

Open
leemyongpakvn opened this issue Sep 23, 2022 · 1 comment
Open

Inconsistent link between MarkDown and HugoServer #14

leemyongpakvn opened this issue Sep 23, 2022 · 1 comment

Comments

@leemyongpakvn
Copy link

leemyongpakvn commented Sep 23, 2022

According to https://gohugo.io/content-management/urls/#pretty-urls, (since v0.12) Hugo's Pretty URL replace .md extension of source by a trailing slash / on target.
For example:
source https://github.com/PrestaShop/docs/blob/8.x/modules/concepts/hooks/use-hooks-on-modern-pages.md
becomes
target https://devdocs.prestashop-project.org/8/modules/concepts/hooks/use-hooks-on-modern-pages/
So if I have an image in the same folder of use-hooks-on-modern-pages.md file for example and use in .md source
like this ![Export XML action button](Catalog_Products_2xml.png), I can see the image in MarkDown preview.
But on Hugo target, the image link will become /Catalog_Products_2xml.png then disappears.
To solve this problem, we can use absolute path, or use ../Catalog_Products_2xml.png in .md source. It is really an annoyance because the absolute path is usually too long and not flexible, while ../ prefix make the image disappears in MarkDown preview.
I think we can try this solution truly portable Markdown links and images. It sounds great but I'm not familiar with Markdown Render Hooks 🙏

@rajnish254
Copy link

kindly Assign me that issue
Thanks

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

No branches or pull requests

2 participants