Commit graph

17 commits

Author SHA1 Message Date
nate contino
5f1edd5ac8
docs: simplify imported code blocks syntax (#6830)
* refactor: simplify imported code blocks

- Use `language=<lang>` prop instead of "className="language-<lang>" for imported code blocks

I've been using this in my personal projects ([example](https://raw.githubusercontent.com/nathan-contino-mongo/docusaurus-realm/9a2ebb6a43bbbd7b38899fcc86c903dcc1f61283/docs/sdk/kotlin/migrate-from-java-sdk.mdx)) since it is less verbose.
If this interface is somehow less stable than the `className` prop, feel free to close this. But if both will work going forward
we should probably recommend the simpler of the two.

* Update markdown-features-react.mdx
2022-03-04 07:09:16 +08:00
Joshua Chen
c1e3801ee7
fix(cli): allow passing a list of file names to write-heading-ids (#6500) 2022-01-29 12:21:15 +08:00
Joshua Chen
8140560332
docs: multiple doc improvements (#6449) 2022-01-23 15:49:28 +08:00
Joshua Chen
ba352271e7
fix(website): wrap details in mdx-code-block (#6308) 2022-01-10 20:35:39 +08:00
Joshua Chen
c7da6f5dd3
docs: document MD and JSX interoperability issues (#6307) 2022-01-10 20:05:33 +08:00
Joshua Chen
c45281a581
feat(theme-classic): usable CodeBlock outside markdown (#6216) 2021-12-29 17:17:09 +01:00
Joshua Chen
6a772828c5
docs: add default value for BrowserWindow URL field (#6207)
* docs: fix BrowserWindow URL field

* fix
2021-12-28 15:19:23 +08:00
Joshua Chen
73ee356949
docs: audit grammar issues (#6203)
* docs: audit grammar mistakes

* fix code block language

* revert change

* let's get another
2021-12-27 19:34:04 +08:00
Joshua Chen
0fc7adfba9
docs: document global variables in MDX scope (#5900)
* Adding a note for how to access frontMatter within pages

* Move documentation

Co-authored-by: cd rubin <github@earthling.za.net>
2021-11-07 23:16:04 +08:00
Alexey Pyltsyn
19302c4913
docs: clarify MDX version used (#5575)
* docs: clarify MDX version used

* Update MDX Playground link
2021-09-17 21:27:00 +03:00
Sébastien Lorber
dc4664b489
feat: details/summary theme / MDX component (#5216)
* Details component

* polish arrow animation

* fix text selection bug

* fix some edge cases + polish

* example of overriding baseClassName

* Move Details component to theme-common

* make component work even when JS is disabled or failed to load

* update arrow transform

* Details component: better handling of no-JS fallback mode: avoid delaying arrow navigation when JS (see review)

* prefix css vars with --docusaurus

* improve css arrow styling

* slightly change details/summary design

* better md doc + include quotes and details in doc
2021-07-27 18:45:12 +02:00
Pranab Das
7b2d45a439
docs(v2): Elaboration of raw-loader in markdown react component (#5210)
* docs(v2): Elaboration of raw-loader in React component

* Add prettier ignore for a blocks to avoid unintended semicolon
2021-07-23 10:31:38 +02:00
Sébastien Lorber
c63295a253
docs(v2): wrap mdx usage in mdx-code-block (#5007) 2021-06-18 17:59:51 +02:00
Joshua Chen
3d95a3e6b1
docs(v2): add documentation about importing code files (#4974)
* Add documentation about importing code files

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add warning about breaking API change

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update website/docs/guides/markdown-features/markdown-features-react.mdx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-15 18:38:28 +02:00
Joshua Chen
02b512c2cf
docs(v2): add documentation about importing markdown (#4958)
* Add documentation about importing markdown

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update website/docs/guides/markdown-features/markdown-features-react.mdx

* Run prettier

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-15 12:20:53 +02:00
Sébastien Lorber
6811a72e72
feat(v2): ability to "escape" JSX in MDX files as code blocks (#4278)
* Fix MDX Crowdin issues by wrapping complex JSX in code blocks

* Add a remark plugin to unwrap MDX code blocks

* Update MDX Crowdin doc
2021-02-24 12:34:03 +01:00
Sébastien Lorber
d99d53a236
docs(v2): Reorganize/split the guides doc sections (#3975)
* docs reorg

* refactor docs/markdown features section

* fix broken links after docs refactor
2020-12-30 17:03:25 +01:00