Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
},
experimental: {
serverIslands: true,
contentLayer: true,
},
integrations: [
starlight({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"astro": "4.15.1",
"semver": "7.6.3",
"sharp": "0.33.5",
"@alexanderniebuhr/astro-monthly-blog-resource-loader": "0.0.1",
"typescript": "5.5.4"
},
"devDependencies": {
Expand Down
86 changes: 69 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/components/Tags.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ interface Props {
tags?: string[];
}
const allResources = await getCollection("resources");
const allExtracted = await getCollection("automatedresources");
console.log(allExtracted);

const referer = Astro.request.headers.get("referer");
const tagsParams =
Expand Down
21 changes: 21 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineCollection, z } from 'astro:content';
import { docsSchema } from '@astrojs/starlight/schema';
import { minVersion, outside, validRange } from 'semver';
import pkg from '../../package.json';
import { astroMonthlyBlogResourceLoader } from '@alexanderniebuhr/astro-monthly-blog-resource-loader';

const astroVersion = minVersion(pkg.dependencies.astro)?.version;

Expand Down Expand Up @@ -36,7 +37,27 @@ const resourcesSchema = defineCollection({
}),
});

const automatedresources = defineCollection({
loader: astroMonthlyBlogResourceLoader({
urls: [
'https://raw.githubusercontent.com/withastro/astro.build/main/src/content/blog/whats-new-june-2024.mdx',
'https://raw.githubusercontent.com/withastro/astro.build/main/src/content/blog/whats-new-july-2024.mdx',
'https://raw.githubusercontent.com/withastro/astro.build/main/src/content/blog/whats-new-august-2024.mdx',
],
exclude: [
/github.com/,
/astro.build/,
/x.com/,
/2023.stateofjs.com/,
/astrolicious.dev/,
/astro-tips.dev/,
/reddit.com\/r\/withastro\/$/,
],
}),
});

export const collections = {
docs: starlightSchema,
resources: resourcesSchema,
automatedresources: automatedresources,
};