Make files template use commonPage

3700da2f6e5c038799adc556549748805c4b5545

Tucker McKnight <tucker@pangolin.lan> | Sun Feb 22 2026

Make files template use commonPage
js_templates/files.ts:1
Before
0
1
2

3
4
5
6
7
8
9
10
11
12
import m from 'mithril'
import { type SortedFileList, type Repository } from "../src/dataTypes.ts"

⁣
export default async (eleventyConfig: any, data: any) => {
  const branch: Repository['branches'][0] = data.currentBranch
  const topLevelFilesOnly = eleventyConfig.getFilter("topLevelFilesOnly")
  const slugify = eleventyConfig.getFilter("slugify")

  const files: SortedFileList = topLevelFilesOnly(branch.fileList, '')

  return [
    m('div', {class: "row mt-3 mb-1"}, [
      m('div', {class: "col"},
        m('p', [
After
0
1
2
3
4
5
6
7
8
9
10
11
12
13
import m from 'mithril'
import { type SortedFileList, type Repository } from "../src/dataTypes.ts"
import htmlPage from './common/htmlPage.ts'

export default async (reposConfig: any, eleventyConfig: any, data: any) => {
  const branch: Repository['branches'][0] = data.currentBranch
  const topLevelFilesOnly = eleventyConfig.getFilter("topLevelFilesOnly")
  const slugify = eleventyConfig.getFilter("slugify")

  const files: SortedFileList = topLevelFilesOnly(branch.fileList, '')

  const pageContent = [
    m('div', {class: "row mt-3 mb-1"}, [
      m('div', {class: "col"},
        m('p', [
js_templates/files.ts:37
Before
36
37
38

      ])
    }))
  ]
⁣
⁣
}
After
36
37
38
39
40
      ])
    }))
  ]

  return await htmlPage(reposConfig, eleventyConfig, data, pageContent)
}
main.ts:14
Before
13
14
15
16
17
18
import ConfigSchema from './schemas/ReposConfiguration.json' with { type: 'json' }
import commonPage from './js_templates/common/commonPage.ts'
import repoJsTemplate from './js_templates/repo.ts'
// import filesJsTemplate from './js_templates/files.ts'
import fileJsTemplate from './js_templates/file.ts'
import commitJsTemplate from './js_templates/commit.ts'
// import commitsJsTemplate from './js_templates/commits.ts'
After
13
14
15
16
17
18
import ConfigSchema from './schemas/ReposConfiguration.json' with { type: 'json' }
import commonPage from './js_templates/common/commonPage.ts'
import repoJsTemplate from './js_templates/repo.ts'
import filesJsTemplate from './js_templates/files.ts'
import fileJsTemplate from './js_templates/file.ts'
import commitJsTemplate from './js_templates/commit.ts'
// import commitsJsTemplate from './js_templates/commits.ts'
main.ts:367
Before
After