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
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
name: Your Name
|
||||
email: you@example.com
|
||||
description: > # this means to ignore newlines until "url:"
|
||||
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
|
||||
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
|
||||
twitter_username: # put your twitter username
|
||||
linkedin_username: # put your linkedin username
|
||||
@ -19,17 +24,33 @@ scholar_authorid: # put your google scholar author id
|
||||
contact_note: >
|
||||
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_name: al-folio
|
||||
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:
|
||||
news:
|
||||
defaults:
|
||||
@ -43,7 +64,6 @@ collections:
|
||||
output: true
|
||||
permalink: /poetry/:path/
|
||||
|
||||
# Collection settings
|
||||
news_limit: 5
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -54,11 +74,6 @@ news_limit: 5
|
||||
markdown: kramdown
|
||||
highlighter: pygments
|
||||
|
||||
# Pagination
|
||||
paginate: 15
|
||||
permalink: /blog/:year/:title/
|
||||
paginate_path: /blog/page:num/
|
||||
|
||||
# Includes
|
||||
include: ['_pages']
|
||||
|
||||
@ -93,7 +108,8 @@ scholar:
|
||||
query: "@*"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Other advanced settings (don't touch if you are not sure)
|
||||
# Other settings
|
||||
# -----------------------------------------------------------------------------
|
||||
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">
|
||||
<p class="small">
|
||||
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
|
||||
{{ site.footer_text }}
|
||||
{% if site.last_updated %}
|
||||
Last updated: {{ site.last_updated }}.
|
||||
{% endif %}
|
||||
</p>
|
||||
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
|
||||
{{ site.footer_text }}
|
||||
{% if site.last_updated %}
|
||||
Last updated: {{ site.last_updated }}.
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -4,10 +4,21 @@
|
||||
<!-- Load Common JS -->
|
||||
<script src="{{ '/assets/js/common.js' | prepend: site.baseurl | prepend: site.url }}"></script>
|
||||
|
||||
{% if site.enable_katex %}
|
||||
<!-- Load KaTeX -->
|
||||
<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="{{ '/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 -->
|
||||
<link rel="stylesheet" href="{{ '/assets/css/font-awesome.min.css' | prepend: site.baseurl | prepend: site.url }}">
|
||||
|
23
_includes/pagination.html
Normal file
23
_includes/pagination.html
Normal file
@ -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 }}
|
||||
</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>
|
||||
|
@ -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.
|
||||
|
||||
<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 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 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 class="img_row">
|
||||
<img class="col two" src="/assets/img/8.jpg">
|
||||
<img class="col one" src="/assets/img/10.jpg">
|
||||
<img class="col two" src="{{ site.baseurl }}/assets/img/8.jpg">
|
||||
<img class="col one" src="{{ site.baseurl }}/assets/img/10.jpg">
|
||||
</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.
|
||||
|
||||
|
||||
<div class="img_row">
|
||||
<img class="col one" src="/assets/img/11.jpg">
|
||||
<img class="col one" src="/assets/img/12.jpg">
|
||||
<img class="col one" src="/assets/img/7.jpg">
|
||||
<img class="col one" src="{{ site.baseurl }}/assets/img/11.jpg">
|
||||
<img class="col one" src="{{ site.baseurl }}/assets/img/12.jpg">
|
||||
<img class="col one" src="{{ site.baseurl }}/assets/img/7.jpg">
|
||||
</div>
|
||||
|
@ -16,20 +16,20 @@ Produces something like this:
|
||||
|
||||
int main(int argc, char const \*argv[])
|
||||
{
|
||||
string myString;
|
||||
string myString;
|
||||
|
||||
cout << "input a string: ";
|
||||
getline(cin, myString);
|
||||
int length = myString.length();
|
||||
cout << "input a string: ";
|
||||
getline(cin, myString);
|
||||
int length = myString.length();
|
||||
|
||||
char charArray = new char * [length];
|
||||
char charArray = new char * [length];
|
||||
|
||||
charArray = myString;
|
||||
for(int i = 0; i < length; ++i){
|
||||
cout << charArray[i] << " ";
|
||||
}
|
||||
charArray = myString;
|
||||
for(int i = 0; i < length; ++i){
|
||||
cout << charArray[i] << " ";
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
@ -12,13 +12,15 @@ layout: default
|
||||
|
||||
|
||||
<ul class="post-list">
|
||||
{% for post in paginator.posts %}
|
||||
<li>
|
||||
<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>{{ post.description }}</p>
|
||||
<br/>
|
||||
<hr/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for post in paginator.posts %}
|
||||
<li>
|
||||
<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>{{ post.description }}</p>
|
||||
<br/>
|
||||
<hr/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% include pagination.html %}
|
||||
|
Loading…
Reference in New Issue
Block a user