4 ms·
This is super cool! Tried to set it up for our open source Changelog though and getting some errors, it doesn't seem to work with .mdx files https://github.co
by 0xferruccio 3y ago
This is super cool!
Tried to set it up for our open source Changelog though and getting some errors, it doesn't seem to work with .mdx files
https://github.com/juneHQ/changelog https://github.com/juneHQ/changelog
Anyways this looks super promising
- hunvreus 3y agoI have a very surface understanding of mdx, but basically it's a mix of markdown and JSX syntax, no? Didn't know you could define some sort of fields like you seem to do with: import { MdxLayout } from "components/mdx-layout.tsx"; export const meta = { slug: "all-time-high", publishedAt: "2022-09-16T10:00:00.000Z", title: "All time high", headerImage: "https://june-changelog.s3.eu-central-1.amazonaws.com/changelog_ath_cd256d0719.png", authors: [ (...) I suppose I should be able to hack it by defining it as a JSON frontmatter and some custom delimiters. If you let me know how you would see this working, I'll try and get something working tomorrow.
- 0xferruccio 3y agoHonestly as a v1, I'd just love for you to parse out the whole text file and give me a basic markdown editor! I don't particularly care about having advanced filtering or of parsing my "meta" data
- hunvreus 3y agoThe editor will kinda work for individual mdx files, just not collections. I guess you could try the following to see: media: public content: - name: changelog label: Changelog type: file path: pages/changelogs/2022-in-review.mdx format: code Obviously not super useful at this stage, especially since I haven't figured out mdx support in Codemirror yet. I can probably get collections to work though in the next few days. I'll let you know.