lorisleiva / vuepress-plugin-seo

πŸ”Œ Generate SEO friendly meta header for every page
MIT License
107 stars 7 forks source link

[Feature Request] Rel canonical tags #2

Closed logicmason closed 4 years ago

logicmason commented 4 years ago

One common SEO concern for anyone syndicating their content is that their own site gets the credited for their articles (instead of Medium, Dev.to, etc)

The common pattern on those sites is to take this from the front matter. I.e., canonical_url: https://example.com/my-article in the front matter will result in the following being in the head of the published article: <link rel="canonical" href="https://example.com/my-article/" />

lorisleiva commented 4 years ago

Hi there πŸ‘‹

Thanks for raising this.

I'll try to implement something as soon as I've got some free time otherwise I wouldn't be opposed to a PR.

logicmason commented 4 years ago

Great! Sorry about not writing one. I would if I were more familiar with VuePress (and may yet at some point!)

Loris Leiva notifications@github.com ζ–Ό 2019εΉ΄12月18ζ—₯ ι€±δΈ‰ 上午1:00 ε―«ι“οΌš

Hi there πŸ‘‹

Thanks for raising this.

I'll try to implement something as soon as I've got some free time otherwise I wouldn't be opposed to a PR.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lorisleiva/vuepress-plugin-seo/issues/2?email_source=notifications&email_token=AABZ2FE4EMFCSKMVL54L553QZEASLA5CNFSM4J3HNMK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHDHFMY#issuecomment-566653619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZ2FA4RJJR3SP3KGSBRDLQZEASLANCNFSM4J3HNMKQ .

adarshmadrecha commented 4 years ago

Any plan to add canonical links meta tag? <link rel="canonical" href="https://example.com/my-article/" />

adarshmadrecha commented 4 years ago

Vuepress v1.7.0 added support for canonical links.

Just add below on top of any markdown file.

---
canonical: https://google.com
---

Reference: https://github.com/vuejs/vuepress/pull/2658