Tucker McKnight <tucker@pangolin.lan> | Mon Dec 08 2025
Show readme on main page of new template Also restore the old template and put the new WIP template under a different URL. It's now at repo-name/new/
1 2 3 4 5 6 7 8 9 10 11 12 13
import { type ReposConfiguration } from '../src/configTypes.ts'
import { type Repository } from '../src/dataTypes.ts'
export default (reposConfig: ReposConfiguration, slugify: Function) => {
return (data) => {
if (data.currentRepo === '') {
return
}
const repo: Repository = data.currentRepo
const branch: Repository['branches'][0] = data.currentBranch
const nav = NavHelper(reposConfig, slugify, repo.name, branch.name)
return `1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import { type ReposConfiguration } from '../src/configTypes.ts'
import { type Repository } from '../src/dataTypes.ts'
export default async (reposConfig: ReposConfiguration, eleventyConfig: any) => {
return async (data) => {
if (data.currentRepo === '') {
return
}
const repo: Repository = data.currentRepo
const branch: Repository['branches'][0] = data.currentBranch
const slugify = eleventyConfig.getFilter("slugify")
const renderContentIfAvailable = eleventyConfig.getFilter("renderContentIfAvailable")
const getReadMe = eleventyConfig.getFilter("getReadMe")
const nav = NavHelper(reposConfig, slugify, repo.name, branch.name)
return `425 426 427 428 429 430
permalink: (data) => {
const repoName = data.branch.repoName
const branchName = data.branch.branchName
return `${reposPath}/${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branchName)}/`
},
eleventyComputed: {
nav: {425 426 427 428 429 430
permalink: (data) => {
const repoName = data.branch.repoName
const branchName = data.branch.branchName
return `${reposPath}/${eleventyConfig.getFilter("slugify")(repoName)}/new/${eleventyConfig.getFilter("slugify")(branchName)}/`
},
eleventyComputed: {
nav: {