mirror of https://github.com/luizdepra/hugo-coder.git

Kemal Akkoyun
13.14.2023 44fdec2a2291128162f1bfcc6d4ed47ba97f633f
refs
author Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Thursday, July 13, 2023 14:14 +0200
committer GitHub <noreply@github.com>
Thursday, July 13, 2023 14:14 +0200
commit44fdec2a2291128162f1bfcc6d4ed47ba97f633f
tree 6d5713915c9dfc18afbd3006943caffc72513636 tree | zip | gz
parent 8e511854538e10067f9d42cd5308b6910abe0f99 view | diff
Utilize canonical URLs if specified in front matter (#827)

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

### Prerequisites

Put an `x` into the box(es) that apply:

- [ ] This pull request fixes a bug.
- [x] This pull request adds a feature.
- [ ] This pull request introduces breaking change.

### Description

To prevent hurting the SEO when a blog post re-posted, it's recommended
to use canonical URL tags.
This PR updates the concerning metatag if `canonicalUrl` specified in
front matter.

See working example:
- https://kakkoyun.me/posts/fantastic-symbols-and-where-to-find-them
-
https://github.com/kakkoyun/me/blob/master/content/posts/fantastic-symbols-and-where-to-find-them.md

### Checklist

Put an `x` into the box(es) that apply:

#### General

- [x] Describe what changes are being made
- [x] Explain why and how the changes were necessary and implemented
respectively
- [ ] Reference issue with `#<ISSUE_NO>` if applicable

#### Resources

- [ ] If you have changed any SCSS code, run `make release` to
regenerate all CSS files

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already

---------

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
3 files modified
30 ■■■■■ changed files
CONTRIBUTORS.md 3 ●●●● diff | view | raw | blame | history
docs/configurations.md 23 ●●●● diff | view | raw | blame | history
layouts/partials/head.html 4 ●●● diff | view | raw | blame | history