Add social sharing buttons to article pages #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Articles have no social sharing buttons. Readers who find a guide useful have no quick way to share it on:
Implementation:
Implemented in commit
37e01ea.ShareBar component at
src/components/share-bar.tsx:twitter.com/intent/tweet?text=...&url=...facebook.com/sharer/sharer.php?u=...reddit.com/submit?url=...&title=...pinterest.com/pin/create/button/?url=...&description=...&media=...(passes hero image)wa.me/?text=...navigator.clipboard.writeText()with 2s "Copied!" feedbackAll links open in new tab (
target="_blank" rel="noopener noreferrer"). Inline SVG icons match the existing design system (btn-outline btn-ghost style, same as ArticleFeedback).Wired into the article page route at
src/routes/articles/[slug]/index.tsxjust below<ArticleBody>and above the in-article<AdSlot>.