Joshua Chen
dedf5ace5f
docs: normalize usage of placeholders ( #6142 )
2021-12-21 14:56:29 +01: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
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
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
Dmitriy Fishman
d7581b38fd
docs: Fix a typo in versioning.md ( #5852 )
2021-11-02 14:23:06 +08: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
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
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
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
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
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
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
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
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
Alexey Pyltsyn
d7e4e422a2
docs(v2): minor tweaks ( #4981 )
2021-06-16 11:04:40 +02:00
Joshua Chen
af3640dca2
docs(v2): replace diff
codeblocks with line highlight ( #4973 )
...
* Replace `diff` codeblocks with line highlight
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add line highlight
2021-06-16 10:29:05 +02:00
Sébastien Lorber
df8a900f9c
feat(v2): add trailingSlash config option ( #4908 )
...
* POC: add trailingSlash option
* integrate the preferFoldersOutput option of fork @slorber/static-site-generator-webpack-plugin
* Fix broken links when using trailing slash => using md links is more reliable
* fix TS issue
* minor polish
* fix doc page being sensitive to trailing slashes
* Add tests for applyTrailingSlash
* rename test files
* extract and test applyRouteTrailingSlash
* update snapshot
* add trailing slash config to serve command
* fix getSidebar() => still sensitive to trailing slash setting
* never apply trailing slash to an anchor link
* Add documentation for trailingSlash setting
2021-06-09 19:59:39 +02:00
Pranab Das
4b5d612009
docs(v2): Fix typo in doc: sidebar.md ( #4820 )
...
Fixed a typo on `highlight-start` in the section **Hideable sidebar**.
2021-05-20 11:28:12 +02:00
Sébastien Lorber
792f4ac6fb
feat(v2): allow user to customize/enhance the default sidebar items generator ( #4658 )
...
* allow and document how to wrap/enhance the default docusaurus sidebar items generator
* improve doc
* doc
* doc
2021-04-21 18:35:03 +02:00
Sébastien Lorber
db79d462ab
feat(v2): auto-generated sidebars, frontmatter-less sites ( #4582 )
...
* POC of autogenerated sidebars
* use combine-promises utility lib
* autogenerated sidebar poc working
* Revert "autogenerated sidebar poc working"
This reverts commit c81da980
* POC of auto-generated sidebars for community docs
* update tests
* add initial test suite for autogenerated sidebars + fix some edge cases
* Improve autogen sidebars: strip more number prefixes in folder breadcrumb + slugs
* fix typo!
* Add tests for partially generated sidebars + fix edge cases + extract sidebar generation code
* Ability to read category metadatas file from a file in the category
* fix tests
* change position of API
* ability to extract number prefix
* stable system to enable position frontmatter
* fix tests for autogen sidebar position
* renamings
* restore community sidebars
* rename frontmatter position -> sidebar_position
* make sidebarItemsGenerator fn configurable
* minor changes
* rename dirPath => dirName
* Make the init template use autogenerated sidebars
* fix options
* fix docusaurus site: remove test docs
* add _category_ file to docs pathsToWatch
* add _category_ file to docs pathsToWatch
* tutorial: use sidebar_position instead of file number prefixes
* Adapt Docusaurus tutorial for autogenerated sidebars
* remove slug: /
* polish the homepage template
* rename _category_ sidebar_position to just "position"
* test for custom sidebarItemsGenerator fn
* fix category metadata + add link to report tutorial issues
* fix absolute path breaking tests
* fix absolute path breaking tests
* Add test for floating number sidebar_position
* add sidebarItemsGenerator unit tests
* add processSidebars unit tests
* Fix init template broken links
* windows test
* increase code translations test timeout
* cleanup mockCategoryMetadataFiles after windows test fixed
* update init template positions
* fix windows tests
* fix comment
* Add autogenerated sidebar items documentation + rewrite the full sidebars page doc
* add useful comment
* fix code block title
2021-04-15 16:20:11 +02:00
besemuna
9715048f79
feat(v2): provide doc sidebar_label through sidebars.js ( #4500 )
...
* feat : update SidebarItemDoc type
* feat : update assertIsDoc
* feat : allow configuring title from sidebar.js
* feat : add docs
* docs : refactor i18n docs to use label in sidebar.js
* test : add test
* Update website/docs/guides/docs/sidebar.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* docs : remove backported docs
Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-03-26 15:11:21 +01:00
Sébastien Lorber
78349480af
chore: rename v2.docusaurus.io urls after domain switch + redirect + cleanups ( #4490 )
...
* prepare v1-v2 domain switch
* rename v1 changelog as CHANGELOG-1.x.md
* switch v1/v2 changelogs
* Cleanup v2.docusaurus.io urls
* add netlify domain redirect
* remove circleci config
* remove another circle file
2021-03-22 20:57:49 +01:00
aehrea
3c165c3b89
docs(v2): fix grammar and improve wording ( #4481 )
...
- resolve grammar issue in Setup heading and rephrase to (subjectively) more clear wording
- more consistent wording in first line of Versioned paths heading
2021-03-22 17:57:11 +01:00
Arijit Kundu
be6ef076f0
docs(v2): corrected the use of delimiters ( #4478 )
2021-03-21 12:23:08 +03:00
Arijit Kundu
9bdb9eb630
docs(v2): fixed broken link in sidebar documentation ( #4472 )
2021-03-19 22:29:03 +03:00
Alexey Pyltsyn
291a72fbae
docs(v2): use explicit heading IDs ( #4460 )
2021-03-19 11:00:41 +01:00
Alexey Pyltsyn
96e7fcef25
feat(v2): add ability to set custom heading id ( #4222 )
...
* feat(v2): add ability to set custom heading id
* Add cli command
* Fix slugger
* write-heading-ids doc + add in commands/templates
* refactor + add tests for writeHeadingIds
* polish writeHeadingIds
* polish writeHeadingIds
* remove i18n goals todo section as the remaining items are quite abstract/useless
* fix edge case with 2 md links in heading
* extract parseMarkdownHeadingId helper function
* refactor using the shared parseMarkdownHeadingId utility fn
* change logic of edge case
* Handle edge case
* Document explicit ids feature
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-05 19:36:14 +01:00
Nahiyan Kamal
f0f3de8008
docs(v2): guide docs typo fix ( #4143 )
2021-02-01 12:02:59 +01:00
Sébastien Lorber
a8ee7fd3e8
docs(v2): i18n doc + polish ( #4014 )
...
* add some initial i18n doc
* i18n doc progress
* i18n tutorial progress
* i18n tutorial progress
* polish Crowdin docs
* i18n sidebar in guides
* polish crowdin doc
* update Crowdin doc a bit
* fix annoying relative link to global site resource in template (breaks i18n tutorial)
* template: use simpler export for homepage
* add markdown page example
* rename mdx.md to interactiveDoc.mdx
* update bootstrap/facebook templates too
* sync init template package scripts
* add slug frontmatter doc
* improve i18n doc
* complete i18n doc
* temporarily enable the localeDropdown
* doc typo
* improve the i18n doc
* Add Git i18n doc
* add missing "--" for npm run options (unfortunately they don't get stripped by npm2yarn, and are required foor npm)
* improve a bit the Crowdin doc
2021-01-19 17:26:31 +01:00
Vamsi Krishna Reddy Satti
d8ef2a9051
docs: fix typo from 'dissapear' to 'disappear' ( #4022 )
2021-01-10 13:20:28 +08:00
Sébastien Lorber
d5d6e2fba2
docs(v2): Add documentation for docs multi-instance support ( #3978 )
...
* Add documentation for docs multi-instance support
* Add documentation for docs multi-instance support
2020-12-30 19:41:42 +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