Posted on 27th May 2026 at 10:30 by Admin
Gemini
Astro automatically adds a special property called file to the Astro.props object of your Markdown files. This property contains the absolute system path to that specific file.
Create PostMeta.astro component
in src/components.
Just prints the file path and URL slug if showMeta is true.
src/pages/blog/[…slug].astro
Get the value of showMeta. Display the meta info at the bottom of the page if true.
Modify schema
Add optional showMeta flag to /src/content.config.ts