Skip to content

Commit

Permalink
Restore the year of first publication in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Feb 27, 2021
1 parent 0242513 commit 28eb18a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions _data/rights.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# License data

# The year you first published your website, format: YYYY
first_publication_year: # e.g., 2021

license:
name: CC BY 4.0
link: "https://creativecommons.org/licenses/by/4.0/"
Expand Down
17 changes: 15 additions & 2 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@
<div class="d-flex justify-content-between align-items-center">
<div class="footer-left">
<p class="mb-0">
© {{ 'now' | date: "%Y" }}
©
<!-- years range -->
{% assign this_year = "now" | date: "%Y" | plus: 0 %}
{% assign years_range = this_year %}
{% if site.data.rights.first_publication_year < this_year
and site.data.rights.first_publication_year %}
{{ site.data.rights.first_publication_year }} -
{% endif %}
{{ this_year }}
<!-- copyright owner -->
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
<!-- copyright statement -->
{% if site.data.rights.brief %}
<span data-toggle="tooltip" data-placement="top"
title="{{ site.data.rights.verbose }}">{{ site.data.rights.brief }}</span>
title="{{ site.data.rights.verbose }}">
{{ site.data.rights.brief }}
</span>
{% endif %}
</p>

</div>

<div class="footer-right">
Expand Down

0 comments on commit 28eb18a

Please sign in to comment.