--- import Layout from './Layout.astro'; // import { markdown } from '@astropub/md'; import markdown from 'markdown-wasm'; import { getCollection } from "astro:content"; import TableOfContents from '../components/TableOfContents.astro'; import { REPOSITORY, EDIT_PAGE } from '../config'; import '../styles/markdown.css'; const { frontmatter, headings, collection, noedit } = Astro.props; let { pathname } = Astro.url; if (pathname.split('')[pathname.length - 1] === '/') pathname = pathname.substring(0, pathname.length - 1); const items = await getCollection(collection) || []; const description = await markdown.parse(frontmatter.description); const isActive = (href: string)=>{ if (pathname.split('')[pathname.length - 1] === '/') { pathname = pathname.split(''); pathname.pop(); pathname = pathname.join(''); } return href === pathname || href === pathname.split('/').slice(0,2).join('/'); } ---

{frontmatter.title}

{!noedit && (
{EDIT_PAGE} )}