Add DISQUS and fix pagination
This commit is contained in:
parent
8b05f3a413
commit
4bbccc3d8c
50
_config.yml
50
_config.yml
|
|
@ -1,17 +1,22 @@
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Site settings
|
# Site settings
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
name: Your Name
|
name: Your Name
|
||||||
email: you@example.com
|
email: you@example.com
|
||||||
description: > # this means to ignore newlines until "url:"
|
description: > # this means to ignore newlines until "url:"
|
||||||
A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design.
|
A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design.
|
||||||
last_updated:
|
footer_text: >
|
||||||
|
Powered by <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme.
|
||||||
|
Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>.
|
||||||
|
Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
|
||||||
|
|
||||||
url: # the base hostname & protocol for your site
|
url: # the base hostname & protocol for your site
|
||||||
baseurl: /al-folio # the subpath of your site, e.g. /blog/
|
baseurl: /al-folio # the subpath of your site, e.g. /blog/
|
||||||
|
last_updated: # leave blank if you don't want to display last updated
|
||||||
|
|
||||||
# Social
|
# -----------------------------------------------------------------------------
|
||||||
|
# Social integration
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
github_username: # put your github username
|
github_username: # put your github username
|
||||||
twitter_username: # put your twitter username
|
twitter_username: # put your twitter username
|
||||||
linkedin_username: # put your linkedin username
|
linkedin_username: # put your linkedin username
|
||||||
|
|
@ -19,17 +24,33 @@ scholar_authorid: # put your google scholar author id
|
||||||
contact_note: >
|
contact_note: >
|
||||||
You can even add a little note about which of these is the best way to reach you.
|
You can even add a little note about which of these is the best way to reach you.
|
||||||
|
|
||||||
# Footer text
|
# -----------------------------------------------------------------------------
|
||||||
footer_text: >
|
|
||||||
Powered by <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme.
|
|
||||||
Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>.
|
|
||||||
Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
|
|
||||||
|
|
||||||
# Blog
|
# Blog
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
blog_name: al-folio
|
blog_name: al-folio
|
||||||
blog_description: simple whitespace theme for academics
|
blog_description: simple whitespace theme for academics
|
||||||
|
|
||||||
|
# Pagination
|
||||||
|
paginate: 4
|
||||||
|
permalink: /blog/:year/:title/
|
||||||
|
paginate_path: /blog/page:num/
|
||||||
|
|
||||||
|
text:
|
||||||
|
pagination:
|
||||||
|
newer: 'Newer'
|
||||||
|
older: 'Older'
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
disqus_shortname: al-folio # put your disqus shortname
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
show_social_icons: false
|
||||||
|
enable_anchorjs: false
|
||||||
|
enable_katex: true
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
# Collections
|
# Collections
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
collections:
|
collections:
|
||||||
news:
|
news:
|
||||||
defaults:
|
defaults:
|
||||||
|
|
@ -43,7 +64,6 @@ collections:
|
||||||
output: true
|
output: true
|
||||||
permalink: /poetry/:path/
|
permalink: /poetry/:path/
|
||||||
|
|
||||||
# Collection settings
|
|
||||||
news_limit: 5
|
news_limit: 5
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
@ -54,11 +74,6 @@ news_limit: 5
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
highlighter: pygments
|
highlighter: pygments
|
||||||
|
|
||||||
# Pagination
|
|
||||||
paginate: 15
|
|
||||||
permalink: /blog/:year/:title/
|
|
||||||
paginate_path: /blog/page:num/
|
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
include: ['_pages']
|
include: ['_pages']
|
||||||
|
|
||||||
|
|
@ -93,7 +108,8 @@ scholar:
|
||||||
query: "@*"
|
query: "@*"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Other advanced settings (don't touch if you are not sure)
|
# Other settings
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
jquery_version: "1.12.4"
|
jquery_version: "1.12.4"
|
||||||
katex_version: "0.7.0"
|
katex_version: "0.7.1"
|
||||||
|
anchorjs_version: "3.2.2"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
<footer class="site-footer">
|
<footer>
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<p class="small">
|
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
|
||||||
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
|
{{ site.footer_text }}
|
||||||
{{ site.footer_text }}
|
{% if site.last_updated %}
|
||||||
{% if site.last_updated %}
|
Last updated: {{ site.last_updated }}.
|
||||||
Last updated: {{ site.last_updated }}.
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,21 @@
|
||||||
<!-- Load Common JS -->
|
<!-- Load Common JS -->
|
||||||
<script src="{{ '/assets/js/common.js' | prepend: site.baseurl | prepend: site.url }}"></script>
|
<script src="{{ '/assets/js/common.js' | prepend: site.baseurl | prepend: site.url }}"></script>
|
||||||
|
|
||||||
|
{% if site.enable_katex %}
|
||||||
<!-- Load KaTeX -->
|
<!-- Load KaTeX -->
|
||||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.css">
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.css">
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.js"></script>
|
||||||
<script src="{{ '/assets/js/katex.js' | prepend: site.baseurl | prepend: site.url }}"></script>
|
<script src="{{ '/assets/js/katex.js' | prepend: site.baseurl | prepend: site.url }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.enable_anchorjs %}
|
||||||
|
<!-- Load Anchor JS -->
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/anchor-js/{{ site.anchorjs_version }}/anchor.min.js"></script>
|
||||||
|
<script>
|
||||||
|
anchors.options.visible = 'always';
|
||||||
|
anchors.add('article h2, article h3, article h4, article h5, article h6');
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Include custom icon fonts -->
|
<!-- Include custom icon fonts -->
|
||||||
<link rel="stylesheet" href="{{ '/assets/css/font-awesome.min.css' | prepend: site.baseurl | prepend: site.url }}">
|
<link rel="stylesheet" href="{{ '/assets/css/font-awesome.min.css' | prepend: site.baseurl | prepend: site.url }}">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{% if paginator.total_pages != 1 %}
|
||||||
|
<div class="pagination clearfix mb1 mt4">
|
||||||
|
<div class="left">
|
||||||
|
{% if paginator.previous_page %}
|
||||||
|
{% if paginator.page == 2 %}
|
||||||
|
<a class="pagination-item" href="{{ site.baseurl }}/blog/">{{ site.text.pagination.newer }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="pagination-item" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">{{ site.text.pagination.newer }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<span class="pagination-item disabled">{{ site.text.pagination.newer }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
{% if paginator.next_page %}
|
||||||
|
<a class="pagination-item" href="{{ paginator.next_page_path | prepend: site.baseurl }}">{{ site.text.pagination.older }}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="pagination-item disabled">{{ site.text.pagination.older }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="pagination-meta">Page {{ paginator.page }} of {{ paginator.total_pages }}</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
@ -12,4 +12,19 @@ layout: default
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
{% if site.disqus_shortname and page.comments %}
|
||||||
|
<div id="disqus_thread"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var disqus_shortname = '{{ site.disqus_shortname }}';
|
||||||
|
var disqus_identifier = '{{ page.id }}';
|
||||||
|
var disqus_title = {{ page.title | jsonify }};
|
||||||
|
(function() {
|
||||||
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||||
|
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||||
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,24 @@ description: this is what included images could look like
|
||||||
Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Fingerstache four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch.
|
Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Fingerstache four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch.
|
||||||
|
|
||||||
<div class="img_row">
|
<div class="img_row">
|
||||||
<img class="col three" src="/assets/img/9.jpg">
|
<img class="col three" src="{{ site.baseurl }}/assets/img/9.jpg">
|
||||||
</div>
|
</div>
|
||||||
<div class="img_row">
|
<div class="img_row">
|
||||||
<img class="col three" src="{{ site.baseurl }}/assets/img/9.jpg">
|
<img class="col three" src="{{ site.baseurl }}/assets/img/7.jpg">
|
||||||
</div>
|
</div>
|
||||||
<div class="col three caption">
|
<div class="col three caption">
|
||||||
A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all.
|
A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all.
|
||||||
</div>
|
</div>
|
||||||
<div class="img_row">
|
<div class="img_row">
|
||||||
<img class="col two" src="/assets/img/8.jpg">
|
<img class="col two" src="{{ site.baseurl }}/assets/img/8.jpg">
|
||||||
<img class="col one" src="/assets/img/10.jpg">
|
<img class="col one" src="{{ site.baseurl }}/assets/img/10.jpg">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Slow-carb four dollar toast Helvetica pop-up. Kale chips next level literally trust fund Pitchfork. Jean shorts Pinterest beard, farm-to-table irony craft beer swag tofu 8-bit Banksy. Quinoa forage fanny pack, pug hashtag Echo Park heirloom Schlitz tote bag artisan Neutra mumblecore 90's shabby chic raw denim.
|
Slow-carb four dollar toast Helvetica pop-up. Kale chips next level literally trust fund Pitchfork. Jean shorts Pinterest beard, farm-to-table irony craft beer swag tofu 8-bit Banksy. Quinoa forage fanny pack, pug hashtag Echo Park heirloom Schlitz tote bag artisan Neutra mumblecore 90's shabby chic raw denim.
|
||||||
|
|
||||||
|
|
||||||
<div class="img_row">
|
<div class="img_row">
|
||||||
<img class="col one" src="/assets/img/11.jpg">
|
<img class="col one" src="{{ site.baseurl }}/assets/img/11.jpg">
|
||||||
<img class="col one" src="/assets/img/12.jpg">
|
<img class="col one" src="{{ site.baseurl }}/assets/img/12.jpg">
|
||||||
<img class="col one" src="/assets/img/7.jpg">
|
<img class="col one" src="{{ site.baseurl }}/assets/img/7.jpg">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,20 @@ Produces something like this:
|
||||||
|
|
||||||
int main(int argc, char const \*argv[])
|
int main(int argc, char const \*argv[])
|
||||||
{
|
{
|
||||||
string myString;
|
string myString;
|
||||||
|
|
||||||
cout << "input a string: ";
|
cout << "input a string: ";
|
||||||
getline(cin, myString);
|
getline(cin, myString);
|
||||||
int length = myString.length();
|
int length = myString.length();
|
||||||
|
|
||||||
char charArray = new char * [length];
|
char charArray = new char * [length];
|
||||||
|
|
||||||
charArray = myString;
|
charArray = myString;
|
||||||
for(int i = 0; i < length; ++i){
|
for(int i = 0; i < length; ++i){
|
||||||
cout << charArray[i] << " ";
|
cout << charArray[i] << " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,15 @@ layout: default
|
||||||
|
|
||||||
|
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{% for post in paginator.posts %}
|
{% for post in paginator.posts %}
|
||||||
<li>
|
<li>
|
||||||
<h2><a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
|
<h2><a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
|
||||||
<p class="post-meta">{{ post.date | date: '%B %-d, %Y — %H:%M' }}</p>
|
<p class="post-meta">{{ post.date | date: '%B %-d, %Y — %H:%M' }}</p>
|
||||||
<p>{{ post.description }}</p>
|
<p>{{ post.description }}</p>
|
||||||
<br/>
|
<br/>
|
||||||
<hr/>
|
<hr/>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{% include pagination.html %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue