Skip to content

Commit

Permalink
Migrate all markdown pages
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Dec 28, 2024
1 parent 523164f commit d429b07
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 25 deletions.
22 changes: 0 additions & 22 deletions app/md/about-us.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 56 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,70 @@ import {
} from 'preact-iso'

import { NotFound } from './components/NotFound'
import aboutUsUrl from './routes/about-us.md'
import aboutUsPath from './routes/about-us.md'
import codeOfConductPath from './routes/code-of-conduct.md'
import confPromoInfoPath from './routes/conf/promo-info.md'
import confSpeakerInfoPath from './routes/conf/speaker-info.md'
import joinPath from './routes/join.md'
import signupNextStepsPath from './routes/signup-next-steps.md'
import speakPath from './routes/speak.md'
import volunteerGuidePath from './routes/volunteer-guide.md'
import volunteerPath from './routes/volunteer.md'
import welcomePath from './routes/welcome.md'

import { renderMarkdownRoute } from './utils/renderMarkdownRoute'

const AboutUs = lazy(() => renderMarkdownRoute(aboutUsUrl))
const routes = [
{
url: '/about-us',
component: lazy(() => renderMarkdownRoute(aboutUsPath)),
},
{
url: './conf/promo-info',
component: lazy(() => renderMarkdownRoute(confPromoInfoPath)),
},
{
url: '/conf/speaker-info',
component: lazy(() => renderMarkdownRoute(confSpeakerInfoPath)),
},
{
url: '/code-of-conduct',
component: lazy(() => renderMarkdownRoute(codeOfConductPath)),
},
{
url: '/join',
component: lazy(() => renderMarkdownRoute(joinPath)),
},
{
url: '/signup-next-steps',
component: lazy(() => renderMarkdownRoute(signupNextStepsPath)),
},
{
url: '/speak',
component: lazy(() => renderMarkdownRoute(speakPath)),
},
{
url: '/volunteer-guide',
component: lazy(() => renderMarkdownRoute(volunteerGuidePath)),
},
{
url: '/volunteer',
component: lazy(() => renderMarkdownRoute(volunteerPath)),
},
{
url: '/welcome',
component: lazy(() => renderMarkdownRoute(welcomePath)),
},
]

export default function App() {
return (
<LocationProvider>
<ErrorBoundary>
<Router>
<Route path="/about-us" component={AboutUs} />
{routes.map(({ url, component }) => (
<Route key={url} path={url} component={component} />
))}
<Route default component={NotFound} />
</Router>
</ErrorBoundary>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d429b07

Please sign in to comment.