Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to support markdown format posts #30

Open
wanghaisheng opened this issue Jun 10, 2023 · 1 comment
Open

how to support markdown format posts #30

wanghaisheng opened this issue Jun 10, 2023 · 1 comment

Comments

@wanghaisheng
Copy link

under theme/src/pages there is only .astro format

@wanghaisheng
Copy link
Author

there would be a layout for other themes i can found like this

---
import Layout from '~/layouts/PageLayout.astro';

import { MetaSEO } from '~/types';

export interface Props {}

const { frontmatter } = Astro.props;

const meta: MetaSEO = {
  title: frontmatter?.title,
};
---

<Layout {meta}>
  <section class="px-4 py-16 sm:px-6 mx-auto lg:px-8 lg:py-20 max-w-4xl">
    <h1 class="font-bold font-heading text-4xl md:text-5xl leading-tighter tracking-tighter">{frontmatter.title}</h1>
    <div
      class="mx-auto prose prose-lg max-w-4xl dark:prose-invert dark:prose-headings:text-slate-300 prose-md prose-headings:font-heading prose-headings:leading-tighter prose-headings:tracking-tighter prose-headings:font-bold prose-a:text-blue-600 dark:prose-a:text-blue-400 prose-img:rounded-md prose-img:shadow-lg mt-8"
    >
      <slot />
    </div>
  </section>
</Layout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant