Support TinaCMS usage with Docusaurus
Supporting the most basic Docusaurus site
npx @docusaurus/init@next init my-website classic
...add Tina
Docusaurus is growing in popularity as a solution for docs. It would be wonderful to support it as well!
P.S. - I would be interested in contributing to help make this happen!
That's very interesting. Since it's React + Markdown based, I suspect that most of the heavy lifting is already done. Definitely something worth checking out.
Yes. We have everything we need, it's just a question of figuring out how to use what we have in the Docusaurus framework. Here's what needs to be figured out:
gatsby-plugin-tinacms we use the wrapRootElement in the gatsby-browser.js file to do this.@tinacms/api-git server so we can write to disk. The gatsby-tinacms-git plugin does this using onCreateDevServer. With Next.js sites it is done more manuallyuseLocalForm. You could look to useRemarkForm for inspiration in setting up that form. BlogPostPage. Specifically, we need the equivalents of fileRelativePath, rawMarkdownBody, and rawFrontmatter. Awesome! Thanks @ncphillips for adding those specific details. This should be enough context for myself (or anyone else) to get started on it.
Most helpful comment
Yes. We have everything we need, it's just a question of figuring out how to use what we have in the Docusaurus framework. Here's what needs to be figured out:
gatsby-plugin-tinacmswe use thewrapRootElementin thegatsby-browser.jsfile to do this.@tinacms/api-gitserver so we can write to disk. Thegatsby-tinacms-gitplugin does this usingonCreateDevServer. With Next.js sites it is done more manuallyuseLocalForm. You could look to useRemarkForm for inspiration in setting up that form.BlogPostPage. Specifically, we need the equivalents offileRelativePath,rawMarkdownBody, andrawFrontmatter.