summaryrefslogtreecommitdiff
path: root/cgithub/src
diff options
context:
space:
mode:
Diffstat (limited to 'cgithub/src')
-rw-r--r--cgithub/src/app.ts3
-rw-r--r--cgithub/src/worker.ts2
2 files changed, 3 insertions, 2 deletions
diff --git a/cgithub/src/app.ts b/cgithub/src/app.ts
index 5bed45d..0218918 100644
--- a/cgithub/src/app.ts
+++ b/cgithub/src/app.ts
@@ -1,6 +1,7 @@
import type { Eta } from "eta";
import { type Context, Hono } from "hono";
import type { StatusCode } from "hono/utils/http-status";
+import { commit } from "./commit.generated.ts";
import {
getGitHubBlob,
getGitHubCommits,
@@ -47,7 +48,7 @@ export function createApp(eta: Eta) {
// Our URLs mirror GitHub's, so the page we scraped is the same path there.
const { pathname, search } = new URL(c.req.url);
const githubUrl = `https://github.com${pathname}${search}`;
- return c.html(eta.render(template, { ...data, githubUrl }));
+ return c.html(eta.render(template, { ...data, githubUrl, commit }));
}
// For fragments fetched asynchronously by client-side JS (see public/static/refs.js):
diff --git a/cgithub/src/worker.ts b/cgithub/src/worker.ts
index 024b01a..7bf9100 100644
--- a/cgithub/src/worker.ts
+++ b/cgithub/src/worker.ts
@@ -5,7 +5,7 @@ import { createApp } from "./app.ts";
import { views } from "./views.generated.ts";
// Workers disallow runtime code generation, so templates are precompiled by
-// scripts/compile-views.ts and preloaded into Eta's cache here. With
+// scripts/build.ts and preloaded into Eta's cache here. With
// cache: true, Eta serves them from the cache and never compiles.
const eta = new Eta({ cache: true });