feat: add git and rss

This commit is contained in:
ryanchristo 2026-11-19 14:01:47 -08:00
parent f9beb971e7
commit eaf8ed7d5d
No known key found for this signature in database
7 changed files with 202 additions and 40 deletions

View file

@ -32,11 +32,17 @@ const Layout = ({ children }: any) => (
title: 'services', title: 'services',
target: '', target: '',
}, },
// { 'divider',
// link: '/validator', {
// title: 'validator', link: 'https://git.chora.studio/explore/repos',
// target: '', title: 'git',
// }, target: '_blank',
},
{
link: '/research/feed',
title: 'rss',
target: '_blank',
},
]} ]}
showMenuButton={true} showMenuButton={true}
showMobileTitle={true} showMobileTitle={true}
@ -63,16 +69,16 @@ const Layout = ({ children }: any) => (
target: '', target: '',
title: 'services', title: 'services',
}, },
// { {
// link: 'validator', link: 'https://git.chora.studio/explore/repos',
// target: '', title: 'git',
// title: 'validator', target: '_blank',
// }, },
// { {
// link: 'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e', link: '/research/feed',
// target: '_blank', title: 'rss',
// title: 'chora validator', target: '_blank',
// }, },
]} ]}
mobileOnly={true} mobileOnly={true}
/> />
@ -107,33 +113,22 @@ const Layout = ({ children }: any) => (
target: '', target: '',
title: 'services', title: 'services',
}, },
// {
// link: '/validator',
// target: '',
// title: 'validator',
// },
], ],
}, },
// { {
// title: 'chora validator', title: 'more links',
// items: [ items: [
// { {
// link: 'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e', link: 'https://git.chora.studio/explore/repos',
// target: '_blank', title: 'git',
// title: 'regen', target: '_blank',
// }, },
// { {
// link: 'https://ledger.chora.io/regen-redwood-1/validators/regenvaloper1399y9huuus9phlv2d5fjnznem65nlmsn0qgfrd', link: '/research/feed',
// target: '_blank', title: 'rss',
// title: 'regen-redwood', target: '_blank',
// }, },],
// { },
// link: 'https://ledger.chora.io/chora-testnet-1/validators/choravaloper1394r2mejx4vaqrqkqm63k8m3qdsx6xzjquwy7u',
// target: '_blank',
// title: 'chora-testnet',
// },
// ],
// },
]} ]}
/> />
</MenuContextProvider> </MenuContextProvider>

View file

@ -0,0 +1,41 @@
import { Feed } from "feed";
import { getArtifacts } from "utils";
const SITE_URL = "https://chora.studio/research/about";
function getAllArtifacts() {
return [
...getArtifacts('about'),
]
}
export const revalidate = false;
export async function GET() {
const feed = new Feed({
title: "chora research (about)",
description: "chora research (about)",
id: SITE_URL,
link: SITE_URL,
language: "en",
feedLinks: { rss2: `${SITE_URL}/feed` },
ttl: 60,
});
for (const a of getAllArtifacts()) {
feed.addItem({
title: a.title,
id: `${SITE_URL}/${a.id}`,
link: `${SITE_URL}/${a.id}`,
description: a.description,
date: a.created,
});
}
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}

View file

@ -0,0 +1,41 @@
import { Feed } from "feed";
import { getArtifacts } from "utils";
const SITE_URL = "https://chora.studio/research/concepts";
function getAllArtifacts() {
return [
...getArtifacts('concepts'),
]
}
export const revalidate = false;
export async function GET() {
const feed = new Feed({
title: "chora research (concepts)",
description: "chora research (concepts)",
id: SITE_URL,
link: SITE_URL,
language: "en",
feedLinks: { rss2: `${SITE_URL}/feed` },
ttl: 60,
});
for (const a of getAllArtifacts()) {
feed.addItem({
title: a.title,
id: `${SITE_URL}/${a.id}`,
link: `${SITE_URL}/${a.id}`,
description: a.description,
date: a.created,
});
}
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}

View file

@ -0,0 +1,43 @@
import { Feed } from "feed";
import { getArtifacts } from "utils";
const SITE_URL = "https://chora.studio/research";
function getAllArtifacts() {
return [
...getArtifacts('about'),
...getArtifacts('concepts'),
...getArtifacts('tutorials'),
]
}
export const revalidate = false;
export async function GET() {
const feed = new Feed({
title: "chora research",
description: "chora research",
id: SITE_URL,
link: SITE_URL,
language: "en",
feedLinks: { rss2: `${SITE_URL}/feed` },
ttl: 60,
});
for (const a of getAllArtifacts()) {
feed.addItem({
title: a.title,
id: `${SITE_URL}/${a.category}/${a.id}`,
link: `${SITE_URL}/${a.category}/${a.id}`,
description: a.description,
date: a.created,
});
}
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}

View file

@ -0,0 +1,41 @@
import { Feed } from "feed";
import { getArtifacts } from "utils";
const SITE_URL = "https://chora.studio/research/tutorials";
function getAllArtifacts() {
return [
...getArtifacts('tutorials'),
]
}
export const revalidate = false;
export async function GET() {
const feed = new Feed({
title: "chora research (tutorials)",
description: "chora research (tutorials)",
id: SITE_URL,
link: SITE_URL,
language: "en",
feedLinks: { rss2: `${SITE_URL}/feed` },
ttl: 60,
});
for (const a of getAllArtifacts()) {
feed.addItem({
title: a.title,
id: `${SITE_URL}/${a.id}`,
link: `${SITE_URL}/${a.id}`,
description: a.description,
date: a.created,
});
}
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}

BIN
bun.lockb

Binary file not shown.

View file

@ -20,6 +20,7 @@
"clean": "rm -rf .next dist node_modules" "clean": "rm -rf .next dist node_modules"
}, },
"dependencies": { "dependencies": {
"feed": "^6.0.0",
"gray-matter": "^4", "gray-matter": "^4",
"next": "^14", "next": "^14",
"react": "^18", "react": "^18",