├── .gitignore
├── Gemfile
├── LICENSE.txt
├── README.md
├── _data
└── academic_i18n.yml
├── _includes
├── _i18n
│ ├── date.html
│ ├── i18n.html
│ ├── lang_selector.html
│ ├── last_modified_at.html
│ ├── link.html
│ └── sitetitle.html
├── _icons
│ ├── email.html
│ ├── email.svg
│ ├── file.html
│ ├── file.svg
│ ├── github.html
│ ├── github.svg
│ ├── keybase.html
│ ├── keybase.svg
│ ├── linkedin.html
│ ├── linkedin.svg
│ ├── rss.html
│ ├── rss.svg
│ ├── twitter.html
│ ├── twitter.svg
│ ├── website.html
│ └── website.svg
├── calltoaction.html
├── contactlist.html
├── footer.html
├── head.html
├── header.html
├── image.html
├── nav_menu.html
├── piwik.html
├── post-li.html
├── post-ul.html
└── sitemap-url.html
├── _layouts
├── about.html
├── archive.html
├── default.html
├── home.html
├── page.html
├── pagenotfound.html
├── post.html
└── sitemap.html
├── _sass
├── academic.scss
└── academic
│ ├── _base.scss
│ ├── _layout.scss
│ └── _syntax-highlighting.scss
├── academic.gemspec
├── assets
├── main.scss
└── opensans
│ ├── OpenSans-Bold.ttf
│ ├── OpenSans-Italic.ttf
│ └── OpenSans-Regular.ttf
├── screenshot.png
└── sitemaps.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | *.gem
2 | *.sh
3 | assets/img
4 | assets/favicons
5 | .bundle
6 | .sass-cache
7 | _site
8 | _posts
9 | _config.yml
10 | *.md
11 | !README.md
12 | Gemfile.lock
13 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | gemspec
3 | gem 'jekyll-feed'
4 | gem 'redcarpet'
5 |
6 | group :jekyll_plugins do
7 | gem 'jekyll-livereload'
8 | gem 'jekyll-last-modified-at'
9 | end
10 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 batlab
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # academic
2 |
3 | Academic is a [Jekyll](http://jekyllrb.com/) theme with a focus on simplicity, typography and flexibility.
4 | I originally designed it for my personal blog during my PhD thesis.
5 |
6 | Check out my [personal website](https://gaalcaras.com) or my [blog](https://sociologs.com) to get a better feel for the Academic theme.
7 |
8 | 
9 |
10 | **Simplicity**: both in design and configuration, Academic aims to let the writer and its readers focus on the content.
11 | Almost all of the theme configuration happens in the `_config.yml` file.
12 |
13 | **Typography**: the goal of Academic is to let the author write very long and detailed posts, while being kind to its readers' eyes.
14 |
15 | **Flexibility**: Academic can be used to generate different layouts while keeping the same look and feel.
16 | All features require you to *opt in*, which means that you can either use a very lean `_config.yml` or a very detailed one if you want to use more features.
17 |
18 | ---
19 |
20 | Table of contents:
21 |
22 |
23 | * [Features](#features)
24 | * [Installation](#installation)
25 | * [Usage](#usage)
26 | * [Change the brand color](#change-the-brand-color)
27 | * [Setup your `_config.yml` file](#setup-your-_config-yml-file)
28 | * [General settings](#general-settings)
29 | * [Author](#author)
30 | * [Navigation menu](#navigation-menu)
31 | * [Multilingual and i18n support](#multilingual-and-i18n-support)
32 | * [Plugins](#plugins)
33 | * [Layouts](#layouts)
34 | * [Post layout](#post-layout)
35 | * [Page layout](#page-layout)
36 | * [About layout](#about-layout)
37 | * [Archive layout](#archive-layout)
38 | * [404 layout](#404-layout)
39 | * [Sitemap layout](#sitemap-layout)
40 | * [Contributing](#contributing)
41 | * [Release log](#release-log)
42 | * [License](#license)
43 |
44 | ## Features
45 |
46 | + **Responsive design** on every page
47 | + Designed with **typography best practices** (and my own tastes) in mind:
48 | + Simple but elegant fonts, with modular scale
49 | + High contrast colors and backgrounds as much as possible ([read more](http://contrastrebellion.com/), [and more](https://backchannel.com/how-the-web-became-unreadable-a781ddc711b6))
50 | + Comfortable line length (around 66 characters, [read more](http://webtypography.net/2.1.2))
51 | + Attention to vertical rhythm, law of proximity and so on ([read more](http://typographyhandbook.com/))
52 | + If you'd like a **multilingual** website, Academic has basic **i18n** support (no plugin required):
53 | + *Supported languages* : English, French
54 | + Lang selector to change languages automatically added in header and footer
55 | + Basic SEO support for multilingual pages (sitemap and `
`)
56 | + Posts layout allows you to:
57 | + Add an **image thumbnail** and a **summary**
58 | + Use mathematical notations with **MathJax** (loaded only on posts)
59 | + **Tables and footnotes** styled by default (with the `redcarpet` markdown engine)
60 | + Add your name and a shortbio at the end of each post
61 | + Easily add a "call to action" (RSS feed, Twitter, etc.) at the end of each post and on your homepage
62 | + **Add a Creative Commons license** to your website directly from your `_config.yml` file
63 | + **Sitemap** and **404 page** layout
64 | + Piwik tracking
65 | + **About page** layout:
66 | + Responsive two-columns layout
67 | + Just fill out your usernames for Twitter, Github, LinkedIn, Keybase ; contact email or personal website ; link to your curriculum vitae.
68 | + Academic automatically loads your Github profile picture.
69 | + Choose between a **navigation menu** at the top or a **short pitch** for your blog
70 | + Navigation menu:
71 | + Hide pages from the navigation menu
72 | + Add external links in the menu from the `_config.yml` file
73 |
74 | ## Installation
75 |
76 | Add this line to your Jekyll site's Gemfile:
77 |
78 | ```ruby
79 | gem "academic"
80 | ```
81 |
82 | And add this line to your Jekyll site's `_config.yml`:
83 |
84 | ```yaml
85 | theme: academic
86 | ```
87 |
88 | And then execute:
89 |
90 | ```
91 | $ bundle
92 | ```
93 |
94 | Or install it yourself as:
95 |
96 | ```
97 | $ gem install academic
98 | ```
99 |
100 | Then add the `jekyll-data` plugin to your `Gemfile` ([see also](https://github.com/ashmaroli/jekyll-data#installation)):
101 |
102 | ```ruby
103 | group :jekyll_plugins do
104 | gem 'jekyll-data'
105 | end
106 | ```
107 |
108 | I suggest you install and use `redcarpet` to generate your markdown ([read more](http://jekyllrb.com/docs/configuration/#redcarpet)).
109 |
110 | ## Usage
111 |
112 | ### Change the brand color
113 |
114 | Academic uses 4 shades of grey (very dark grey for the main content, ligther greys to lessen the emphasis on some elements) and a single "brand" color.
115 |
116 | By default, the brand color is `#d33682` (purple). If it's not to your taste, you can easily change it by overriding the `$brand-color` variable in `/assets/styles.scss`.
117 |
118 | ```scss
119 | $brand-color: red;
120 | ```
121 |
122 | ### Setup your `_config.yml` file
123 |
124 | #### General settings
125 |
126 | `title_html`: [optional] you can style the title of your website with html elements.
127 |
128 | Example:
129 |
130 | ```html
131 | title_html: "helloworld"
132 | ```
133 |
134 | `pitch`: [optional] a small sentence or motto to quickly describe your blog. If no pitch is detected, Academic will fill the top bar with a navigation menu. If you want to display a short pitch in the top bar, Academic will put thput the navigation menu in the footer. Please note that `pitch` is only used in the top bar ; it is different from the `description` field (used in the footer and the meta tags for search engines).
135 |
136 | `description`: [recommended] short description for search engines. It's displayed in the footer of every page. Not to be confused with `pitch`.
137 |
138 | `cc`: [optional] choose among the [Creative Commons](https://creativecommons.org/licenses/) licenses (v4). Accepted values are : `by`, `by-sa`, `by-nd`, `by-nc`, `by-nc-sa`, `by-nc-nd`. Defining the `cc` variable will add a small sentence in the footer. If no value is given, a small copyright is added instead.
139 |
140 | `nb_posts_page`: [optional] number of posts to display on the homepage. By default, all posts are listed. Note that you should create a page with the archive layout.
141 |
142 | `archive_permalink`: [optional] permalink of the archive page. Set to `"/archive"` by default.
143 |
144 | `repo`: [optional] link to your website repo. If defined, it's added in the footer. Nothing is displayed otherwise.
145 |
146 | `piwik`: [optional]
147 |
148 | + `url`: [mandatory] URL of your Piwik Instance without a trailing slash (like `mywebsite.com/piwik`)
149 | + `site_id`: [mandatory] The ID of your website in your Piwik instance
150 |
151 | #### Author
152 |
153 | `email`: [optional] add email address in about layout.
154 |
155 | `curriculum`: [optional]
156 |
157 | + `name`: [optional] text of the link. Default : Curriculum Vitae.
158 | + `url`: [mandatory] url of the curriculum file.
159 |
160 | `shortbio`: [optional] describe yourself in a sentence or two. If `shortbio` is defined, a small element is added at the end of the post to introduce the author to the readers.
161 |
162 | `author_display`: [optional] if `true`, the author's name (and `author_website`) is added in the footer. `false` by default.
163 |
164 | `author_website`: [optional] url to the external website of the author. If `author_website` exists, it is added in the about layout and in the footer (if `author_display` is `true`).
165 |
166 | `twitter_username`: [optional] your Twitter username. If it exists, your account will be linked in the "call to action" boxes (homepage and posts), in the footer and on the about page.
167 |
168 | `github_username`: [optional] your Github username. If it exists, your account will be linked in the footer and on the about page.
169 |
170 | `keybase_username`: [optional] your Keybase username. If it exists, your account will be linked on the about page.
171 |
172 | `linkedin_username`: [optional] your LinkedIn username. If it exists, your account will be linked on the about page.
173 |
174 | #### Navigation menu
175 |
176 | `nav_ext_links`: [optional] you can choose to add external links in the top bar. Each item has two attributes:
177 |
178 | + `name`: [mandatory] text for the link
179 | + `url`: [mandatory] url
180 |
181 | Example:
182 |
183 | ```yaml
184 | nav_ext_links:
185 | - name: Link 1
186 | url: http://jupiterbroadcasting.com/
187 | - name: Link 2
188 | url: http://wallabag.org/
189 | ```
190 |
191 | #### Multilingual and i18n support
192 |
193 | Academic works perfectly well as a single language website.
194 | By default, Academic is in English.
195 | You can easily switch to another supported language :
196 |
197 | ```yaml
198 | langs: ["fr"]
199 | ```
200 |
201 | If you need to translate part of your pages or posts, Academic also supports basic i18n and multilingual features.
202 |
203 | To enable multilingual mode, just add the following to your `_config.yml`:
204 |
205 | ```yaml
206 | langs: ["fr", "en"]
207 | defaults:
208 | - scope:
209 | path: ""
210 | values:
211 | lang: "fr"
212 | ```
213 |
214 | The `langs` variable should be an array containing your languages.
215 | Important: the first item should be your "default" language (ie the language that you translate posts from or/and that has the largest content available).
216 | The double quotes around the language *do* matter.
217 |
218 | Don't forget to define a default lang for your whole website.
219 |
220 | If you want to translate some of the variables in your `_config.yml`, you can just do this:
221 |
222 | ```yaml
223 | title:
224 | fr: "Nom du site en Français"
225 | en: "English name of the website"
226 | ```
227 |
228 | Translating posts and pages is very easy.
229 | Let's say my default lang is `fr` and I want to translate `_posts/billet-au-hasard.md` to English.
230 |
231 | ```yaml
232 | ---
233 | layout: post
234 | title: "Billet au hasard"
235 | permalink: /fr/billet-au-hasard/
236 | date: 2017-02-14 15:32:29 +0100
237 | ---
238 | ```
239 |
240 | First, I'll create a new file named `_posts/billet-au-hasard.en.md`.
241 | Both files have to share the *exact same name before the first extension* (`.md` or `.en.md`) in order to signal to Academic that these posts are translations of eachother.
242 |
243 | Then, in `_posts/billet-au-hasard.en.md`, add the lang and change the permalink in your frontmatter:
244 |
245 | ```yaml
246 | layout: post
247 | title: "Random post"
248 | permalink: /en/random-post
249 | date: 2017-02-14 15:32:29 +0100
250 | lang: en
251 | ```
252 |
253 | That's it!
254 | Academic will handle the lang selector and will add `` to the `` section to improve SEO.
255 |
256 | Note that you have to handle the permalinks manually.
257 | I recommend that you use the subdirectory `/lang/` naming convention everywhere, as exemplified above.
258 | You should at least take care of your homepage URL.
259 |
260 | If you'd like Academic to support more languages, please contribute by adding the appropriate translations in `/_data/i18n_academic.yml`.
261 |
262 | #### Plugins
263 |
264 | Academic is compatible with the `jekyll-last-modified-at` plugin ([repo](https://github.com/gjtorikian/jekyll-last-modified-at)). If installed, the last modified date will be (discretely) displayed in the posts lists and in the post layout.
265 |
266 | If you specified a Github `repo`, the last modified date will point to the revision history of the file.
267 |
268 | ### Layouts
269 |
270 | #### Post layout
271 |
272 | In the yaml header, you can add some tags to help Academic.
273 |
274 | `summary`: [optional] a short text or abstract. Used in the posts lists and on the post page.
275 |
276 | `thumbnail`: [optional] relative path to image or absolute url to an image that describes your post. Used in the posts lists and on the post page.
277 |
278 | #### Page layout
279 |
280 | In the yaml header, you can add some tags to help Academic.
281 |
282 | `invisible`: [optional] if `true`, then this page will not be listed in the navigation menu.
283 |
284 | #### About layout
285 |
286 | Will automatically put the content of the page on the right column. The left column will automatically be filled with the author info provided in the `_config.yml`.
287 |
288 | #### Archive layout
289 |
290 | Create a `archive.md` page, choose the "archive" layout. You don't need to write anything in this file, all posts published will be listed in reverse chronological order.
291 |
292 | #### 404 layout
293 |
294 | Create a `404.md` page, set the layout:
295 |
296 | ```
297 | layout: pagenotfound
298 | ```
299 |
300 | The content of the page will be used in the 404 page.
301 |
302 | #### Sitemap layout
303 |
304 | Create a `sitemap.xml` page, set the layout:
305 |
306 | ```
307 | layout: sitemap
308 | ```
309 |
310 | You now have a sitemap you can feed to the search engines.
311 |
312 | ### Includes
313 |
314 | Sometimes you need to use figures and images in your posts, with detailed captions and maybe even the source of the image.
315 | The `image.html` allows you to do just that without all the HTML markup.
316 |
317 | ```
318 | {% include image.html src="/assets/img/zotero-archives-numeriques/screencast.gif"
319 | caption="Notre solution en action"
320 | desc="Screencast de capture Zotero"
321 | source="Google"
322 | href="http://google.com"%}
323 | ```
324 |
325 | ## Contributing
326 |
327 | Bug reports and pull requests are welcome on GitHub at https://github.com/gaalcaras/academic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
328 |
329 | ## Release log
330 |
331 | + 0.1.3 [2016-12]: design refinements (page and about layouts)
332 | + 0.1.2 [2016-12]: bug fixes (footer, assets and gemfile cleaning) + `repo` var
333 | + 0.1.1 [2016-12]: bug fixes (404 page layout, footer, posts list)
334 | + 0.1.0 [2016-12]: first release of the theme.
335 |
336 | ## License
337 |
338 | The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
339 |
--------------------------------------------------------------------------------
/_data/academic_i18n.yml:
--------------------------------------------------------------------------------
1 | months:
2 | fr: ["janvier", "février", "mars", "avril", "mai", "juin",
3 | "juillet", "août", "septembre", "octobre", "novembre", "décembre"]
4 | dateformat:
5 | fr: "%e %B %Y"
6 | en: "%b %-d, %Y"
7 | lastupdated:
8 | fr: "mis à jour le"
9 | en: "last updated on"
10 | revhistory:
11 | fr: "Voir l'historique des révisions de ce billet"
12 | en: "See the revision history for this post"
13 | cta:
14 | like:
15 | fr: "Le blog vous intéresse ?"
16 | en: "Do you enjoy the blog?"
17 | post:
18 | fr: "Le post vous a plu ?"
19 | en: "Did you like that post?"
20 | rss:
21 | fr: ["Vous pouvez vous abonner au", "fil RSS", "du blog"]
22 | en: ["You can suscribe to the", "RSS feed", ""]
23 | twitter:
24 | fr: ["ou suivre", "sur Twitter"]
25 | en: ["or follow", "on Twitter"]
26 | links:
27 | fr: "Liens :"
28 | en: "Links :"
29 | by:
30 | fr: "par"
31 | en: "by"
32 | legal:
33 | fr: ["par", "est placé sous licence"]
34 | en: ["by", "is available under the license"]
35 | feed:
36 | fr: "flux RSS"
37 | en: "RSS feed"
38 | menu:
39 | fr: "Menu :"
40 | en: "Menu:"
41 | archive:
42 | fr: "Bienvenue dans les archives de ce blog. Vous trouverez ci-dessous la liste complète des billets publiés, ordonnés du plus récent au plus ancien."
43 | en: "Welcome to the archives of this blog. Below, you will find all published posts listed in reverse chronological order."
44 | all_posts:
45 | fr: ["Voir", "tous les articles publiés"]
46 | en: ["See", "all published posts"]
47 | notfound:
48 | fr: "Cette page a probablement déménagé vers une nouvelle adresse..."
49 | en: "I guess this page has moved somewhere else..."
50 | versions:
51 | fr: "Version française :"
52 | en: "English version:"
53 | no_versions:
54 | fr: "La version française de cette page n'existe pas encore :("
55 | en: "The English version of this page doesn't exist yet :("
56 | langs_avail:
57 | fr: "Langues :"
58 | en: "Languages:"
59 | cv:
60 | fr: "Curriculum Vitae"
61 | en: "Curriculum"
62 |
--------------------------------------------------------------------------------
/_includes/_i18n/date.html:
--------------------------------------------------------------------------------
1 | {% assign plang = page.lang | default: site.langs[0] | default: "en" %}
2 | {% if plang != "en" %}
3 | {% assign dateformat = site.data.academic_i18n.dateformat[plang] %}
4 | {% assign date = include.date | date: dateformat %}
5 | {% assign eng_month = include.date | date: "%B" %}
6 | {% assign num_month = include.date | date: "%m" | minus: 1 %}
7 |
8 | {{ date | replace:eng_month, site.data.academic_i18n.months[plang][num_month] }}
9 | {% else %}
10 | {{ include.date | date: site.data.academic_i18n.dateformat[plang] }}
11 | {% endif %}
12 |
--------------------------------------------------------------------------------
/_includes/_i18n/i18n.html:
--------------------------------------------------------------------------------
1 | {% capture text %}
2 | {% assign plang = page.lang | default: site.langs[0] | default: "en" %}
3 | {% assign val = include.value %}
4 |
5 | {% if val[plang] %}
6 | {% assign v = val[plang] %}
7 | {% else %}
8 | {% assign v = val %}
9 | {% endif %}
10 |
11 | {% if include.escape %}
12 | {{ v | escape | strip_newlines }}
13 | {% else %}
14 | {{ v | strip_newlines }}
15 | {% endif %}
16 | {% endcapture %}
17 | {{ text | strip_newlines }}
18 |
--------------------------------------------------------------------------------
/_includes/_i18n/lang_selector.html:
--------------------------------------------------------------------------------
1 | {% assign plang = page.lang | default: site.langs[0] | default: "en" %}
2 | {% assign pagename = page.path | split:"." | first %}
3 | {% assign versions = site.data.academic_i18n.versions %}
4 | {% assign no_versions = site.data.academic_i18n.no_versions %}
5 |
6 | {% if page.layout == "post" %}
7 | {% assign i18n_posts = site.posts | where_exp:"p","p.path contains pagename" %}
8 | {% else %}
9 | {% assign i18n_posts = site.pages | where_exp:"p","p.path contains pagename" %}
10 | {% endif %}
11 |
12 |