Joshua Chen
9ad6de2b85
feat(content-blog): new readingTime plugin option ( #5702 )
2021-10-21 15:26:10 +02:00
Sébastien Lorber
92002b6bd3
docs: rename docusaurus.config.js route + redirects cleanup ( #5755 )
2021-10-21 15:16:54 +02:00
Joshua Chen
2398943c17
feat(core): write-heading-ids options maintainCasing, overwrite ( #5740 )
2021-10-21 12:33:52 +02:00
Joshua Chen
3127f12654
feat(content-docs): new front matter options to customize pagination ( #5705 )
2021-10-21 12:27:57 +02:00
Thanasis Katsadas
1e0a32924b
docs(v2): Fix typo in using-plugins.md ( #5750 )
2021-10-20 15:38:25 +02:00
Joshua Chen
ae3596df39
docs: add h4 into toc on certain pages ( #5728 )
2021-10-19 20:15:11 +02:00
Alexey Pyltsyn
647c8a2918
docs: fix npm init command with options ( #5712 )
...
* docs: fix npm init command with options
* Update test-release.sh
2021-10-15 16:31:15 +03:00
Alexey Pyltsyn
92104c7c3b
feat: make Translate children optional ( #5683 )
...
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-14 18:39:41 +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
7b64e85dc3
docs: Algolia plugin must be enabled before crawling the site ( #5658 )
2021-10-07 17:00:47 +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
f6ec757aa0
feat: npm init docusaurus, yarn create docusaurus ( #5635 )
...
* initial create-docusaurus impl
* cleanup
* @docusaurus/init renamed to create-docusaurus
* 0.0.6
* update lockfile
* fix lint
* remove npm2yarn for "npm init" because npm2yarn doesn't convert it and yarn result fails to execute
* prettier
* add correct version
* prettier
* prettier
* prettier
* prettier
* fix annoying --config .prettierrc issue
2021-10-07 16:06:42 +02:00
Joshua Chen
7f7b858cd4
refactor: make all Props defined as interface + readonly ( #5636 )
...
* Initial work
* Fix
2021-10-05 19:04:24 +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
Sébastien Lorber
afff053cc9
chore: prepare Algolia migration ( #5632 )
...
* prepare Algolia migration
* Update website/docs/search.md
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
2021-10-01 15:58:24 +02:00
Bharat Middha
09550b0535
feat: properly type-check the Docusaurus config of new sites ( #5589 )
...
* fix: makes types DocusaurusConfig optional to match docs
* add UserDocusaurusConfig with required keys for user config
* convert UserDocusaurusConfig to use util type
* Docusaurus website config should be type-checked by CI + fix all existing issues
* add doc for config typechecking
* Update template configs for TS autocompletion
* fix last config typechecking bugs
* reapply prettier
* reapply prettier-docs
* Fix TS doc: add missing ()
* fix some docu plugin types
* add "const config" for simpler jsdoc annotation
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-30 17:49:44 +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
Jason Bosco
81877d7582
docs: add additional search options, typesense and local search ( #5489 )
...
* docs: add additional search bar options - typesense and local search
* docs: add typesense docsearch to community resources
* improve search doc, explain better where to get support
* improve search doc
* improve search doc
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-22 17:41:27 +02:00
Joshua Chen
e1f4677d04
fix(module-type-aliases): move @type packages to dependencies ( #5601 )
...
* Move devDeps to deps
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update init template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-09-22 14:49:25 +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
29e06d0677
feat: make tags route path configurable ( #5545 )
2021-09-21 19:19:18 +02:00
Joshua Chen
e274c72642
docs: fix more references to Discord channels ( #5585 )
2021-09-19 09:45:21 +03: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
cc75e85adb
docs: update all Discord links ( #5581 )
2021-09-17 21:25:31 +03:00
Chris Chinchilla
beedadd498
docs: fix code example ( #5566 )
2021-09-15 18:19:53 +03:00
Jordan Lee
546bf5db4c
docs: minor grammatical correction ( #5559 )
2021-09-15 18:18:51 +03:00
Kyriet
9a089d4886
docs: add note about partials on Create doc page ( #5543 )
2021-09-11 12:42:17 +03:00
Forresst
02eee61aa5
docs: improve escape pipe in Markdown tables ( #5539 )
...
* Test escape pipe in Markdown table
From a remark on Crowdin:
> The value for the Type entry in the plugin-content-blog page is strange.
> In English documents, the Type item value is normally displayed.
> ex) editUrl: string | EditUrlFunction
> However, in French documentation, the Type item value is shown as an unknown code.
> ex) editUrl:!!crwdBlockTags_249_sgaTkcolBdwrc!!
> ex) blogSidebarCount: !!crwdBlockTags_250_sgaTkcolBdwrc!!
This is a test to see if the other way to escape a pipe in a markdown table could solve the problem.
* Fix all docs to replace | by \|
* Keep `code`
* Apply suggestions from code review
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-09-08 14:58:48 +03:00
Sébastien Lorber
4f59f0782e
docs: mention Netlify ignore build setting ( #5486 )
...
* mention Netlify ignore build setting
* doc backport
2021-09-03 19:34:10 +02: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
Gabriel Csapo
cb8718a1e3
feat: adds blog archive route ( #5428 )
...
* [feature] adds blog archive route
* Update plugin-content-blog.md
* fix TS issues + minor refactors
* remove useless css
* add translation apis
* add missing translations
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-02 17:35:13 +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
Sébastien Lorber
553f914639
feat: TypeScript presets/plugins should expose Options typing ( #5456 )
...
* each TS plugin should export option types + preset export option / themeConfig types + remove TS typechecking for the bootstrap theme
* each TS plugin should export option types + preset export option / themeConfig types + remove TS typechecking for the bootstrap theme
* fix remaining TS errors
* fix remaining TS errors
* TS fix
* Add JSDoc type annotations to init templates and TS docs
* missing title char
2021-09-01 12:14:40 +02:00
Sébastien Lorber
42e70e6d42
feat: new docs options: versions.{badge,className} ( #5454 )
...
* docs: add versions.{badge,className} options
* remove badge option test
2021-08-31 15:40: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
Alexey Pyltsyn
e6f4a9b231
docs: clarify using custom attributes for navbar link ( #5423 )
2021-08-26 14:29:05 +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
Palash Shrivastava
b665b5b859
docs: specify proper min Node.js version in Travis CI example ( #5406 )
2021-08-23 00:13:53 +03:00
Joshua Chen
8e1cde135c
feat: make blog config options and navbar versions dropdown label translatable ( #5371 )
...
* Translate versions dropdown label
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make blog options tranlatable
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix names
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Rename functions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Rename translations path
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update Chinese translations
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove space
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add jest test
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix copyright typing
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update test
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update options
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix test
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-20 17:11:59 +02:00
Sébastien Lorber
f40ce05102
refactor: clean Canny integration + rename 'Feedback' to 'Feature Requests' + improve TS doc page ( #5389 )
...
* Better Canny integration
* Add missing netlify redirects
* polish
* TS doc: mention it's possible to use JSDoc in config
* issue templates: use /feature-requests new url
2021-08-20 11:42:13 +02:00
Isaac Philip
f9c79cbd58
feat: doc tags (same as blog tags) ( #3646 )
...
* [v2] tags to doc, same as tags to blog - [IN PROGRESS]
- Addition of plugin-content-docs
- Addition of DocTagsListPage in `docusaurus-theme-classic`
! Error exists for this commit towards the theme aspect and help required.
Commit towards #3434
* docs: make tags list page work
* temp: disable onBrokenLinks
* theme bootstrap: create DocTagsListPage
* DocTagsPage added and functionality too
- individual doc tag page added to show docs for that specific tag
* Added all Docs Tags Link
* add some shared tag utils
* move tag tests to _dogfooding
* fix type
* fix some tests
* fix blog test
* refactor blog post tags handling
* better yaml tag examples
* better dogfood md files
* refactor and factorize theme tag components
* finish DocTagDocListPage
* Extract DocItemFooter + add inline tag list
* minor fix
* better typings
* fix versions.test.ts tests
* add tests for doc tags
* fix tests
* test toTagDocListProp
* move shared theme code to tagUtils
* Add new theme translation keys
* move common theme code to tagUtils + add tests
* update-code-translations should handle theme-common
* update french translation
* revert add translation
* fix pluralization problem in theme.docs.tagDocListPageTitle
* add theme component configuration options
* add more tags tests
* add documentation for docs tagging
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-19 10:31:15 +02:00
Sébastien Lorber
589a59ba8a
docs: remove docusaurus-preset-name from preset doc ( #5372 )
...
* doc: docusaurus-preset-name does not exist and is confusing for some users
* doc: docusaurus-preset-name does not exist and is confusing for some users
2021-08-17 19:38:35 +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
Joshua Chen
7d0272fe4d
feat(plugin-blog): allow 'ALL'
as postsPerPage
option value ( #5354 )
...
* 'ALL' option
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Guard against zero posts
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove redundant code
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-17 13:07:18 +02:00
Erick Zhao
c76dfb8a2c
docs: update docusaurus-plugin-sass
instructions ( #5352 )
...
The `docusaurus-plugin-sass` plugin has `sass` as a peer dependency, so you
need to install that package as well, as per their README.
2021-08-13 12:47:13 +02:00
Sébastien Lorber
295e77cc09
refactor(core): replace useDocusaurusContext().isClient by useIsBrowser() ( #5349 )
...
* extract separate useIsClient() hook
* for consistency, rename to `useIsBrowser`
* useless return
* improve doc for BrowserOnly
* update snapshot
* polish
2021-08-12 19:02:29 +02:00
Joshua Chen
ee6ebc4877
refactor: better typing + remove unnecessary eslint-disable ( #5335 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix a few errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore default value
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use custom route config
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Address a few suggestions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert logo change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore key
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Oops
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove use of any
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove eslint-disable
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Put type reference back
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-11 16:07:17 +02:00