You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix broken "Share on LinkedIn" and "Copy Link" buttons on blog posts and blog list #305
When reading blog posts or browsing the blog list, the social share panel has buttons for X/Twitter, Facebook, LinkedIn, and a "Copy Link" button. However, the LinkedIn and Copy Link buttons do not work:
Share on LinkedIn: The button is hardcoded with href="#linkedinshare" instead of a LinkedIn sharing URL endpoint. There is no JavaScript handler for this ID, so clicking it just appends #linkedinshare to the browser URL hash without opening a LinkedIn share dialog.
Copy Link: The button has class="link link_yank" and links to the page URL, but there is no click handler attached to copy the URL to the clipboard. Clicking it just re-navigates/reloads the page instead of copying the link.
User Impact
Readers cannot share OSL blog posts directly to LinkedIn.
Users who click "Copy Link" expecting to copy the URL to their clipboard to share with others get an unnecessary page jump/reload, and nothing is copied.
Expected Behavior
Clicking the LinkedIn share button should open the LinkedIn sharing dialog (e.g. https://www.linkedin.com/sharing/share-offsite/?url=<canonical_url>) in a new tab.
Clicking the "Copy Link" button should copy the post's URL to the clipboard and provide visual feedback (e.g., changing the tooltip/text to "Copied!").
Relevant Code References
theme/blog-post.html (lines 61–66):
<ahref="#linkedinshare" id="linkedinshare" class="linkedin" title="Share on LinkedIn" rel="nofollow"><svgclass="icon" aria-hidden="true"><usexlink:href="#linkedin"/></svg></a><ahref="{{ page.canonical_url or url }}" title="Copy link" class="link link_yank"><svgclass="icon" aria-hidden="true"><usexlink:href="#copy"/></svg></a>
Activity