antfu / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question] How to specify template on .md files in file routing

Codermar opened this issue · comments

I am trying to use different templates for the md files used in file routing. i.e. the about.md file uses the default template.
My expectation would be that I could specify the template in the meta section of the md. file as in:

---
title: About
layout: myLayout
---

or

---
title: About
meta:
  layout: bricks
---

I don't see this documented anywhere. Is it possible? How would I do this?
(My recommendation would be to add this to the out of the box example of about.md or document it somewhere)

Thanks

commented

@Codermar this is already possible - you can simply paste the following at the end of your markdown file:

<route lang="yaml">
meta:
  layout: bricks
</route>

Thank you!