Replies: 1 comment 1 reply
-
I for now manually made share buttons for my blog, which work but may not be for everyone. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One feature you can often find in blogs is share buttons that allow you to share the article on social media.
Such an option for the blog plugin would be of great use, as it would allow readers to more easily share a blog post on social media with the least amount of steps required (depending on the social media platform).
Configuration example
Placeholders:
(Placeholder values used in
link
would be URL Encoded){url}
- Returns the URL to the blog post.{title}
- Returns the title of the Blog post (prioritizingpage.meta.title
if set).{description}
- Returnspage.meta.description
or post excerpt.{author_<value>}
- Returns a matching<value>
from the post author in the.authors.yml
. In case of multiple authors would the first one be used (except{author_name}
where a comma-separated list could be returned?){tags}
- Returns comma-separated list of tags for the post.{categories}
Returns comma-separated list of categories for the post.Result
The result would be buttons added to the bottom of the blog post, or at the bottom of the author sidebar with the
icon
displayed.As an example, assume the post URL is
https://blog.example.com/2025/01-01-lorem-ipsum
and title isLorem Ipsum
.With the above shown configuration would the following HTML be generated and used:
Current alternatives
Extending the theme and manually adding those options, requiring extra maintenance for the user should the post template change. Also, the effective URL may not even be available nor may there be options to properly URL encode content.
Beta Was this translation helpful? Give feedback.
All reactions