Skip to content

Commit 866cee0

Browse files
add llms.txt to the footer (#2913)
1 parent 0eed0e7 commit 866cee0

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,32 @@ jobs:
3737
working-directory: "reference_gen"
3838
run: deno task doc
3939

40+
- name: Restore OG image cache
41+
uses: actions/cache@v4
42+
id: og-cache
43+
with:
44+
path: .og-cache
45+
key: og-images-${{ hashFiles('open_graph/**') }}
46+
restore-keys: og-images-
47+
4048
- name: Build
4149
env:
4250
ORAMA_PROJECT_ID: ${{ vars.ORAMA_PROJECT_ID }}
4351
ORAMA_DATASOURCE_ID: ${{ vars.ORAMA_DATASOURCE_ID }}
4452
ORAMA_PRIVATE_API_KEY: ${{ secrets.ORAMA_PRIVATE_API_KEY }}
53+
SKIP_OG: ${{ steps.og-cache.outputs.cache-hit == 'true' && '1' || '' }}
4554
run: deno task build
4655

56+
- name: Restore cached OG images
57+
if: steps.og-cache.outputs.cache-hit == 'true'
58+
run: cp -r .og-cache/_site/* _site/ 2>/dev/null || true
59+
60+
- name: Save OG images to cache
61+
if: steps.og-cache.outputs.cache-hit != 'true'
62+
run: |
63+
mkdir -p .og-cache/_site
64+
cd _site && find . -name "index.png" -exec cp --parents {} ../.og-cache/_site/ \;
65+
4766
- name: Run server
4867
run: deno run --allow-read=. --allow-net --allow-env --lock=deno.lock server.ts &
4968

_components/Footer.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
export default function Footer_new() {
22
return (
3-
<footer class="text-smaller bg-gray-50 dark:bg-gray-950 p-4 pt-12 sm:px-8 border-t border-t-foreground-tertiary">
3+
<footer className="text-smaller bg-gray-50 dark:bg-gray-950 p-4 pt-12 sm:px-8 border-t border-t-foreground-tertiary">
44
<nav className="flex flex-col gap-x-4 gap-y-12 max-w-7xl md:flex-row md:flex-wrap md:justify-between md:w-full md:gap-y-8 md:mx-auto">
55
{data.map((category) => (
6-
<section class="flex-auto">
7-
<h3 class="mb-2 uppercase font-bold text-foreground-primary whitespace-pre">
6+
<section className="flex-auto">
7+
<h3 className="mb-2 uppercase font-bold text-foreground-primary whitespace-pre">
88
{category.title}
99
</h3>
10-
<ul class="m-0 p-0 pl-3 border-l border-l-background-tertiary list-none">
10+
<ul className="m-0 p-0 pl-3 border-l border-l-background-tertiary list-none">
1111
{category.items.map((item) => (
1212
<li>
1313
<a
14-
class="block mb-2 hover:text-primary hover:underline"
14+
className="block mb-2 hover:text-primary hover:underline"
1515
href={item.to ?? item.href}
1616
dangerouslySetInnerHTML={{ __html: item.label }}
1717
/>
@@ -21,7 +21,7 @@ export default function Footer_new() {
2121
</section>
2222
))}
2323
</nav>
24-
<p class="m-0 mt-16 mx-auto text-center text-xs text-foreground-secondary">
24+
<p className="m-0 mt-16 mx-auto text-center text-xs text-foreground-secondary">
2525
Copyright © {new Date().getFullYear()} the Deno authors.
2626
</p>
2727
</footer>
@@ -153,6 +153,10 @@ const data = [
153153
label: "Privacy Policy",
154154
href: "/deploy/privacy_policy",
155155
},
156+
{
157+
label: "LLMs",
158+
href: "/llms.txt",
159+
},
156160
],
157161
},
158162
] satisfies FooterCategory[];

_config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ site.copy("runtime/reference/images");
146146
site.copy("runtime/contributing/images");
147147
site.copy("examples/tutorials/images");
148148
site.copy("deploy/manual/images");
149-
site.copy("deploy/images");
150149
site.copy("examples/scripts");
151150

152151
site.use(
@@ -308,7 +307,7 @@ site.data("apiCategories", {
308307
});
309308

310309
// Do more expensive operations if we're building the full site
311-
if (Deno.env.get("BUILD_TYPE") == "FULL") {
310+
if (Deno.env.get("BUILD_TYPE") == "FULL" && !Deno.env.has("SKIP_OG")) {
312311
// Use Lume's built in date function to get the last modified date of the file
313312
// site.data("date", "Git Last Modified");;
314313

0 commit comments

Comments
 (0)