Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Shortcodes in Copyright Footer #239

Closed
StefanKoell opened this issue Jan 2, 2024 · 1 comment
Closed

Allow Shortcodes in Copyright Footer #239

StefanKoell opened this issue Jan 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@StefanKoell
Copy link

Feature Description

It would be great if we can also use shortcodes, specifically for displaying the current year.

Problem/Solution

Right now, you have to "hard code" the year (or I am not able to figure out how to make shortcodes work).

Alternatives Considered

As a workaround, I copied/modified the footer.html to use the shortcode to display the current year.

Additional Context

Since printing the current year is a common scenario, it would be nice if the theme would allow such thing out of the box or provide an option to display the current year automatically.

@imfing imfing self-assigned this Jan 8, 2024
@imfing imfing added the enhancement New feature or request label Jan 8, 2024
@imfing
Copy link
Owner

imfing commented Apr 7, 2024

Hi, I think we could put shortcodes in the copyright footer.

e.g. layouts/shortcodes/year.html:

{{- time.Now.Year -}}

use this shortcode in i18n/en.yaml

copyright: "© {{`{{% year %}}`}} Your Project"

@imfing imfing closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants