Skip to content

Commit 5e6460f

Browse files
authored
Merge pull request alshedivat#2 from alshedivat/dev
Theme upgrade
2 parents 36e32cc + 8353ae6 commit 5e6460f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2109
-1025
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Maruan Al-Shedivat.
3+
Copyright (c) 2017 Maruan Al-Shedivat.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

+38-19
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
11
# al-folio
2+
3+
[![demo](https://img.shields.io/badge/theme-demo-brightgreen.svg)](https://alshedivat.github.io/al-folio/)
4+
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/alshedivat/al-folio/blob/master/LICENSE)
5+
26
A simple and clean [Jekyll](https://jekyllrb.com/) theme for academics.
37

4-
**al-folio** is based on [\*folio theme](https://github.com/bogoli/-folio).
5-
The original theme was published by [Lia Bogoev](http://liabogoev.com) and copyrighted under the MIT license.
8+
[![Screenshot](assets/img/full-screenshot.png)](https://alshedivat.github.io/al-folio/)
69

7-
## Features
10+
Originally, **al-folio** was based on the [\*folio theme](https://github.com/bogoli/-folio) (published by [Lia Bogoev](http://liabogoev.com) and under the MIT license).
11+
Since then, it got a full re-write of the styles and many additional cool features.
12+
The emphasis is on whitespace, transparency, and academic usage: [theme demo](https://alshedivat.github.io/al-folio/).
13+
14+
## Getting started
815

9-
Emphasis on whitespace, transparency, and academic usage: [theme demo](https://alshedivat.github.io/al-folio/).
16+
For more about how to use Jekyll, check out [this tutorial](https://www.taniarascia.com/make-a-static-website-with-jekyll/).
17+
Why Jekyll? Read this [blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/)!
1018

11-
To learn more on how to use Jekyll, you can refer to, e.g., [this tutorial](https://www.taniarascia.com/make-a-static-website-with-jekyll/).
12-
To know *why Jekyll*, you can read this [blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/).
19+
## Features
1320

14-
### Ergonomic Publications
21+
#### Ergonomic Publications
1522

1623
Your publications page is generated automatically from your BibTex bibliography.
1724
Simply edit `_bibliography/papers.bib`.
1825
You can also add new `*.bib` files and customize the look of your publications however you like by editing `_pages/publications.md`.
1926

2027
Keep meta-information about your co-authors in `_data/coauthors.yml` and Jekyll will insert links to their webpages automatically.
2128

22-
### Collections
29+
#### Collections
2330
This Jekyll theme implements collections to let you break up your work into categories.
24-
The example is divided into news, poetry, and projects, but easily revamp this into apps, short stories, courses, or whatever your creative work is.
25-
> To do this, edit the collections in the config file, create a corresponding folder, and update the portfolio and poetry source files.
31+
The example is divided into news and projects, but easily revamp this into apps, short stories, courses, or whatever your creative work is.
32+
33+
> To do this, edit the collections in the `_config.yml` file, create a corresponding folder, and create a landing page for your collection, similar to `_pages/projects.md`.
2634
27-
Three different layouts are includedthe poetry layout, for a simple list of entries, the blog layout (`blog/index.html`), for more detailed descriptive list of entries, and the portfolio layout.
35+
Two different layouts are included: the blog layout, for a list of detailed descriptive list of entries, and the projects layout.
2836
The projects layout overlays a descriptive hoverover on a background image.
2937
If no image is provided, the square is auto-filled with the chosen theme color.
3038
Thumbnail sizing is not necessary, as the grid crops images perfectly.
3139

32-
### Theming
40+
#### Theming
3341
Six beautiful theme colors have been selected to choose from.
34-
The default is purple, but quickly change it by editing the `_sass/base.scss` file in line 40.
35-
The color variable are listed there, as well.
42+
The default is purple, but quickly change it by editing `$theme-color` variable in the `_sass/variables.scss` file (line 72).
43+
Other color variables are listed there, as well.
3644

37-
### Photos
45+
#### Photos
3846
Photo formatting is made simple using rows of a 3-column system.
3947
Make photos 1/3, 2/3, or full width.
40-
Easily create beautiful grids within your blog posts and projects pages.
48+
Easily create beautiful grids within your blog posts and projects pages:
4149

42-
### Code Highlighting
50+
<p align="center">
51+
<a href="https://alshedivat.github.io/al-folio/projects/1_project/">
52+
<img src="assets/img/photos-screenshot.png" width="75%">
53+
</a>
54+
</p>
55+
56+
#### Code Highlighting
4357
This theme implements Jekyll's built in code syntax highlighting with Pygments.
44-
Just use a liquid tag to delineate your code:
45-
{% highlight python %} code code code {% endhighlight %}
58+
Just use the liquid tags `{% highlight python %}` and `{% endhighlight %}` to delineate your code:
59+
60+
<p align="center">
61+
<a href="https://alshedivat.github.io/al-folio/blog/2015/code/">
62+
<img src="assets/img/code-screenshot.png" width="75%">
63+
</a>
64+
</p>
4665

4766
## Contributing
4867

_config.yml

+36-20
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,56 @@
11
# -----------------------------------------------------------------------------
22
# Site settings
33
# -----------------------------------------------------------------------------
4-
54
name: Your Name
65
email: you@example.com
76
description: > # this means to ignore newlines until "url:"
87
A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design.
8+
footer_text: >
9+
Powered by <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme.
10+
Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>.
11+
Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
912
1013
url: # the base hostname & protocol for your site
1114
baseurl: /al-folio # the subpath of your site, e.g. /blog/
15+
last_updated: # leave blank if you don't want to display last updated
1216

13-
# Social
17+
# -----------------------------------------------------------------------------
18+
# Social integration
19+
# -----------------------------------------------------------------------------
1420
github_username: # put your github username
1521
twitter_username: # put your twitter username
1622
linkedin_username: # put your linkedin username
1723
scholar_authorid: # put your google scholar author id
1824
contact_note: >
1925
You can even add a little note about which of these is the best way to reach you.
2026
21-
# Footer text
22-
footer_text: >
23-
Powered by <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme.
24-
Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>.
25-
Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
26-
27+
# -----------------------------------------------------------------------------
2728
# Blog
29+
# -----------------------------------------------------------------------------
2830
blog_name: al-folio
29-
blog_description: simple whitespace theme for academics
31+
blog_description: a simple whitespace theme for academics
3032

33+
# Pagination
34+
paginate: 4
35+
permalink: /blog/:year/:title/
36+
paginate_path: /blog/page:num/
37+
38+
text:
39+
pagination:
40+
newer: 'Newer'
41+
older: 'Older'
42+
43+
# Comments
44+
disqus_shortname: al-folio # put your disqus shortname
45+
46+
# Optional features
47+
show_social_icons: false
48+
enable_anchorjs: false
49+
enable_katex: true
50+
51+
# -----------------------------------------------------------------------------
3152
# Collections
53+
# -----------------------------------------------------------------------------
3254
collections:
3355
news:
3456
defaults:
@@ -38,9 +60,8 @@ collections:
3860
projects:
3961
output: true
4062
permalink: /projects/:path/
41-
poetry:
42-
output: true
43-
permalink: /poetry/:path/
63+
64+
news_limit: 5
4465

4566
# -----------------------------------------------------------------------------
4667
# Jekyll settings
@@ -50,11 +71,6 @@ collections:
5071
markdown: kramdown
5172
highlighter: pygments
5273

53-
# Pagination
54-
paginate: 15
55-
permalink: /blog/:year/:title/
56-
paginate_path: /blog/page:num/
57-
5874
# Includes
5975
include: ['_pages']
6076

@@ -89,8 +105,8 @@ scholar:
89105
query: "@*"
90106

91107
# -----------------------------------------------------------------------------
92-
# Other advanced settings (don't touch if you are not sure)
108+
# Other settings
93109
# -----------------------------------------------------------------------------
94-
fontawesome_version: "4.6.3"
95110
jquery_version: "1.12.4"
96-
katex_version: "0.6.0"
111+
katex_version: "0.7.1"
112+
anchorjs_version: "3.2.2"

_includes/footer.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
<footer class="site-footer">
1+
<footer>
22

33
<div class="wrapper">
4-
<p class="small">
5-
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
6-
{{ site.footer_text }}</p>
4+
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
5+
{{ site.footer_text }}
6+
{% if site.last_updated %}
7+
Last updated: {{ site.last_updated }}.
8+
{% endif %}
79
</div>
810

911
</footer>

_includes/head.html

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<title>{{ site.name }}{% if page.title and page.url != "/" %} | {{ page.title }}{% endif %}</title>
77
<meta name="description" content="{{ site.description }}">
88

9+
<link rel="shortcut icon" href="{{ '/assets/img/favicon.ico' | prepend: site.baseurl | prepend: site.url }}">
10+
911
<link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl | prepend: site.url }}">
1012
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
1113
</head>

_includes/header.html

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
<div class="wrapper">
44

5+
{% if page.layout != "about" %}
6+
<span class="site-title">
7+
{% assign name = site.name | split: ' ' %}
8+
<strong>{{ name | first }}</strong> {{ name | last }}
9+
</span>
10+
{% endif %}
11+
512
<nav class="site-nav">
613

714
<div class="trigger">
@@ -18,6 +25,9 @@
1825
{% endif %}
1926
{% endfor %}
2027

28+
<!-- CV link -->
29+
<!-- <a class="page-link" href="{{ '/assets/pdf/CV.pdf' | prepend: site.baseurl | prepend: site.url }}">vitae</a> -->
30+
2131
</div>
2232
</nav>
2333

_includes/hemline.html

+22
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,33 @@
44
<!-- Load Common JS -->
55
<script src="{{ '/assets/js/common.js' | prepend: site.baseurl | prepend: site.url }}"></script>
66

7+
{% if site.enable_katex %}
78
<!-- Load KaTeX -->
89
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.css">
910
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.js"></script>
1011
<script src="{{ '/assets/js/katex.js' | prepend: site.baseurl | prepend: site.url }}"></script>
12+
{% endif %}
13+
14+
{% if site.enable_anchorjs %}
15+
<!-- Load Anchor JS -->
16+
<script src="//cdnjs.cloudflare.com/ajax/libs/anchor-js/{{ site.anchorjs_version }}/anchor.min.js"></script>
17+
<script>
18+
anchors.options.visible = 'always';
19+
anchors.add('article h2, article h3, article h4, article h5, article h6');
20+
</script>
21+
{% endif %}
1122

1223
<!-- Include custom icon fonts -->
1324
<link rel="stylesheet" href="{{ '/assets/css/font-awesome.min.css' | prepend: site.baseurl | prepend: site.url }}">
1425
<link rel="stylesheet" href="{{ '/assets/css/academicons.min.css' | prepend: site.baseurl | prepend: site.url }}">
26+
27+
<!-- Google Analytics -->
28+
<script>
29+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
30+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
31+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
32+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
33+
34+
ga('create', 'UA-XXXXXXXX-X', 'auto');
35+
ga('send', 'pageview');
36+
</script>

_includes/news.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<h2>news</h2>
33
{% if site.news %}
44
<table>
5-
{% for item in site.news reversed %}
5+
{% assign news = site.news | reverse %}
6+
{% for item in news limit: site.news_limit %}
67
<tr>
78
<td class="date">{{ item.date | date: "%b %-d, %Y" }}</td>
89
<td class="announcement">

_includes/pagination.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% if paginator.total_pages != 1 %}
2+
<div class="pagination clearfix mb1 mt4">
3+
<div class="left">
4+
{% if paginator.previous_page %}
5+
{% if paginator.page == 2 %}
6+
<a class="pagination-item" href="{{ site.baseurl }}/blog/">{{ site.text.pagination.newer }}</a>
7+
{% else %}
8+
<a class="pagination-item" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">{{ site.text.pagination.newer }}</a>
9+
{% endif %}
10+
{% else %}
11+
<span class="pagination-item disabled">{{ site.text.pagination.newer }}</span>
12+
{% endif %}
13+
</div>
14+
<div class="right">
15+
{% if paginator.next_page %}
16+
<a class="pagination-item" href="{{ paginator.next_page_path | prepend: site.baseurl }}">{{ site.text.pagination.older }}</a>
17+
{% else %}
18+
<span class="pagination-item disabled">{{ site.text.pagination.older }}</span>
19+
{% endif %}
20+
</div>
21+
<div class="pagination-meta">Page {{ paginator.page }} of {{ paginator.total_pages }}</div>
22+
</div>
23+
{% endif %}

_layouts/bib.html

+10-16
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
---
33

44
{% if entry.abbr %}
5-
<abbr>[{{entry.abbr}}]</abbr>
5+
{% if site.data.venues[entry.abbr] %}
6+
<abbr>[<a href="{{site.data.venues[entry.abbr].url}}" target="_blank">{{entry.abbr}}</a>]</abbr>
7+
{% else %}
8+
<abbr>[{{entry.abbr}}]</abbr>
9+
{% endif %}
610
{% endif %}
711

812
<div id="{{entry.key}}">
913
{% if entry.type == "thesis" %}
1014
{{reference}}
1115
{% else %}
12-
<span class="title">{{entry.title}}.</span>
16+
<span class="title">{{entry.title}}</span>
1317
<span class="author">
1418
{% for author in entry.author_array %}
1519
{% unless forloop.last %}
@@ -23,7 +27,7 @@
2327
{% endif %}
2428
{% endif %}
2529
{% else %}
26-
{% if entry.author_array.length > 1 %} and {% endif %}
30+
and
2731
{% if author.last == site.scholar.last_name %}
2832
<em>{{author.last}}, {{author.first}}</em>
2933
{% else %}
@@ -37,7 +41,6 @@
3741
{% endfor %}
3842
</span>
3943

40-
{% if entry.type != "book" %}
4144
<span class="periodical">
4245
{% if entry.type == "article" %}
4346
<em>{{entry.journal}}</em>
@@ -48,24 +51,15 @@
4851
{{entry.year}}
4952
{% endif %}
5053
</span>
51-
{% endif %}
52-
53-
{% if entry.type == "book" %}
54-
<span class="publisher">
55-
{% if entry.publisher %}
56-
<em>{{entry.publisher}}</em>
57-
{% endif %}
58-
{% if entry.year %}
59-
{{entry.year}}
60-
{% endif %}
61-
</span>
62-
{% endif %}
6354
{% endif %}
6455

6556
<span class="links">
6657
{% if entry.abstract %}
6758
[<a class="abstract">Abs</a>]
6859
{% endif %}
60+
{% if entry.arxiv %}
61+
[<a href="http://arxiv.org/abs/{{ entry.arxiv }}" target="_blank">arXiv</a>]
62+
{% endif %}
6963
{% if entry.html %}
7064
[<a href="{{ entry.html }}" target="_blank">HTML</a>]
7165
{% endif %}

_layouts/post.html

+15
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,19 @@ <h1 class="post-title">{{ page.title }}</h1>
1212
{{ content }}
1313
</article>
1414

15+
{% if site.disqus_shortname and page.comments %}
16+
<div id="disqus_thread"></div>
17+
<script type="text/javascript">
18+
var disqus_shortname = '{{ site.disqus_shortname }}';
19+
var disqus_identifier = '{{ page.id }}';
20+
var disqus_title = {{ page.title | jsonify }};
21+
(function() {
22+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
23+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
24+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
25+
})();
26+
</script>
27+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
28+
{% endif %}
29+
1530
</div>

0 commit comments

Comments
 (0)