Skip to content

Commit

Permalink
feat: add shared conference data
Browse files Browse the repository at this point in the history
  • Loading branch information
rileychh committed Aug 29, 2024
1 parent 9347035 commit a48dedc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { defineConfig } from 'vitepress'
import { conference } from '../data/conference'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'COSCUP 2024',
title: `COSCUP ${conference.year}`,
description: 'A VitePress Site',
srcDir: 'content',
base: '/2024',
base: `/${conference.year}`,
cleanUrls: true,
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
Expand Down
20 changes: 20 additions & 0 deletions data/conference.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Conference data
*
* This is where you can define shared data specific to the current conference.
*
* @example
* <script setup lang="ts">
* import { conference } from '#data/conference'
*
* const start = conference.startDate.toLocaleDateString()
* const end = conference.endDate.toLocaleDateString()
* </script>
*
* Conference date: {{ start }} ~ {{ end }}
*/
export const conference = {
year: 2024,
startDate: new Date('2024-08-03'),
endDate: new Date('2024-08-04'),
}

0 comments on commit a48dedc

Please sign in to comment.