Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Add option to disable social share links site-wide #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: Describe your website here.
disqus_shortname:
reading_time: true
words_per_minute: 200
share: true # turn social share links on/off site-wide
# Your site's domain goes here (eg: https://mmistakes.github.io, http://yourdomain.com, etc)
# When testing locally leave blank or use http://localhost:4000
url:
Expand Down Expand Up @@ -62,6 +63,14 @@ kramdown:
toc_levels: 1..6
enable_coderay: false

defaults:
-
scope:
path: ""
type: "posts"
values:
share: true # turn on social links by default

include:
- .htaccess
exclude:
Expand Down
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 class="entry-title">{{ page.title }}</h1>
<footer class="entry-meta">
{% if page.modified %}<span>Updated on <span class="entry-date date published updated"><time datetime="{{ page.modified }}">{{ page.modified | date: "%B %d, %Y" }}</time></span></span>
<span class="author vcard"><span class="fn">{{ site.owner.name }}</span></span>{% endif %}
{% if page.share != false %}{% include social-share.html %}{% endif %}
{% if site.share and page.share %}{% include social-share.html %}{% endif %}
</footer>
</div><!-- /.entry-content -->
{% if page.comments != false and site.disqus_shortname %}<section id="disqus_thread"></section><!-- /#disqus_thread -->{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2><span class="entry-date date published"><time datetime="{{ page.date | date_
<span class="entry-tags">{% for tag in page.tags %}<a href="{{ site.url }}/tags/#{{ tag }}" title="Pages tagged {{ tag }}" class="tag"><span class="term">{{ tag }}</span></a>{% unless forloop.last %}{% endunless %}{% endfor %}</span>
{% if page.modified %}<span>Updated on <span class="entry-date date updated"><time datetime="{{ page.modified }}">{{ page.modified | date: "%B %d, %Y" }}</time></span></span>
<span class="author vcard"><span class="fn">{{ site.owner.name }}</span></span>{% endif %}
{% if page.share != false %}{% include social-share.html %}{% endif %}
{% if site.share and page.share %}{% include social-share.html %}{% endif %}
</footer>
</div><!-- /.entry-content -->
{% if page.comments != false and site.disqus_shortname %}<section id="disqus_thread"></section><!-- /#disqus_thread -->{% endif %}
Expand Down