diff --git a/README.md b/README.md index bd7f01e7..086f393f 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,22 @@ Or install it yourself as: $ gem install jekyll-athena +## Localization + +Your site is not English? We've got your back. All strings are translatable and you can also change the date format by adding this configuration to your `_config.yml`: + +``` +# Modify the strings to adapt the theme. +# The format for the date syntax is the same as http://strftime.net/ +jekyll-athena: + date_format: "%b %-d, %Y" + translations: + home: "Home" + maintained_by: "This project is maintained by %s" + page_previous: "Previous" + page_next: "Next" +``` + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/broccolini/athena. 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. diff --git a/_includes/footer.html b/_includes/footer.html index 6f73bf43..994239bc 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,6 +1,8 @@ +{% assign maintained_by = site.jekyll-athena.translations.maintained_by | default: "This project is maintained by %s" %} +{% capture github_link %}{{ site.github_username }}{% endcapture %}
-

This project is maintained by {{ site.github_username }}

+

{{ maintained_by | replace: '%s', github_link }}

\ No newline at end of file diff --git a/_includes/previous-next.html b/_includes/previous-next.html index 13f65417..8e13f7d5 100644 --- a/_includes/previous-next.html +++ b/_includes/previous-next.html @@ -4,7 +4,7 @@ {% if page.previous.url %}
- Previous + {{ site.jekyll-athena.translations.page_previous | default: "Previous" }}

{{ page.previous.content | strip_html | truncatewords:20 }}

@@ -13,7 +13,7 @@ {% if page.next.url %}
- Next + {{ site.jekyll-athena.translations.page_next | default: "Next" }}

{{ page.next.content | strip_html | truncatewords:20 }}

diff --git a/_includes/previous-next_has-categories.html b/_includes/previous-next_has-categories.html index 641333a2..8c0e0720 100644 --- a/_includes/previous-next_has-categories.html +++ b/_includes/previous-next_has-categories.html @@ -22,7 +22,7 @@ {% if prev_post %}
- Previous + {{ site.jekyll-athena.translations.page_previous | default: "Previous" }}

{{ page.previous.content | strip_html | truncatewords:20 }}

@@ -31,7 +31,7 @@ {% if next_post %}
- Next + {{ site.jekyll-athena.translations.page_next | default: "Next" }}

{{ page.next.content | strip_html | truncatewords:20 }}

diff --git a/_layouts/category-post.html b/_layouts/category-post.html index e02b2b46..09fabdf1 100644 --- a/_layouts/category-post.html +++ b/_layouts/category-post.html @@ -1,12 +1,12 @@ --- layout: default --- - +{% assign date_format = site.jekyll-athena.date_format | default: "%b %-d, %Y" %}

{{ page.title }}

-

+

diff --git a/_layouts/post.html b/_layouts/post.html index 1bbab231..e9026d29 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,12 +1,12 @@ --- layout: default --- - +{% assign date_format = site.jekyll-athena.date_format | default: "%b %-d, %Y" %}

{{ page.title }}

-

+