Skip to content

Commit

Permalink
update to astro 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Jan 25, 2023
1 parent e08a99e commit 1d74bca
Show file tree
Hide file tree
Showing 8 changed files with 1,041 additions and 2,152 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store
.astro
4 changes: 0 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import emoji from 'remark-emoji';
import remarkGfm from 'remark-gfm';

export default defineConfig({
experimental: {
contentCollections: true,
errorOverlay: true,
},
site: 'https://nf-co.re/',
integrations: [svelte(), sitemap()],
vite: {
Expand Down
3,153 changes: 1,024 additions & 2,129 deletions package-lock.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 @@ -11,14 +11,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/rss": "^2.0.0",
"@astrojs/rss": "^2.1.0",
"@astrojs/sitemap": "^1.0.0",
"@astrojs/svelte": "^1.0.2",
"@astrojs/svelte": "^2.0.0",
"@fontsource/inter": "^4.5.15",
"@fontsource/maven-pro": "^4.5.13",
"@fontsource/open-sans": "^4.5.14",
"@nanostores/persistent": "^0.7.0",
"astro": "^1.9.2",
"astro": "^2.0.1",
"astro-analytics": "^2.6.0",
"astro-icon": "^0.8.0",
"bootstrap": "^5.3.0-alpha1",
Expand All @@ -30,7 +30,7 @@
"marked": "^4.2.12",
"nanostores": "^0.7.1",
"node-emoji": "^1.11.0",
"octokit": "^2.0.13",
"octokit": "^2.0.14",
"rehype-add-classes": "github:tycol7/rehype-add-classes",
"rehype-autolink-headings": "^6.1.1",
"rehype-highlight": "^6.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z, defineCollection } from 'astro:content';

const events = defineCollection({
schema: {
schema: z.object({
title: z.string(),
subtitle: z.string(),
type: z.enum(['talk', 'workshop', 'hackathon', 'poster', 'tutorial', 'training']),
Expand All @@ -16,13 +16,13 @@ const events = defineCollection({
start: z.date().optional(),
end: z.date().optional(),
duration: z.string().optional(),
},
}),
});
const docs = defineCollection({
schema: {
schema: z.object({
title: z.string(),
subtitle: z.string().optional(),
},
}),
});

export const collections = {
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
13 changes: 2 additions & 11 deletions src/pages/events/rss.xml.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import rss from '@astrojs/rss';

const eventImportResult = import.meta.glob('./**/*.md', { eager: true });
const events = Object.values(eventImportResult);
import rss, { pagesGlobToRssItems } from '@astrojs/rss';

export const get = () =>
rss({
title: 'nf-core: Events',
description: 'Details of past and future nf-core meetups.',
site: import.meta.env.SITE,
stylesheet: '/rss/styles.xsl',
items: events.map((event) => ({
link: event.url,
title: event.frontmatter.title,
// TODO: FIX WITH PROPER FRONTMATTER
// date('r', $event['start_ts'])
// pubDate: event.frontmatter.start_ts,
})),
items: pagesGlobToRssItems(import.meta.glob('./events/*.{md,mdx}')),
});
5 changes: 5 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { vitePreprocess } from '@astrojs/svelte';

export default {
preprocess: vitePreprocess(),
};

0 comments on commit 1d74bca

Please sign in to comment.