Closed
Description
Description
The custom Reddit social sharing link example on the Layouts page of the documentation specifies to populate the url parameter with {{ page.url | relative_url }}
, which fails to populate the URL field in the popup window when implemented. If the interpolation syntax is replaced with the encoded absolute value: {{ page.url | absolute_url | url_encode }}
, as implemented in the theme default social-share.html file, the URL field will populate properly in the popup window.
<a href="https://www.reddit.com/submit?url={{ page.url | relative_url }}&title={{ page.title }}" class="btn" title="{{ site.data.ui-text[site.locale].share_on_label }} Reddit"><i class="fab fa-fw fa-reddit" aria-hidden="true"></i><span> Reddit</span></a>
Environment
- Minimal Mistakes version: 4.11.2
- Ruby gem or remote theme version: Remote theme
- Jekyll version: 3.7.3
- Git repository URL: https://github.com/troylindsay/troylindsay.github.io
- Operating system: Windows 10
- GitHub Pages hosted (if yes provide URL to site): https://www.troylindsay.io
Expected behavior
The URL field should be populated with the page URL in the share on Reddit popup window.
Steps to reproduce the behavior
- Create an override social-share.html file and populate it with the code found here page of the documentation.
<a href="https://www.reddit.com/submit?url={{ page.url | relative_url }}&title={{ page.title }}" class="btn" title="{{ site.data.ui-text[site.locale].share_on_label }} Reddit">
<i class="fab fa-fw fa-reddit" aria-hidden="true"></i><span> Reddit</span>
</a>
- Serve the site
- Navigate to a page with sharing enabled, and click on the Reddit link and the URL will not be populated.
Pull Request following momentarily.