Define or Range on Array of Integers (Years) by End Values?

I have a front matter array of “years” that is always sequential with no skipped values, like:

years:
  - 2018
  - 2019
  - 2020
  - 2021
  - 2022

Is there a shorthand means of defining such an array, something like [ 2018 .. 2022 ]? Or if I define this front matter…

firstYear: 2019
lastYear: 2022

…Is there syntax that will let me range over the first and last values including those in between?

Look at the seq function in the docs.

{{ seq 2019 1 2022 }}   -->  [2019 2020 2021 2022]
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.