Use nav for pagination

ad88c050176b7c0c541c0d183bfcd89e60604bc5

Tucker McKnight <tmcknight@instructure.com> | Wed Jul 22 2026

Use nav for pagination

Also, more detailed output on configuration errors.
main.ts:32
Before
31
32
33

34
35
36
  const validator = ajv.compile(ConfigSchema)
  const valid = validator(reposConfiguration)
  if (!valid) {
⁣
    throw new Error(validator.errors.map(error => `config object at ${error.instancePath.replaceAll("/", ".")}: ${error.message}`).join("\n"))
  }

  return async ({directories}) => {
After
31
32
33
34
35
36
37
  const validator = ajv.compile(ConfigSchema)
  const valid = validator(reposConfiguration)
  if (!valid) {
    console.log(validator.errors)
    throw new Error(validator.errors.map(error => `config object at ${error.instancePath.replaceAll("/", ".")}, ${error.params.toString()}: ${error.message}`).join("\n"))
  }

  return async ({directories}) => {
main.ts:651
Before
650
651
652








653
654
655
      commitsInRepos,
      permalink: (data) => {
        const repoName = data.patchInfo.repoName
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
        return `${reposPath}/${eleventyConfig.getFilter("slugify")(repoName)}/commits/${data.patchInfo.commit.hash}/`
      },
      eleventyComputed: {
        nav: {
After
650
651
652
653
654
655
656
657
658
659
660
661
662
663
      commitsInRepos,
      permalink: (data) => {
        const repoName = data.patchInfo.repoName
        const nav = NavHelper({
          reposConfig: reposConfiguration,
          slugify,
          currentRepoName: repoName,
          currentRefName: data.patchInfo.commit.hash,
          currentRefType: 'commit',
        })

        return nav.commit(data.patchInfo.commit.hash) + '/'
      },
      eleventyComputed: {
        nav: {
main.ts:683
Before
682
683
684



685
686
687


688
689
690
        alias: "flatRef",
      },
      permalink: (data) => {
⁣
⁣
⁣
        const repoName = data.flatRef.repoName
        const refName = data.flatRef.refName
        const refType = data.flatRef.type
⁣
⁣
        return `${reposPath}/${eleventyConfig.getFilter("slugify")(repoName)}/${refType}/${eleventyConfig.getFilter("slugify")(refName)}/commits.xml`
      },
      eleventyComputed: {
        currentRepo: (data) => reposData.find(repo => {
After
682
683
684
685
686
687
688
689
690
691
692
693
694
695
        alias: "flatRef",
      },
      permalink: (data) => {
        const nav = NavHelper({
          reposConfig: reposConfiguration,
          slugify,
          currentRepoName: data.flatRef.repoName,
          currentRefName: data.flatRef.refName,
          currentRefType: data.flatRef.type,
        })

        return nav.rssFeed()
      },
      eleventyComputed: {
        currentRepo: (data) => reposData.find(repo => {