Tucker McKnight <tucker@pangolin.lan> | Sun Feb 22 2026
Make branches template use commonPage
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)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)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),
]
}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)
}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'
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'