Skip to content

Proposal: Add Dynamic Year Interpolation for themeConfig.footer.copyright #5059

@hestiacn

Description

@hestiacn

Is your feature request related to a problem? Please describe.

Currently, configuring static footer copyright text in themeConfig (e.g., copyright: 'Copyright © 2024') is straightforward.

Describe the solution you'd like

// .vitepress/config.mjs
export default {
themeConfig: {
footer: {
copyright:   Copyright © 2019- ' + new Date().getFullYear() + ' vitepress
}
}
}

Describe alternatives you've considered

It is proposed to support a simple dynamic interpolation syntax for the footer.copyright configuration option, allowing it to automatically generate and update the current year.

Additional context

After configuration, the footer should automatically display:

  • Copyright © 2019-2025 (in 2025)
  • Copyright © 2019-2026 (automatically updates in 2026)

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions