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
dedf5ace5f
docs: normalize usage of placeholders ( #6142 )
2021-12-21 14:56:29 +01: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
Himanshu
c0a99786b3
docs: elaborate on "docs-only" and "blog-only" ( #6131 )
...
* rephrased documentation
* Rewording
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-12-20 09:29:43 +08:00
Joshua Chen
18cb13d6cc
docs: refactor docs sidebar doc ( #6130 )
...
* docs: refactor docs sidebar doc
* Edits
2021-12-19 19:08:59 +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
Joshua Chen
7db4884853
refactor(website): make deploy preview open next version docs by default ( #6120 )
...
* refactor(website): make deploy preview open next version docs by default
* Fix links
2021-12-17 11:00:12 +08:00
Sébastien Lorber
cfae5d0933
feat(content-docs): sidebar category linking to document or auto-generated index page ( #5830 )
...
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Armano <armano2@users.noreply.github.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-12-03 14:44:59 +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
Dmitriy Fishman
d7581b38fd
docs: Fix a typo in versioning.md ( #5852 )
2021-11-02 14:23:06 +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
Dominik Meyer
ab127e528d
doc: fix typo in "create a doc" ( #5818 )
...
* Update docs-create-doc.mdx
* Update docs-create-doc.mdx
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-10-29 14:48:36 +08:00
Joshua Chen
ae3596df39
docs: add h4 into toc on certain pages ( #5728 )
2021-10-19 20:15:11 +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
Joshua Chen
eaacb0e98a
feat(theme-classic, plugin-docs): sidebar item level-specific className + allow customization ( #5642 )
...
* Initial work
* Complete function
* Avoid duplication
* More dedupe
* Make everything constants
* Change casing & docs
2021-10-07 16:59:02 +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
Joshua Chen
3f1f8255a2
chore: upgrade Prettier + regenerate lock file ( #5611 )
...
* Bump deps
* Run prettier
* Format docs
* Minor refactor
* Collapse objects
* Fix type
* Update lock file
2021-09-30 12:54:17 +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
Chris Chinchilla
beedadd498
docs: fix code example ( #5566 )
2021-09-15 18:19:53 +03:00
Kyriet
9a089d4886
docs: add note about partials on Create doc page ( #5543 )
2021-09-11 12:42:17 +03:00
swyx
194f429c1f
fix: add docs tag validation to solve #5478 ( #5479 )
...
* fix: add docs tag validation to solve #5478
fix: add docs tag validation to solve #5478
* Update docFrontMatter.ts
* Update docs-create-doc.mdx
* improve tag validation error messages + tests
* improve tags doc
* fix test
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-03 14:43:24 +02: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
Joshua Chen
1481bc2eb7
docs: document doc tags + refinements ( #5433 )
...
* Various improvements
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Oops
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-30 11:03:03 +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
Joshua Chen
493225a3c6
feat(plugin-blog): multi-authors support + authors.yml global configuration ( #5396 )
...
* Complete function
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* A lot of blank lines
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More lenient validation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove or
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Simpler logic
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Expand docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Better docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Dogfood
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More writeup
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Polish
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Polish
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Move mergeAuthorMap to authors.ts
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Unbreak relative assets
* Update docs
* Clarify in docs
* simplify feed authors
* rename authorMap -> authorsMap
* mergeAuthorsMap -> getBlogPostAuthors
* website => 5 blog posts per page
* improve authors map file
* Extract new theme authors components + display in row
* add comment for meta array syntaxes
* blog => getPathsToWatch should watch authorsMap file
* remove useless v1 blog FBID frontmatter
* keep older frontmatter syntax for now
* revert blog frontmatter
* Better console message
* better blog authors frontmatter impl
* add multi authors to beta blog post + fix some authors margins
* fix React key
* Refactor: mdx loader should support a more flexible assets system (poc, not documented yet)
* better display of blog post authors: adapt layout to authors count + add line clamp
* smaller local image
* fix blog feed tests
* fix blog frontmatter tests + improve validation schema
* add more frontmatter tests
* add tests for getAuthorsMapFilePath
* tests for validateAuthorsMapFile
* add tests for readAuthorsMapFile
* test getAuthorsMap
* exhaustive tests for getBlogPostAuthors
* fix remaining tests
* missing blog plugin author tests
* fix windows tests
* improve blog multi-author's doc
* Use new format in init template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Improve error message
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* update feed snapshot
* blog authors: limit to 2 cols + fix margins for no authors
* minor doc improvements
* better init template blog posts, demonstrating Blog features
* replace the legacy blog author frontmatter in remaining places
* Prefer using clsx
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* cleanup getColClassName
* remove blog author name/title line-clamping
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-26 12:21:58 +02:00
Paul O’Shannessy
8341527fc9
refactor: rename Git master branch to main ( #5345 )
...
* Prepare to renaming master branch to main
* Update CONTRIBUTING.md
* Update packages/docusaurus-migrate/src/__tests__/__fixtures__/missing_version_website/website/package.json
* Update packages/docusaurus-migrate/src/__tests__/__fixtures__/complex_website/website/package.json
* Update packages/docusaurus-migrate/src/__tests__/__fixtures__/simple_website/website/package.json
* missing master -> main replaces
* useless char
* For GH Pages org deploy, DEPLOYMENT_BRANCH env is now required
* fix versioning page
* fix vercel links
* update deployment.mdx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-17 18:41:53 +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
Sébastien Lorber
cabb768473
feat: blog posts support /YYYY/MM/DD/blog-post/index.md pattern + blog frontmatter can reference relative images ( #5309 )
...
* POC of blog post folder
* add parseBlogFileName with tests + refactor and extract processBlogSourceFile in separate method
* improve blog date pattern doc + link from content plugin guides to API ref docs
* Some FrontMatter fields should be able to reference relative image assets, converted to Webpack require calls and exposed as frontMatterAssets
* remove log
2021-08-06 17:51:59 +02:00
Joshua Chen
c603056f66
docs: refactor API documentation ( #5219 )
...
* Refactor plugin-docs documentation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Refactor theme-configuration
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Refactor plugin-blog docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix link
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* plugin-pages
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Interchange table columns
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fixes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor improvements
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix hash link
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Move blog front matter to API
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add more blog documentation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update blog.md
* Update blog.md
* Update blog.md
* Update website/docs/blog.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-04 16:35:17 +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
Sébastien Lorber
083037d7a5
refactor: redesign admonitions/callouts/quotes ( #5193 )
...
* prepare admonitions redesign
* Docusaurus admonition cleanup
* cover more edge cases in Docusaurus admonitions page: interleaving code blocks and links
* cover more edge cases in Docusaurus admonitions page: interleaving code blocks and links
* update Infima with new alerts
2021-07-23 17:10:38 +02:00
Joshua Chen
24156efcfb
feat: docs plugin options sidebarCollapsible + sidebarCollapsed ( #5203 )
...
* Add prop
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add `collapsible` option to sidebar item
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add eslint-ignore
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Move new page
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Allow in autogenerated
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Move config options to plugin-docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make non-collapsible items always expanded
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* docs versioning cli should receive a single options object
* Update cli.test.ts
* revert validateCategoryMetadataFile change
* remove theme usage of themeConfig.sidebarCollapsible
* better handling of sidebar item category inconsistencies + add warning message
* Update snapshot
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Handle plugin option inconsistencies
* improve doc for new sidebarCollapsible doc options
* remove warning in fixSidebarItemInconsistencies as it will be annoyed for versioned sites, as "collapsed" is already persisted in sidebar json files
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-23 14:24:36 +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
tohid nateghi
a2729128db
docs: user should restart docusaurus after adding prism additionalLanguage ( #5191 )
...
* Update markdown-features-code-blocks.mdx
if you add php language and don't restart your server, you will get an error like this
uncaught Error: Cannot find module './prism-php'
until you restart your server
* Update website/docs/guides/markdown-features/markdown-features-code-blocks.mdx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-20 15:38:04 +02:00
Rami Yushuvaev
9b9f38cd50
docs(v2): Rewrite markdown images section ( #5064 )
...
* Rewrite markdown images section
Before it looked like we have two ways to display images, now it's three ways. Each syntax has a separate example.
This way it's clear, I see each method and the code example.
Before there were 2 methods in a single code block.
* fix typo in `markdown-features/markdown-features-assets`
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Rewrite image display section using CommonJS require
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Rewrite image display section using ES imports
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* prettier doc
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-30 15:27:44 +02:00
Rami Yushuvaev
3fe7389ee2
docs(v2:) Divide markdown-features/code-blocks
to smaller sections ( #5061 )
...
* Divide `markdown-features/code-blocks` to smaller sections
This PR adds few more heading to split the content to small topics.
This way users like me will be able to scroll directly to the specific section, instead of reading all the documentation.
I add to read the entire section because It was not divided into sections. Not a great user experience.
* Use `<h3>` heading
2021-06-25 19:25:15 +02:00
bperlmutter
1d041127b1
docs(v2): correct typo ( #5066 )
2021-06-25 16:18:40 +02:00
Sébastien Lorber
c63295a253
docs(v2): wrap mdx usage in mdx-code-block ( #5007 )
2021-06-18 17:59:51 +02:00