Make branches template use commonPage

cb7f690c5a3a45c80e584f7fb02084eabfc63f56

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

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

3
4
5
6
7
8
9

10
import m from 'mithril'
import {NavHelper} from './helpers/nav.ts'

⁣
export default async (
  eleventyConfig: any,
  data: any,
  nav: ReturnType<typeof NavHelper>
) => {
  const slugify = eleventyConfig.getFilter("slugify")

⁣
  const branchesWithWorkInProgress = data.branches.filter(branch => branch.ahead > 0)
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)
After
0
1
2
3
4
5
6
7
8
9
10
11
12
import m from 'mithril'
import {NavHelper} from './helpers/nav.ts'
import htmlPage from './common/htmlPage.ts'

export default async (
  reposConfig: any,
  eleventyConfig: any,
  data: any,
) => {
  const slugify = eleventyConfig.getFilter("slugify")
  const nav = NavHelper(reposConfig, slugify, data.branchInfo.repoName, data.branchInfo.branchName)

  const branchesWithWorkInProgress = data.branches.filter(branch => branch.ahead > 0)
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)
js_templates/branches.ts:34
Before
33
34
35
36
37
38
39
40
41

    }))
  }

  return [
    m('h1', {class: 'fs-2'}, 'Branches with unmerged commits'),
    branchCards(branchesWithWorkInProgress),
    m('h1', {class: 'fs-2'}, 'Branches that are fully merged'),
    branchCards(branchesFullyMerged),
  ]
⁣
⁣
}
After
33
34
35
36
37
38
39
40
41
42
43
    }))
  }

  const pageContent = [
    m('h1', {class: 'fs-2'}, 'Branches with unmerged commits'),
    branchCards(branchesWithWorkInProgress),
    m('h1', {class: 'fs-2'}, 'Branches that are fully merged'),
    branchCards(branchesFullyMerged),
  ]

  return await htmlPage(reposConfig, eleventyConfig, data, pageContent)
}
main.ts:19
Before
18
19
20
21
22
23
import commitJsTemplate from './js_templates/commit.ts'
import commitsJsTemplate from './js_templates/commits.ts'
import indexJsTemplate from './js_templates/index.ts'
// import branchesJsTemplate from './js_templates/branches.ts'
import rawJsTemplate from './js_templates/raw.ts'
import feedJsTemplate from './js_templates/feed.ts'
After
18
19
20
21
22
23
import commitJsTemplate from './js_templates/commit.ts'
import commitsJsTemplate from './js_templates/commits.ts'
import indexJsTemplate from './js_templates/index.ts'
import branchesJsTemplate from './js_templates/branches.ts'
import rawJsTemplate from './js_templates/raw.ts'
import feedJsTemplate from './js_templates/feed.ts'
main.ts:277
Before
After