tale 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b6ae879a14e2dc5702fd39c8c9b783cad37a817
4
- data.tar.gz: faaf9866995fc0a3f379a63ccb6c8ce6be63710b
3
+ metadata.gz: c7964709f45961cad809940da1fbab905a2a1b75
4
+ data.tar.gz: d46e0497f398d5c476adc6a44be99197a5eef99d
5
5
  SHA512:
6
- metadata.gz: 9c91e365c86a563100123659dc1af78d7fb0ceaa9b1f6e740b9fb0eb500f942e3655021a75933579af2a4887b1720092336fa70afefca14f10993ace23da37fd
7
- data.tar.gz: 39de4c59ff11796dc10bd253e6ca52d94d246477b1af90b3468320ce671e2144a2bda4421dd747b5b082c907bd516e4e7772f957f8b7d1048120062831478ae9
6
+ metadata.gz: 6ab482cd0d28f9cfb49f69ead7d9a5ab5777b515cb9fa3e042aab2b2707d0c26b5860ceb40e872ebfdbf6102a20fd59b3613e77948d5df0ac9a9508508baff32
7
+ data.tar.gz: 925d6701a46aa1f4b1cb68e3982c5da5f0cf671a36565ece5fc5bb815db6d46613256081686ed506d31f4b60a7b8b321644a94899a161096bcaa75dec69f7414
data/README.md CHANGED
@@ -13,6 +13,7 @@ Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here
13
13
  - Syntax highlighting, with the help of Pygments
14
14
  - Markdown and HTML text formatting
15
15
  - Pagination of posts
16
+ - [Disqus comments (can be enabled if needed)](#enabling-comments)
16
17
 
17
18
  ## Installation
18
19
  There are 3 ways to install this theme
@@ -112,6 +113,15 @@ $ bundle exec jekyll serve
112
113
 
113
114
  And you're all set! Head over to http://127.0.0.1:4000/ to see your site in action.
114
115
 
116
+ ### Enabling Comments
117
+ Comments are disabled by default. To enable them, look for the following line in `_config.yml` and change `jekyll-tale` to your site's Disqus id.
118
+
119
+ ```yml
120
+ disqus: jekyll-tale
121
+ ```
122
+
123
+ Next, add `comments: true` to the YAML front matter of the posts which you would like to enable comments for.
124
+
115
125
  ## Contributing
116
126
  Found a bug or have a suggestion? Feel free to create an issue or make a pull request!
117
127
 
@@ -0,0 +1,11 @@
1
+ <!-- Start disqus -->
2
+ <script src="{{ "/assets/js/disqusLoader.js" | relative_url }}" /></script>
3
+ <div id="disqus_thread"><h3>Discussion and feedback</h3></div>
4
+ <div class="disqus"></div>
5
+ <script>
6
+ disqusLoader('.disqus', {
7
+ scriptUrl: 'https://{{ site.disqus }}.disqus.com/embed.js'
8
+ });
9
+ </script>
10
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
11
+ <!-- End disqus -->
data/_layouts/post.html CHANGED
@@ -21,9 +21,12 @@ layout: default
21
21
  <div class="post-line"></div>
22
22
 
23
23
  {{ content }}
24
-
25
24
  </div>
26
25
 
26
+ {% if page.comments %}
27
+ {% include disqus_comments.html %}
28
+ {% endif %}
29
+
27
30
  <div class="pagination">
28
31
  {% if page.next.url %}
29
32
  <a href="{{ page.next.url | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
@@ -33,4 +36,4 @@ layout: default
33
36
  {% endif %}
34
37
 
35
38
  <a href="#" class="top">Top</a>
36
- </div>
39
+ </div>
@@ -2,7 +2,7 @@
2
2
  &-item {
3
3
  border-bottom: 1px solid $grey-2;
4
4
  color: $default-color;
5
- display: inline-block;
5
+ display: block;
6
6
  padding: 2rem 0;
7
7
 
8
8
  &:hover .catalogue-line,
@@ -0,0 +1,10 @@
1
+ /*
2
+ disqusLoader.js v1.0
3
+ A JavaScript plugin for lazy-loading Disqus comments widget.
4
+ -
5
+ By Osvaldas Valutis, www.osvaldas.info
6
+ Available for use under the MIT License
7
+ */
8
+ (function(b,f,l){var r=function(a){a=a.getBoundingClientRect();return{top:a.top+f.body.scrollTop,left:a.left+f.body.scrollLeft}},t=function(a,c){var d=f.createElement("script");d.src=a;d.async=!0;d.setAttribute("data-timestamp",+new Date);d.addEventListener("load",function(){"function"===typeof c&&c()});(f.head||f.body).appendChild(d)};l=function(a,c){var d,e;return function(){var g=this,f=arguments,b=+new Date;d&&b<d+a?(clearTimeout(e),e=setTimeout(function(){d=b;c.apply(g,f)},a)):(d=b,c.apply(g,
9
+ f))}};var m=!1,n=!1,p=!1,k=!1,h="unloaded",e=!1,q=function(){if(!e||!f.body.contains(e)||"loaded"==e.disqusLoaderStatus)return!0;var a=b.pageYOffset,c=r(e).top;if(c-a>b.innerHeight*n||0<a-c-e.offsetHeight-b.innerHeight*n)return!0;(a=f.getElementById("disqus_thread"))&&a.removeAttribute("id");e.setAttribute("id","disqus_thread");e.disqusLoaderStatus="loaded";"loaded"==h?DISQUS.reset({reload:!0,config:p}):(b.disqus_config=p,"unloaded"==h&&(h="loading",t(k,function(){h="loaded"})))};b.addEventListener("scroll",
10
+ l(m,q));b.addEventListener("resize",l(m,q));b.disqusLoader=function(a,c){var d={laziness:1,throttle:250,scriptUrl:!1,disqusConfig:!1},b=c,g,h={};for(g in d)Object.prototype.hasOwnProperty.call(d,g)&&(h[g]=d[g]);for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(h[g]=b[g]);c=h;n=c.laziness+1;m=c.throttle;p=c.disqusConfig;k=!1===k?c.scriptUrl:k;e="string"===typeof a?f.querySelector(a):"number"===typeof a.length?a[0]:a;e.disqusLoaderStatus="unloaded";q()}})(window,document,0);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chester How
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-26 00:00:00.000000000 Z
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.12'
75
+ version: '2.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.12'
82
+ version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +104,7 @@ files:
104
104
  - LICENSE
105
105
  - README.md
106
106
  - _includes/analytics.html
107
+ - _includes/disqus_comments.html
107
108
  - _includes/footer.html
108
109
  - _includes/head.html
109
110
  - _includes/navigation.html
@@ -122,6 +123,7 @@ files:
122
123
  - assets/apple-touch-icon.png
123
124
  - assets/favicon-16x16.png
124
125
  - assets/favicon-32x32.png
126
+ - assets/js/disqusLoader.js
125
127
  - assets/main.scss
126
128
  homepage: https://github.com/chesterhow/tale
127
129
  licenses: