Skip to content

Commit

Permalink
Merge pull request barryclark#2 from alshedivat/dev
Browse files Browse the repository at this point in the history
Theme upgrade
  • Loading branch information
alshedivat authored May 27, 2017
2 parents 36e32cc + 8353ae6 commit 5e6460f
Show file tree
Hide file tree
Showing 84 changed files with 2,109 additions and 1,025 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Maruan Al-Shedivat.
Copyright (c) 2017 Maruan Al-Shedivat.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
57 changes: 38 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,67 @@
# al-folio

[![demo](https://img.shields.io/badge/theme-demo-brightgreen.svg)](https://alshedivat.github.io/al-folio/)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/alshedivat/al-folio/blob/master/LICENSE)

A simple and clean [Jekyll](https://jekyllrb.com/) theme for academics.

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

## Features
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).
Since then, it got a full re-write of the styles and many additional cool features.
The emphasis is on whitespace, transparency, and academic usage: [theme demo](https://alshedivat.github.io/al-folio/).

## Getting started

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

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/).
To know *why Jekyll*, you can read this [blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/).
## Features

### Ergonomic Publications
#### Ergonomic Publications

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

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

### Collections
#### Collections
This Jekyll theme implements collections to let you break up your work into categories.
The example is divided into news, poetry, and projects, but easily revamp this into apps, short stories, courses, or whatever your creative work is.
> To do this, edit the collections in the config file, create a corresponding folder, and update the portfolio and poetry source files.
The example is divided into news and projects, but easily revamp this into apps, short stories, courses, or whatever your creative work is.

> 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`.
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.
Two different layouts are included: the blog layout, for a list of detailed descriptive list of entries, and the projects layout.
The projects layout overlays a descriptive hoverover on a background image.
If no image is provided, the square is auto-filled with the chosen theme color.
Thumbnail sizing is not necessary, as the grid crops images perfectly.

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

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

### Code Highlighting
<p align="center">
<a href="https://alshedivat.github.io/al-folio/projects/1_project/">
<img src="assets/img/photos-screenshot.png" width="75%">
</a>
</p>

#### Code Highlighting
This theme implements Jekyll's built in code syntax highlighting with Pygments.
Just use a liquid tag to delineate your code:
{% highlight python %} code code code {% endhighlight %}
Just use the liquid tags `{% highlight python %}` and `{% endhighlight %}` to delineate your code:

<p align="center">
<a href="https://alshedivat.github.io/al-folio/blog/2015/code/">
<img src="assets/img/code-screenshot.png" width="75%">
</a>
</p>

## Contributing

Expand Down
56 changes: 36 additions & 20 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
# -----------------------------------------------------------------------------
# Site settings
# -----------------------------------------------------------------------------

name: Your Name
email: [email protected]
description: > # this means to ignore newlines until "url:"
A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design.
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
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
blog_description: a 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:
Expand All @@ -38,9 +60,8 @@ collections:
projects:
output: true
permalink: /projects/:path/
poetry:
output: true
permalink: /poetry/:path/

news_limit: 5

# -----------------------------------------------------------------------------
# Jekyll settings
Expand All @@ -50,11 +71,6 @@ collections:
markdown: kramdown
highlighter: pygments

# Pagination
paginate: 15
permalink: /blog/:year/:title/
paginate_path: /blog/page:num/

# Includes
include: ['_pages']

Expand Down Expand Up @@ -89,8 +105,8 @@ scholar:
query: "@*"

# -----------------------------------------------------------------------------
# Other advanced settings (don't touch if you are not sure)
# Other settings
# -----------------------------------------------------------------------------
fontawesome_version: "4.6.3"
jquery_version: "1.12.4"
katex_version: "0.6.0"
katex_version: "0.7.1"
anchorjs_version: "3.2.2"
10 changes: 6 additions & 4 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<footer class="site-footer">
<footer>

<div class="wrapper">
<p class="small">
© Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
{{ site.footer_text }}</p>
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
{{ site.footer_text }}
{% if site.last_updated %}
Last updated: {{ site.last_updated }}.
{% endif %}
</div>

</footer>
2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<title>{{ site.name }}{% if page.title and page.url != "/" %} | {{ page.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">

<link rel="shortcut icon" href="{{ '/assets/img/favicon.ico' | prepend: site.baseurl | prepend: site.url }}">

<link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl | prepend: site.url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
</head>
10 changes: 10 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

<div class="wrapper">

{% if page.layout != "about" %}
<span class="site-title">
{% assign name = site.name | split: ' ' %}
<strong>{{ name | first }}</strong> {{ name | last }}
</span>
{% endif %}

<nav class="site-nav">

<div class="trigger">
Expand All @@ -18,6 +25,9 @@
{% endif %}
{% endfor %}

<!-- CV link -->
<!-- <a class="page-link" href="{{ '/assets/pdf/CV.pdf' | prepend: site.baseurl | prepend: site.url }}">vitae</a> -->

</div>
</nav>

Expand Down
22 changes: 22 additions & 0 deletions _includes/hemline.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,33 @@
<!-- 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 }}">
<link rel="stylesheet" href="{{ '/assets/css/academicons.min.css' | prepend: site.baseurl | prepend: site.url }}">

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXXX-X', 'auto');
ga('send', 'pageview');
</script>
3 changes: 2 additions & 1 deletion _includes/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<h2>news</h2>
{% if site.news %}
<table>
{% for item in site.news reversed %}
{% assign news = site.news | reverse %}
{% for item in news limit: site.news_limit %}
<tr>
<td class="date">{{ item.date | date: "%b %-d, %Y" }}</td>
<td class="announcement">
Expand Down
23 changes: 23 additions & 0 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
@@ -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 %}
26 changes: 10 additions & 16 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
---

{% if entry.abbr %}
<abbr>[{{entry.abbr}}]</abbr>
{% if site.data.venues[entry.abbr] %}
<abbr>[<a href="{{site.data.venues[entry.abbr].url}}" target="_blank">{{entry.abbr}}</a>]</abbr>
{% else %}
<abbr>[{{entry.abbr}}]</abbr>
{% endif %}
{% endif %}

<div id="{{entry.key}}">
{% if entry.type == "thesis" %}
{{reference}}
{% else %}
<span class="title">{{entry.title}}.</span>
<span class="title">{{entry.title}}</span>
<span class="author">
{% for author in entry.author_array %}
{% unless forloop.last %}
Expand All @@ -23,7 +27,7 @@
{% endif %}
{% endif %}
{% else %}
{% if entry.author_array.length > 1 %} and {% endif %}
and
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>
{% else %}
Expand All @@ -37,7 +41,6 @@
{% endfor %}
</span>

{% if entry.type != "book" %}
<span class="periodical">
{% if entry.type == "article" %}
<em>{{entry.journal}}</em>
Expand All @@ -48,24 +51,15 @@
{{entry.year}}
{% endif %}
</span>
{% endif %}

{% if entry.type == "book" %}
<span class="publisher">
{% if entry.publisher %}
<em>{{entry.publisher}}</em>
{% endif %}
{% if entry.year %}
{{entry.year}}
{% endif %}
</span>
{% endif %}
{% endif %}

<span class="links">
{% if entry.abstract %}
[<a class="abstract">Abs</a>]
{% endif %}
{% if entry.arxiv %}
[<a href="http://arxiv.org/abs/{{ entry.arxiv }}" target="_blank">arXiv</a>]
{% endif %}
{% if entry.html %}
[<a href="{{ entry.html }}" target="_blank">HTML</a>]
{% endif %}
Expand Down
15 changes: 15 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,19 @@ <h1 class="post-title">{{ page.title }}</h1>
{{ 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>
Loading

0 comments on commit 5e6460f

Please sign in to comment.