Merge or Link README md and mdx
stefan-wild opened this issue · comments
Why
Both do similar things and need manual syncing,
What
Maybe reference README.md
inside README.mdx
, that way we still have the frontmatter and extra info in the mdx, without having to duplicate stuff in both readme files
Definition of done
A clear and concise description of what you expected to happen in order to consider the feature completed.
- Description/Installation/Usage only needs to be updated in one file, and show up both in https://docs.wild.plus/ and in the repo readme
ok, I had a look, and I don't think its worth it
import Readme from './README.md';
<Readme />
should work, but all README.md
files are ignored with the doczrc.js
config
I got it to work with raw-loader and markdown-to-jsx
, but then the styling is different, especially for code blocks (also with different classNames for the code highlighting)
import { compiler } from 'markdown-to-jsx';
import Readme from '!!raw-loader!../../submodules/eslint-config/README.md';
<section>{compiler(Readme, {})}</section>
There isn't a convenient way to do that.
import Readme from './README.md';
<Readme />
Technically, this should work, but we need to ignore the README.md file from docz.
As @stefan-wild suggest, we can simply link the docs.wild.plus page from the README.md.