-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add showCanonicalLink to markdown metadata #428
Add showCanonicalLink to markdown metadata #428
Conversation
a92fded
to
9af81f8
Compare
I have fixed the above. ⚒️ |
@nikaera Doesn't really fit well on smaller screens. I would suggest this to be implemented, similar to how EditPost is implemented hugo-PaperMod/layouts/partials/edit_post.html Lines 1 to 8 in 408063b
That way, we can have the same feature but it will fit well on smaller screens as well as we won't need to add extra styling for it. |
9af81f8
to
3e793b9
Compare
@adityatelange Thank you for your comment! I used There was a change in the appearance as follows. ⬇️ I would appreciate your review. 🙏 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@nikaera I have made some changes to the code. Can you please check if everything is good? 😄 |
@adityatelange Wow, thank you so much! 👀😆 I have checked all the modifications and LGTM! 🙌 |
If an article has a `canonicalUrl` set, Originally published at `<hostname>` will be displayed at the top of the article by setting `showCanonicalLink` to true. Usage => In front-matter: canonicalUrl: "<URL>" showCanonicalLink: true
Thank you for making a great Hugo theme! I'm using your theme on my blog. 📝
I would like to display the URL of the original article, like DEV articles do, if
canonicalUrl
is set in the article metadata. Therefore, I added a new fieldshowCanonicalLink
to the metadata so that if an article has acanonicalUrl
set,Originally published at <hostname>
will be displayed at the top of the article by settingshowCanonicalLink
to true. 🌐The actual contents of the display are as follows. ⬇️
I submitted a pull request because I am using a custom template to achieve this functionality and figured I would use it often. I would appreciate it if you could take it in if you like. 🙏