-
Notifications
You must be signed in to change notification settings - Fork 0
Social sharing links #12
Copy link
Copy link
Open
Labels
contentMarkdown rendering, frontmatter, content pipelineMarkdown rendering, frontmatter, content pipelineenhancementNew feature or requestNew feature or requestthemesTheme templates, CSS, JS, visual designTheme templates, CSS, JS, visual design
Milestone
Metadata
Metadata
Assignees
Labels
contentMarkdown rendering, frontmatter, content pipelineMarkdown rendering, frontmatter, content pipelineenhancementNew feature or requestNew feature or requestthemesTheme templates, CSS, JS, visual designTheme templates, CSS, JS, visual design
Summary
Add social sharing buttons to posts so readers can easily share content.
Features
Share Links
Generate share URLs for popular platforms:
https://twitter.com/intent/tweet?url={url}&text={title}https://www.linkedin.com/sharing/share-offsite/?url={url}https://www.facebook.com/sharer/sharer.php?u={url}https://reddit.com/submit?url={url}&title={title}https://news.ycombinator.com/submitlink?u={url}&t={title}mailto:?subject={title}&body={url}Implementation Options
Option A: Template Helper
Jinja2 filter or macro:
{% for platform, url in post | share_urls(site.url) %} <a href="{{ url }}" target="_blank" rel="noopener">{{ platform }}</a> {% endfor %}Option B: Direct in Template
Styling
Privacy Considerations
rel="noopener noreferrer"to links