fix the base path, don't hard-code to the URL

6c4e8697af3c92e5d341b2820dba2bc4af593e89

Tucker McKnight <tucker@pangolin.lan> | Thu Dec 04 2025

fix the base path, don't hard-code to the URL
js_templates/helpers/nav.ts:1
Before
0
1

2
3
4
5
import { type ReposConfiguration } from "../../src/configTypes.ts"

⁣
export const NavHelper = (reposConfig: ReposConfiguration, slugify: Function, repoName: string, branchName: string) => {
  const reposPath = reposConfig.baseUrl
  const rootPath = `${reposPath}/${slugify(repoName)}/branches`

  return {
After
0
1
2
3
4
5
6
import { type ReposConfiguration } from "../../src/configTypes.ts"
import path from 'path'

export const NavHelper = (reposConfig: ReposConfiguration, slugify: Function, repoName: string, branchName: string) => {
  const reposPath = reposConfig.path || ""
  const rootPath = `${reposPath}/${slugify(repoName)}/branches`

  return {