Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% assign maintained_by = site.jekyll-athena.translations.maintained_by | default: "This project is maintained by %s" %}
{% capture github_link %}<a class="text-accent" href="https://github.com/{{ site.github_username }}">{{ site.github_username }}</a>{% endcapture %}
<div class="container mx-auto clearfix mt-2 mt-lg-4 px-2">
<div class="border-top-thick">
<p class="col-8 sm-width-full left py-2 mb-0">This project is maintained by <a class="text-accent" href="https://github.com/{{ site.github_username }}">{{ site.github_username }}</a></p>
<p class="col-8 sm-width-full left py-2 mb-0">{{ maintained_by | replace: '%s', github_link }}</p>
<ul class="list-reset right clearfix sm-width-full py-2 mb-2 mb-lg-0">
<li class="inline-block mr-1">
<a href="https://twitter.com/share" class="twitter-share-button" data-hashtags="{{ site.title }}">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<li class="inline-block block-lg text-right ml-1 ml-lg-0">
<a class="italic h4 bold no-underline" href="{{ site.baseurl }}/">
<!-- {{ site.title }} -->
Home
{{ site.jekyll-athena.translations.home | default: "Home" }}
</a>
</li>
{% for my_page in site.pages %}
Expand Down
5 changes: 3 additions & 2 deletions _includes/post_block.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!-- Renders post date, title, and snippet of text. -->
{% assign date_format = site.jekyll-athena.date_format | default: "%b %-d, %Y" %}
<div class="py-2 mb-2 prose">
<h2 class="h1 lh-condensed col-9 mb-0">
<a class="link-primary" title="{{ post.url | prepend: site.baseurl }}" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<a class="no-underline-hover h5 block py-1 mb-1" title="{{ post.url | prepend: site.baseurl }}" href="{{ post.url | prepend: site.baseurl }}">{{ post.date | date: "%b %-d, %Y" }}</a>
<a class="no-underline-hover h5 block py-1 mb-1" title="{{ post.url | prepend: site.baseurl }}" href="{{ post.url | prepend: site.baseurl }}">{{ post.date | date: date_format }}</a>
<p>{{ post.content | strip_html | truncatewords:30 }}</p>
</div>
</div>
4 changes: 2 additions & 2 deletions _includes/previous-next.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if page.previous.url %}
<div class="col-4 sm-width-full left mr-lg-4 mt-3">
<a class="no-underline-hover py-1 block" href="{{ page.previous.url | prepend: full_base_url }}">
<span class="h5 bold">Previous</span>
<span class="h5 bold">{{ site.jekyll-athena.translations.page_previous | default: "Previous" }}</span>
<p class="bold h3 link-primary mb-1">{{ page.previous.title }}</p>
<p>{{ page.previous.content | strip_html | truncatewords:20 }}</p>
</a>
Expand All @@ -13,7 +13,7 @@
{% if page.next.url %}
<div class="col-4 sm-width-full left mt-3">
<a class="no-underline-hover py-1 block" href="{{ page.next.url | prepend: full_base_url }}">
<span class="h5 bold">Next</span>
<span class="h5 bold">{{ site.jekyll-athena.translations.page_next | default: "Next" }}</span>
<p class="bold h3 link-primary mb-1">{{ page.next.title }}</p>
<p>{{ page.next.content | strip_html | truncatewords:20 }}</p>
</a>
Expand Down
4 changes: 2 additions & 2 deletions _includes/previous-next_has-categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% if prev_post %}
<div class="col-4 sm-width-full left mr-lg-4 mt-3">
<a class="no-underline-hover py-1 block" href="{{ prev_post.url | prepend: full_base_url }}">
<span class="h5 bold">Previous</span>
<span class="h5 bold">{{ site.jekyll-athena.translations.page_previous | default: "Previous" }}</span>
<p class="bold h3 link-primary mb-1">{{ prev_post.title }}</p>
<p>{{ page.previous.content | strip_html | truncatewords:20 }}</p>
</a>
Expand All @@ -31,7 +31,7 @@
{% if next_post %}
<div class="col-4 sm-width-full left mt-3">
<a class="no-underline-hover py-1 block" href="{{ next_post.url | prepend: full_base_url }}">
<span class="h5 bold">Next</span>
<span class="h5 bold">{{ site.jekyll-athena.translations.page_next | default: "Next" }}</span>
<p class="bold h3 link-primary mb-1">{{ next_post.title }}</p>
<p>{{ page.next.content | strip_html | truncatewords:20 }}</p>
</a>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/category-post.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
layout: default
---

{% assign date_format = site.jekyll-athena.date_format | default: "%b %-d, %Y" %}
<article class="container mx-auto px-2" itemscope itemtype="http://schema.org/BlogPosting">
<div class="mt-4 mb-2 clearfix header-text">
<h1 class="h0 inline-block py-2 mt-4 header-title">{{ page.title }}</h1>
<div class="clearfix mb-4 py-1">
<p class="h4 lh-condensed"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time></p>
<p class="h4 lh-condensed"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: date_format }}</time></p>
<div class="col-1 sm-width-full border-top-thick">
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
layout: default
---

{% assign date_format = site.jekyll-athena.date_format | default: "%b %-d, %Y" %}
<article class="container mx-auto px-2" itemscope itemtype="http://schema.org/BlogPosting">
<div class="mt-4 mb-2 clearfix header-text">
<h1 class="h0 inline-block py-2 mt-4 header-title">{{ page.title }}</h1>
<div class="clearfix mb-4 py-1">
<p class="h4 lh-condensed"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time></p>
<p class="h4 lh-condensed"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: date_format }}</time></p>
<div class="col-1 sm-width-full border-top-thick">
</div>
</div>
Expand Down