Comments and documentation is completely absent
OperationalFallacy opened this issue · comments
Hi,
This is a very useful repository! I like how well it integrates with the example project on graphcms. And it helped me to integrate graphcms into my next.js project, I'm so happy this repo uses all known and standard packages, including Chakra-ui for styling.
Question: why the docs missing? Was it intentional?
For example, repo structure is not obvious. Components seem well organized and have multi-level references, however it is impossible to understand the overall design for components.
The code is not documented either. So things like parseColumnsMdx https://github.com/GraphCMS/reference-marketing-website/blob/main/utils/_parseColumnsMdx.js#L13 are pretty hard to understand unless one adds multiple debugging statements and logging.
Unit tests would be nice to have, even for a demo purpose without full coverage.
Thanks!
We don't typically "document" these references. They are aimed at those familiar with all of the moving parts to take, and see how GraphCMS applies in that domain, in this example we are using next-mdx-remote
with GraphCMS. Improving documentation is something we could consider though, for sure.
As for the code you have linked to, all that's happening here is we are returning a new object for each of the columns
passed in. Inside of this object we are assigning the new object content
to contain the markdown
(the raw content), and then mdx
which is the serialized markdown from next-mdx-remote
.
Thanks for checking out this repo.