Skip to content

Commit

Permalink
Merge pull request #1876 from nf-core/add-typeform-widget
Browse files Browse the repository at this point in the history
Add typeform widget
  • Loading branch information
mashehu authored Jul 17, 2023
2 parents 25a1c33 + 9c4939a commit a8f0b70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const events = defineCollection({
schema: z.object({
title: z.string(),
subtitle: z.string(),
type: z.enum(['bytesize','talk', 'hackathon', 'training']),
type: z.enum(['bytesize', 'talk', 'hackathon', 'training']),
start_date: z.string(),
start_time: z.string().transform((str) => str.replace(/\s+(\w+)/, ' ($1)')),
end_date: z.string(),
Expand All @@ -18,6 +18,7 @@ const events = defineCollection({
end: z.date().optional(),
duration: z.string().optional(),
embed_at: z.string().optional(),
import_typeform: z.boolean().optional(),
}),
});
const docs = defineCollection({
Expand All @@ -40,4 +41,4 @@ export const collections = {
events: events,
docs: docs,
about: about,
};
};
1 change: 1 addition & 0 deletions src/pages/events/[...event].astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ video = video?.filter((v) => v.includes('youtube.com') || v.includes('youtu.be')
const id = video?.replace('https://www.youtube.com/watch?v=', '').replace('https://youtu.be/', '');
---

{frontmatter.import_typeform && <script async src="https://embed.typeform.com/next/embed.js" />}
<MarkdownTocLayout
title={title}
subtitle={subtitle}
Expand Down

0 comments on commit a8f0b70

Please sign in to comment.