Skip to content

Commit ede7ea9

Browse files
Copilotbytemain
andauthored
Simplify endpoint list rendering
Agent-Logs-Url: https://github.com/version-fox/version-vault/sessions/cb1171d0-c7da-4015-a74d-4c9e4ad904f8 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent cbd93b5 commit ede7ea9

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/ignition.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import pythonPyenvVersions from './sdks/python/pyenv';
44
import { errorHandler } from "@/utils/error-handler";
55

66
const repositoryUrl = "https://github.com/version-fox/version-vault";
7-
const endpoints = [
8-
{ href: "/", description: "This page." },
9-
{ href: "/python/pyenv", description: "Pyenv Python versions." },
10-
{ href: "/python/uv-build", description: "Python Build Standalone assets." },
11-
{ href: "/pyenv-versions", description: "Legacy pyenv Python versions." },
12-
];
137

148
export const ignition = () => {
159
const app = new Hono<HonoEnv>();
@@ -117,7 +111,10 @@ export const ignition = () => {
117111
118112
<h2>ENDPOINTS</h2>
119113
<ul class="endpoint-list">
120-
${endpoints.map((endpoint) => `<li><a href="${endpoint.href}">${endpoint.href}</a> ${endpoint.description}</li>`).join("\n ")}
114+
<li><a href="/">/</a> This page.</li>
115+
<li><a href="/python/pyenv">/python/pyenv</a> Pyenv Python versions.</li>
116+
<li><a href="/python/uv-build">/python/uv-build</a> Python Build Standalone assets.</li>
117+
<li><a href="/pyenv-versions">/pyenv-versions</a> Legacy pyenv Python versions.</li>
121118
</ul>
122119
123120
<h2>Examples</h2>

tests/root.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test("root route renders landing page with examples and endpoint links", async (
1010
assert.match(response.headers.get("content-type") ?? "", /^text\/html/);
1111
assert.match(body, /https:\/\/github\.com\/version-fox\/version-vault/);
1212
assert.match(body, /<h2>ENDPOINTS<\/h2>/);
13-
assert.match(body, /href="\/"/);
13+
assert.match(body, /<a href="\/">\/<\/a>/);
1414
assert.match(body, /This page\./);
1515
assert.match(body, /href="\/python\/pyenv"/);
1616
assert.match(body, /Pyenv Python versions\./);

0 commit comments

Comments
 (0)