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
c3370be64d
refactor: make MDX export a flat TOC list instead of tree ( #6729 )
2022-02-23 15:12:04 +01:00
Joshua Chen
b89d93fab5
refactor: recommend using data-theme without html element selector ( #6668 )
...
* refactor: recommend using data-theme without html element selector
* simplify site CSS
* refactor
2022-02-14 10:23:42 +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
5c447b1ca3
docs: elaborate on Markdown asset linking; document pathname:// ( #6404 )
2022-01-27 23:16:55 +08:00
Joshua Chen
b8fbf7c530
docs: remove mention that CDN resources are caches cross-domain ( #6484 )
2022-01-27 19:21:07 +08:00
Pranab Das
f415da1c95
refactor: self-host KaTeX assets ( #6429 )
...
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-27 11:39:45 +01:00
Nick Schonning
521eb119a7
chore: add cSpell for spell checking ( #6456 )
...
* chore: Add cSpell for spell checking
* chore: exclude map files and remove dups
* chore: exclude more binary files
* chore: remove MD headings
* Update .cspell.json
* fix a few spellings
* fix more
* fix
Signed-off-by: Joshua Chen <sidachen2003@gmail.com>
* fix a few
* oops
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-25 09:40:02 +08:00
Joshua Chen
8140560332
docs: multiple doc improvements ( #6449 )
2022-01-23 15:49:28 +08:00
Joshua Chen
3d7ba337c2
refactor(mdx-loader): use vfile.path to access Markdown file path ( #6443 )
2022-01-22 22:28:50 +08:00
Joshua Chen
e40cafccd5
chore: enable stylelint standard config ( #6442 )
...
* chore: enable stylelint standard config
* remove empty line
* fix
2022-01-22 21:26:35 +08:00
Joshua Chen
6c0da3ee4b
refactor: clean up TODO comments ( #6399 )
2022-01-19 12:10:50 +08:00
Nick Schonning
9f9a96dc80
chore: upgrade lint-staged and globs ( #6369 )
2022-01-15 16:33:09 +08:00
Pranab Das
99dbf1a121
docs: minor fix in the sample config for ESM ( #6340 )
...
The line `return config;` was left by mistake I guess. The function is already returning the `config` object.
2022-01-14 19:24:55 +08:00
Pranab Das
4ebb1ca8c8
chore: upgrade rehype-katex with ESM support, update docs ( #6320 )
...
* chore: upgrade rehype-katex to latest version with ESM support and update the docs
* Update documentation to reflect ESM upgrade is currently optional
* rewording
* final tweaks
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-14 09:06:10 +08:00
Joshua Chen
217b62682d
feat(mdx-loader): preserve hash in image src; support GH themed images ( #6323 )
...
* feat(mdx-loader): preserve hash in image src; support GH themed images
* more refactor
2022-01-13 10:22:48 +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
4872decb42
docs: normalize CodeBlock highlighting ( #6223 )
2021-12-30 10:51:00 +08:00
Joshua Chen
c45281a581
feat(theme-classic): usable CodeBlock outside markdown ( #6216 )
2021-12-29 17:17:09 +01:00
Joshua Chen
96dbb8e7ef
feat(website): improve prism themes ( #6214 )
...
* feat(website): modify Prism dark theme
* update
* Use vsDark
* update crowdin config
* fix light theme as well
* revert comment changes
2021-12-29 21:25:01 +08:00
Joshua Chen
0fa091a0c2
docs: use BrowserWindow for Markdown demos ( #6215 )
2021-12-29 13:49:09 +08: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
4f2330a824
docs: recommend highlighting with comments than number range ( #6204 )
...
* docs: recommend highlighting with comments than number range
* quick fix
2021-12-28 10:55:24 +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
8cd593379c
docs: fix react live scope button color in dark mode ( #6191 )
2021-12-25 16:50:14 +08:00
Joshua Chen
3889e89380
fix(theme-classic): make React elements in pre render correctly ( #6177 )
...
* fix(theme-classic): make React elements in pre render correctly
* Properly fix
* Use MDX
* Add docs
* Better comment
* Update code-block-tests.mdx
2021-12-25 15:27:29 +08:00
Pranab Das
e4f9ab072c
chore: upgrade rehype-katex and katex stylesheet for website ( #6172 )
...
* chore: Update rehype-katex and katex stylesheet for doc website
* Reformat
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-12-23 14:24:56 +08:00
Joshua Chen
5dcfa8fa23
docs: fix import module name of theme/Admonition ( #6164 )
2021-12-22 22:11:11 +08:00
Joshua Chen
cb4265253a
feat(theme-classic): standalone Admonition component ( #5848 )
2021-12-20 17:51:19 +01:00
Yangshun Tay
faef753730
docs: mention admonition quirks with Prettier ( #6135 )
...
* docs: mention admonition quirks with Prettier
* Update markdown-features-admonitions.mdx
* Update markdown-features-admonitions.mdx
* Update markdown-features-admonitions.mdx
2021-12-20 12:14:50 +08:00
Drylozu
fa3926e2a1
feat(theme-classic): allow passing additional attributes to tab headings ( #6082 )
...
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-12-17 18:23:50 +01:00
Joshua Chen
f84eb073e7
docs: mention that SEO through front matter is better than head tag ( #6112 )
2021-12-17 12:29:51 +01:00
Oliver Ullman
1366c31201
feat(core): allow sourcing from multiple static directories ( #4095 )
...
* [WIP] Implementaion of multiple directory static sourcing
* Move default to validation
* Update test
* Refactor
* Port to MDX loader
* Fix
* Move dogfooding assets
* Doc writeup
* Restore assets
* Support absolute paths
* Dogfood absolute path
* Fix
* More tests
* Fix snapshots
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-11-18 22:26:26 +08:00
Swalah Amani
c541e2d83c
misc: replace all "Metadatas" with "Metadata" ( #5871 )
...
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2021-11-09 19:46:10 +01: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
Devtato
dc5a0b7068
docs: elaborate on the usage of MDX plugins ( #5766 )
...
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-10-29 16:31:00 +02:00
Sébastien Lorber
a210e938e4
chore: fix Crowdin again ( #5825 )
2021-10-29 15:37:45 +02:00
Sébastien Lorber
157b41caee
chore: replace doc sample .pdf file by .xlsx to solve Crowdin issue ( #5823 )
2021-10-29 14:46:21 +02:00
Joshua Chen
c8739ec28e
polish(theme-classic): guard against potential definition mistakes in Tabs ( #5674 )
2021-10-14 15:47:03 +02:00
Joshua Chen
d6b4eeb358
feat(theme-classic): make first tab the default tab ( #5647 )
...
* Initial work
* Little doc fix
* Doc fix
2021-10-07 17:06:17 +02:00
Sébastien Lorber
a0c2c52829
chore: remove unused Bootstrap theme ( #5634 )
...
* remove package
* remove bootstrap from doc
* remove bootstrap init template + examples
* remove bootstrap preset
* remaining bootstrap refs
* update lockfile
2021-10-01 17:44:34 +02:00
Erick Zhao
c86dfbda61
feat(v2): allow specifying TOC max depth (themeConfig + frontMatter) ( #5578 )
...
* feat: add all TOC levels to MDX loader
* feat: add theme-level config for heading depth
* test: add remark MDX loader test
* fix: limit maxDepth validation to H2 - H6
* refactor: set default `maxDepth` using `joi`
* refactor: `maxDepth` -> `maxHeadingLevel
* refactor: invert underlying TOC depth API
* refactor: make TOC algorithm level-aware
* feat: add support for per-doc TOC heading levels
* feat: support document-level heading levels for blog
* fix: correct validation for toc level frontmatter
* fix: ensure TOC doesn't generate redundant DOM
* perf: simpler TOC heading search alg
* docs: document heading level props for `TOCInline`
* Update website/docs/guides/markdown-features/markdown-features-inline-toc.mdx
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
* docs: fix docs (again)
* create dedicated test file for heading searching logic: exhaustive tests will be simpler to write
* toc search: add real-world test
* fix test
* add dogfooding tests for toc min/max
* add test for min/max toc frontmatter
* reverse min/max order
* add theme minHeadingLevel + tests
* simpler TOC rendering logic
* simplify TOC implementation (temp, WIP)
* reverse unnatural order for minHeadingLevel/maxHeadingLevel
* add TOC dogfooding tests to all content plugins
* expose toc min/max heading level frontmatter to all 3 content plugins
* refactor blogLayout: accept toc ReactElement directly
* move toc utils to theme-common
* add tests for filterTOC
* create new generic TOCItems component
* useless css file copied
* fix toc highlighting className conflicts
* update doc
* fix types
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-29 11:19:11 +02:00
Joshua Chen
89cb975cc4
docs(website): document npm2yarn plugin + use new Tabs API everywhere ( #5590 )
...
* Update docs
* Bad grammar
* Add code highlight
2021-09-22 12:25:21 +02: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
Joshua Chen
5f003bcabd
feat(theme-classic): allow passing tab label and default value through TabItem ( #5442 )
...
* Implement feature
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Dogfood edge case
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Correct keydown handling
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update index.tsx
* Update markdown-features-tabs.mdx
* Update markdown-features-tabs.mdx
* polish tabs doc
* Update markdown-features-tabs.mdx
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-01 12:44:37 +02:00
Alexey Pyltsyn
0dd4892b0f
refactor: improve styles of Details component ( #5402 )
...
* refactor: improve styles of Details component
* Use vendor prefix for ::marker
* Wording
2021-08-26 16:46:35 +02:00
Sébastien Lorber
a2ab4d33c8
feat: Markdown page-specific head metadatas ( #5330 )
...
* Markdown page-specific head metadatas
* ensure mdxType attribute is not added to the final markup
* polish doc
* Update packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
* fix eslint annoying rule error
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-08-11 11:39:01 +02:00
Alexey Pyltsyn
fdda2bd7fd
docs: fix broken link to syncing tab choices section ( #5283 )
2021-08-04 10:37:10 +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