hbz / lobid-blog

The source for the lobid blog at https://blog.lobid.org
http://blog.lobid.org/
3 stars 2 forks source link

Set canonical links to SkoHub blog for all SkoHub posts #78

Closed acka47 closed 2 years ago

acka47 commented 2 years ago

With the SkoHub blog being set up, we need to add a <link rel="canonical"> link in the HTML <head>, see https://github.com/skohub-io/skohub-blog/issues/1#issuecomment-871990377.

I am not sure how to best do this with Jekyll. Maybe we can do it by adjusting this:

https://github.com/hbz/lobid-blog/blob/74864ef9b7ac6ad213b493724b7f37ffed4746bc/_layouts/default.html#L9

(The idea came to me when seeing https://gist.github.com/bennylope/1894706#gistcomment-2821633 but am not familiar with Jekyll.)

acka47 commented 2 years ago

I'll follow this post: https://www.emgoto.com/jekyll-add-canonical-url/ see also the jekyll-seo-tag plugin.