Skip to content

Social share buttons on posts #32

Description

@nwwatson

Summary

Prose has Open Graph and Twitter meta tags for link previews but no share buttons on posts. Readers who want to share a post must manually copy the URL. Share buttons reduce friction and increase content distribution.

Who Has This

  • WordPress — Via plugins (Jetpack, AddThis, ShareThis)
  • Ghost — Built-in share buttons (varies by theme)

Why This Matters

Share buttons provide a frictionless way for readers to distribute content. While OG/Twitter meta tags ensure shared links look good, the share action itself requires manual effort without buttons. Even a simple "copy link" button helps.

Recommended Implementation

Share Targets

  • X/Twitterhttps://twitter.com/intent/tweet?url=URL&text=TITLE
  • LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=URL
  • Facebookhttps://www.facebook.com/sharer/sharer.php?u=URL
  • Copy link — Copy URL to clipboard with feedback
  • Native share — Use Web Share API (navigator.share) on mobile (progressive enhancement)
  • Emailmailto:?subject=TITLE&body=URL

Implementation

  1. Create a _share_buttons.html.erb partial
  2. Use simple anchor tags with share URLs (no JavaScript required for basic links)
  3. Add a Stimulus controller for "copy link" functionality
  4. Use Web Share API for mobile with fallback to individual buttons
  5. Position at the bottom of post content (before comments)
  6. Optionally add floating/sticky share bar on scroll

Design

  • Minimal, icon-based buttons (SVG icons, no external icon libraries)
  • Responsive — horizontal on desktop, compact on mobile
  • Match site's design language

Key Files to Create/Modify

  • app/views/posts/_share_buttons.html.erb
  • app/views/posts/show.html.erb — Include share partial
  • app/javascript/controllers/share_controller.js — Copy link + Web Share API
  • SVG icons for social platforms

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNet-new functionalitytier-2-mediumFeatures that improve competitiveness

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions