academic 0.4.94 → 0.4.95
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -3
- data/_includes/footer.html +2 -1
- data/_includes/header.html +2 -1
- data/_includes/last_modified_at.html +3 -2
- data/_includes/link.html +8 -1
- data/_includes/nav_menu.html +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a7ac076a6b5e8234efe6f3854f44c0ed2c84a3
|
4
|
+
data.tar.gz: 27788a38a7c9dee63e4652dbdd8410c569f03df0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b02a7a28afe42779bdc221e4c1dacf3e86c442148d58a9ff13c9e0c92d549bf42e94e266d9df5d71782c21b6176aa29516de8a687fe3316743068ba8281c29b
|
7
|
+
data.tar.gz: 0de69486e953f937149dd5e71d63dd570585051a1da0f16f87d5b8c5dfa8b6d0340750ada3e3feec83ea6429c38de788a1163741184ed6b4c03e87572b957269
|
data/README.md
CHANGED
@@ -8,10 +8,12 @@ Check out my [personal website](https://gaalcaras.com) or my [blog](https://soci
|
|
8
8
|
![Academic screenshot](screenshot.png)
|
9
9
|
|
10
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.
|
11
12
|
|
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.
|
13
14
|
|
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.
|
15
17
|
|
16
18
|
---
|
17
19
|
|
@@ -46,7 +48,7 @@ Table of contents:
|
|
46
48
|
+ Comfortable line length (around 66 characters, [read more](http://webtypography.net/2.1.2))
|
47
49
|
+ Attention to vertical rhythm, law of proximity and so on ([read more](http://typographyhandbook.com/))
|
48
50
|
+ If you'd like a **multilingual** website, Academic has basic **i18n** support (no plugin required):
|
49
|
-
+
|
51
|
+
+ *Supported languages* : English, French
|
50
52
|
+ Lang selector to change languages automatically added in header and footer
|
51
53
|
+ Basic SEO support for multilingual pages
|
52
54
|
+ Add an **image thumbnail** to illustrate your posts. It's displayed both on the post list and on the post itself.
|
@@ -182,8 +184,14 @@ nav_ext_links:
|
|
182
184
|
#### Multilingual and i18n support
|
183
185
|
|
184
186
|
Academic works perfectly well as a single language website.
|
185
|
-
|
186
|
-
|
187
|
+
By default, Academic is in English.
|
188
|
+
You can easily switch to another supported language :
|
189
|
+
|
190
|
+
```yaml
|
191
|
+
langs: ["fr"]
|
192
|
+
```
|
193
|
+
|
194
|
+
If you need to translate part of your pages or posts, Academic also supports basic i18n and multilingual features.
|
187
195
|
|
188
196
|
To enable multilingual mode, just add the following to your `_config.yml`:
|
189
197
|
|
@@ -198,6 +206,7 @@ defaults:
|
|
198
206
|
|
199
207
|
The `langs` variable should be an array containing your languages.
|
200
208
|
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).
|
209
|
+
The double quotes around the language *do* matter.
|
201
210
|
|
202
211
|
Don't forget to define a default lang for your whole website.
|
203
212
|
|
data/_includes/footer.html
CHANGED
data/_includes/header.html
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
{% assign plang = page.lang | default: site.langs[0] | default: "en" %}
|
1
2
|
{% assign object = include.object %}
|
2
3
|
|
3
4
|
{% if object.last_modified_at %}
|
@@ -10,11 +11,11 @@
|
|
10
11
|
<span class="last-update">·
|
11
12
|
|
12
13
|
{% if site.repo %}
|
13
|
-
<a title="{{ site.data.academic_i18n.revhistory[
|
14
|
+
<a title="{{ site.data.academic_i18n.revhistory[plang] }}"
|
14
15
|
href="{{site.repo}}/commits/master/{{object.path}}">
|
15
16
|
{% endif %}
|
16
17
|
|
17
|
-
{{ site.data.academic_i18n.lastupdated[
|
18
|
+
{{ site.data.academic_i18n.lastupdated[plang] }}
|
18
19
|
{% include date.html date=object.last_modified_at %}
|
19
20
|
|
20
21
|
{% if site.repo %}
|
data/_includes/link.html
CHANGED
@@ -1,3 +1,10 @@
|
|
1
1
|
{% assign plang = page.lang | default: site.langs[0] | default: "en" %}
|
2
|
-
{% assign
|
2
|
+
{% assign nblangs = site.langs | size %}
|
3
|
+
{% assign objects = site.pages | where_exp:"p","p.path contains include.path" %}
|
4
|
+
|
5
|
+
{% if nblangs > 1 %}
|
6
|
+
{% assign object = objects | where:"lang",plang | first %}
|
7
|
+
{% else %}
|
8
|
+
{% assign object = objects | first %}
|
9
|
+
{% endif %}
|
3
10
|
{{ object.url }}
|
data/_includes/nav_menu.html
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
{% assign plang = page.lang | default: site.langs[0] | default: "en" %}
|
2
|
+
{% assign nblangs = site.langs | size %}
|
2
3
|
<span class="nav-list-title">{{ site.data.academic_i18n.menu[plang] }}</span>
|
3
4
|
<ul class="nav-list {{ include.class }}">
|
4
5
|
{% for link in site.nav_ext_links %}
|
@@ -9,7 +10,11 @@
|
|
9
10
|
{% endif %}
|
10
11
|
{% endfor %}
|
11
12
|
|
12
|
-
{%
|
13
|
+
{% if nblangs > 1 %}
|
14
|
+
{% assign pages = site.pages | where:"lang",plang %}
|
15
|
+
{% else %}
|
16
|
+
{% assign pages = site.pages %}
|
17
|
+
{% endif %}
|
13
18
|
|
14
19
|
{% for my_page in pages %}
|
15
20
|
{% unless my_page.invisible %}
|