protiumx / blogpub

Github action to publish your blog articles from Markdown to Medium or Dev.to
Apache License 2.0
30 stars 6 forks source link

Add support for canonical URL #23

Closed yonatankarp closed 1 year ago

yonatankarp commented 1 year ago

Description

As we're handling cross-posting here there is an SEO penalty that we have to pay, to avoid one (or both) of the published articles should have the canonical URL from the main published site.

Describe the solution you'd like

There should be a new optional flag with the canonical URL, and an option to set it to either one of both of the blogging systems (e.g. in my case my main system is hashnode)

A better option would be to select the main account, so if in the future there are more blog systems you can automatically set the canonical URL to all non-main accounts

Describe alternatives you've considered

At this moment the only alternative is to run the action in draft mode and manually alter the outcome after each post-publication

Additional context

protiumx commented 1 year ago

Hi @yonatankarp, I have introduced a new canonicalUrl config in https://github.com/protiumx/blogpub/releases/tag/v0.8.0.

A better option would be to select the main account, so if in the future there are more blog systems you can automatically set the canonical URL to all non-main accounts

It would be nice to support any forem based blog, but that would require a mayor change and I don't really have the time for it. Would love to see a PR for that