lorisleiva / vuepress-plugin-seo

🔌 Generate SEO friendly meta header for every page
MIT License
106 stars 7 forks source link

MINOR: allowing for absolute URLs as images #4

Closed spekulatius closed 4 years ago

spekulatius commented 4 years ago

Hello @lorisleiva

thank you for providing this neat helper! Saves me a tone of time! I've noticed an undesirable behaviour I would suggest to fix:

My site has the domain in the theme set ($site.themeConfig.domain) and uses absolute URLs for image (e.g. https://api.imageee.com/bold?text=Launching%20in%20five%20minutes%20on%20Owwly&bg_image=https://wheretopost.email/images/owwly/owwly.png). This leads to the domain being prefixed:

image

You can find the bug in this commit: https://github.com/spekulatius/wheretopost.email/commit/9d5cdc40ef416338ddcb570a276192da1f29fbf5 on my open-sourced website.

The suggested change fixes this by checking if an absolute URL is given. Would be great if you could let me know if this something you would like to merge :)

Peter

lorisleiva commented 4 years ago

Hi there 👋

Well spotted! Thank you for your contribution. 🙂

🍻

spekulatius commented 4 years ago

Awesome, thank you for merging it in!