Skip to content

Commit

Permalink
chore: changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Oct 23, 2024
1 parent 3157daa commit b6816cb
Show file tree
Hide file tree
Showing 7 changed files with 352 additions and 154 deletions.
2 changes: 1 addition & 1 deletion doc.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/mdx": "^3.1.7",
"@astrojs/sitemap": "^3.2.0",
"@astrojs/tailwind": "^5.1.1",
"@astrojs/mdx": "^3.1.8",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.2",
"@builder.io/qwik": "1.7.2",
"@fontsource-variable/fira-code": "^5.1.0",
"@fontsource-variable/fredoka": "^5.1.0",
Expand All @@ -34,7 +34,7 @@
"@lunariajs/core": "^0.1.1",
"@qwikdev/astro": "^0.6.3",
"@types/node": "^20.16.10",
"astro": "^4.15.11",
"astro": "^4.16.7",
"astro-meta-tags": "^0.3.1",
"astro-pagefind": "^1.6.0",
"astro-robots-txt": "^1.0.0",
Expand Down
474 changes: 331 additions & 143 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/doc.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Sidebar/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ else if (sidebarMode === "books") {
href="/changelog"
icon="pog"
>
What's new on v4000
Changelog
</SidebarLink>
<SidebarLink
href="https://play.kaplayjs.com"
Expand Down
9 changes: 9 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,18 @@ const miscCollection = defineCollection({
}),
});

const repoCollection = defineCollection({
// only on kaplay/ folder not on kaplay/node_modules/ or any other folder
loader: glob({
pattern: "kaplay/**.md",
base: "./",
}),
});

export const collections = {
blog: blogCollection,
guides: guideCollection,
books: booksCollection,
misc: miscCollection,
repo: repoCollection,
};
9 changes: 5 additions & 4 deletions src/pages/[...path]/changelog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
import Prose from "@/components/Content/Prose.astro";
import SidebarPage from "@/layouts/SidebarPage.astro";
import { getStaticPathsByLocales } from "@/util/path";
import { getEntry } from "astro:content";
import { render } from "astro:content";
import { getCollection, getEntry } from "astro:content";
export function getStaticPaths() {
return getStaticPathsByLocales();
}
const { lang } = Astro.props;
const entry = await getEntry("misc", `en/changelog`);
if (!entry) return;
const { Content } = await entry.render();
const entry = await getEntry("repo", "kaplay/changelog");
const { Content } = await render(entry);
---

<SidebarPage
Expand Down

0 comments on commit b6816cb

Please sign in to comment.