I'm currently looking into migrating away from Gatsby. I have a Meeting content collection type which can have some downloadable files specified in the frontmatter. For example, the slides field for PDF files.
File structure:
content/
├─ meetings/
│ ├─ 2023-07-27/
│ │ ├─ index.md
│ │ ├─ cover.png
│ │ ├─ slides.pdf <-- I want to make this available in build output
Markdown frontmatter:
---
title: "Introduction"
date: 2023-07-27
presenters:
- Author 1
- Author 2
cover: ./cover.png
slides: ./slides.pdf
---
The general solution seems to just be "use the public folder," but there are a few issues with this:
- I would have to duplicate folder structure between
publicandcontent. - Image assets are co-located with the markdown file in
contentin order to take advantage of Astro's image optimization/schema validation. Decap CMS only supports one media directory, so if I change it topublic, I would lose any benefits for images.
I find it strange that Astro allows image assets to be co-located with content collection MD files (and copies them into build output) but not any other types of files.