Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

chore(docs): allow to use .mdx format in docs #330

Closed
wants to merge 8 commits into from

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Oct 6, 2018

I made similar thing for SUIR recently, now I want to ship it there and and simplify your life 🐱

Pros

  • much simplier format, you can compare how changed Quick Start page, this will simplify editing of doc pages
  • formatting will be supported in the next release of Prettier

Cons

@codecov
Copy link

codecov bot commented Oct 6, 2018

Codecov Report

Merging #330 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #330   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files          41       41           
  Lines        1337     1337           
  Branches      168      193   +25     
=======================================
  Hits         1228     1228           
  Misses        105      105           
  Partials        4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2dd320...53e599f. Read the comment docs.

@levithomason
Copy link
Member

We need babel to wrap prop types again, strip debug statements from prod builds, and generate handled props. So I think this is inevitable.

I like the idea of easily editable docs. However, we also loose typings / highlighting in doc pages by doing this. In comparing the added dependencies/complexity to use markdown in docs compared to how many doc edits we get, I'm not sure the tradeoff is worth it. I think I'd prefer less deps and a simpler build opposed to easier contributing path. Why? I don't think we'll have that many contributions compared to our own wrangling of the extra code and logic.

Feedback?

@layershifter
Copy link
Member Author

However, we also loose typings / highlighting in doc pages by doing this. In comparing the added dependencies/complexity to use markdown in docs compared to how many doc edits we get, I'm not sure the tradeoff is worth it.

It's not usual markdown, this is mdx format.

Formatting will be support by Prettier in the next release, VSCode has already a plugin (mdx-js/mdx#119), I'm think that Webstorm will support it soon, too.

@hughreeling
Copy link
Contributor

https://www.docz.site/

…ore/use-mdx

# Conflicts:
#	docs/src/routes.tsx
#	docs/src/views/QuickStart.tsx
@layershifter
Copy link
Member Author

MDX support by prettier@1.15 (is not released yet):
https://deploy-preview-5296--prettier.netlify.com/blog/2018/10/00/1.15.0.html
prettier/prettier#4975


@hughreeling I dont tried Docz, it may be an option.

@layershifter
Copy link
Member Author

I've updated prettier and resolved merge conflicts.

@layershifter
Copy link
Member Author

We will definitely go with a prebuilt solution, most of them support MDX out of the box.

@layershifter layershifter deleted the chore/use-mdx branch November 15, 2018 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants