Tucker McKnight <tmcknight@instructure.com> | Sat Aug 15 2026
Allow the size of a "large commit" to be customized Changes that are more than 100 lines (or now, more than the lineCountForLargeCommit value) will take up the full length of the bar graph on the commits page.
37 38 39 40 41
path: '/repos',
defaultTemplate: {
enabled: true,
allRepositoriesPageTitle: "All Repositories",
colors: {
languageGraph: [37 38 39 40 41 42 43
path: '/repos',
defaultTemplate: {
enabled: true,
homepageButtons: [],
lineCountForLageCommit: 100,
allRepositoriesPageTitle: "All Repositories",
colors: {
languageGraph: [10 11 12 13 14
const pagesJustForRef = eleventyConfig.getFilter("pagesJustForRef")
const slugify = eleventyConfig.getFilter("slugify")
const date = eleventyConfig.getFilter("date")
const nav = NavHelper({
reposConfig,10 11 12 13 14 15 16 17 18
const pagesJustForRef = eleventyConfig.getFilter("pagesJustForRef")
const slugify = eleventyConfig.getFilter("slugify")
const date = eleventyConfig.getFilter("date")
const lineCountForLargeCommit = reposConfig
.repos[data.patchPage.repoName]
.defaultTemplate
.lineCountForLargeCommit
const nav = NavHelper({
reposConfig,129 130 131 132 133 134
}, topLanguagePercentages.map((topLangPercent) => {
const langDiffs = languageCounts.get(topLangPercent.extension)
// TODO: make the average commit size adjustable
const adjustedLength = Math.min(langDiffs[0] + langDiffs[1], 100)
const languageInfo = colors[topLangPercent.extension] || colors['other']
return m('div', {
class: 'language-col',129 130 131 132 133 134
}, topLanguagePercentages.map((topLangPercent) => {
const langDiffs = languageCounts.get(topLangPercent.extension)
// TODO: make the average commit size adjustable
const adjustedLength = Math.min((langDiffs[0] + langDiffs[1]) / lineCountForLargeCommit * 100, 100)
const languageInfo = colors[topLangPercent.extension] || colors['other']
return m('div', {
class: 'language-col',138 139 140 141 142 143
}).concat(otherLanguageDiffs[0] > 0 || otherLanguageDiffs[1] > 0
? m('div', {
class: 'language-col',
style: `height: 1rem; width: ${Math.min(otherLanguageDiffs[0] + otherLanguageDiffs[1], 100)}%; background: #666;`
})
: null
))138 139 140 141 142 143
}).concat(otherLanguageDiffs[0] > 0 || otherLanguageDiffs[1] > 0
? m('div', {
class: 'language-col',
style: `height: 1rem; width: ${Math.min((otherLanguageDiffs[0] + otherLanguageDiffs[1]) / lineCountForLargeCommit * 100, 100)}%; background: #666;`
})
: null
))89 90 91 92 93 94 95 96 97 98
"type": "object"
},
"type": "array"
}
},
"required": [
"homepageButtons"
],
"type": "object"
},
"description": {89 90 91 92 93 94 95 96 97 98
"type": "object"
},
"type": "array"
},
"lineCountForLargeCommit": {
"type": "number"
}
},
"type": "object"
},
"description": {19 20 21 22 23 24
tags: Array<any>,
languageExtensions: Object,
defaultTemplate: {
homepageButtons: Array<any>
}
}
19 20 21 22 23 24 25
tags: Array<any>,
languageExtensions: Object,
defaultTemplate: {
homepageButtons: Array<any>,
lineCountForLargeCommit: number,
}
}
150 151 152 153 154 155 156 157 158
copyTo: string,
}[],
defaultTemplate?: {
homepageButtons: Array<{
url: string,
text: string,
newTab?: boolean,
}>
},
}150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
copyTo: string,
}[],
defaultTemplate?: {
homepageButtons?: Array<{
url: string,
text: string,
newTab?: boolean,
}>,
/**
* The number of lines for a diff to take up the full width of the bar graph
* on the commits page. Commits smaller than this will take up a proportional
* fraction of the graph. E.g. if this value is 100, a 50 line change will be
* half of the width of the bar graph.
*
* @default 100
*/
lineCountForLargeCommit?: number,
},
}