Skip to content

Commit

Permalink
feat: better copyright year formatting (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikopet authored Jul 1, 2024
1 parent 6fc7951 commit c2a7f40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<footer class="mx-auto flex max-w-3xl flex-wrap items-center px-8 py-4 text-sm opacity-60">
<div class="mr-auto basis-full lg:basis-1/2">
&copy; {% if config.extra.footer.since %}{{ config.extra.footer.since }} - {% endif %} {{ now()
| date(format="%Y") }}
{% set current_year = now() | date(format="%Y") | int %}
&copy; {% if config.extra.footer.since and config.extra.footer.since != current_year %}
{{ config.extra.footer.since }} - {{ current_year }}
{% else %}{{ current_year }}{% endif %}
<a class="link" href="{{ get_url(path=``) }}"
>{{ config.author | default(value=config.title) }}</a
>
Expand Down

0 comments on commit c2a7f40

Please sign in to comment.