Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041const SITE_URL = 'https://roe.dev'
function yamlEscape (str: string): string { return str.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}
export function mdFrontmatter (path: string, meta: { title: string, description?: string }): string { const lines = ['---'] lines.push(`title: "${yamlEscape(meta.title)}"`) if (meta.description) { lines.push(`description: "${yamlEscape(meta.description)}"`) } lines.push(`url: ${SITE_URL}${path}`) lines.push('---') return lines.join('\n')}
export function mdResponse (content: string): Response { return new Response(content, { headers: { 'Content-Type': 'text/markdown; charset=utf-8' }, })}
export function formatDate (dateStr: string): string { const date = new Date(dateStr) return date.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric', })}
export type { Talk } from '#shared/cms/talks'
export interface Conference { name: string dates: string link?: string location?: string}