Alexey Pyltsyn
a96878048d
refactor: standardize using media queries ( #5630 )
...
* refactor: standardize using media queries
* Better reusing
2021-10-01 16:09:51 +02:00
Sébastien Lorber
9d129631b6
fix: text/link hydration bug ( #5629 )
2021-09-30 19:54:40 +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
Alexey Pyltsyn
4dbc458a22
refactor: various TOC improvements ( #5627 )
2021-09-30 12:22:32 +02:00
Alexey Pyltsyn
3ea96b8e00
chore: upgrade Terser-related dependencies ( #5609 )
2021-09-29 11:57:11 +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
Alexey Pyltsyn
b62a12bfc6
chore: upgrade dependencies ( #5608 )
...
* chore: upgrade dependencies
* Revert github-slugger
* Fixes
* Update snapshots
* Update Babel deps
2021-09-24 16:36:41 +02:00
Alexey Pyltsyn
a52d499218
fix: do not use ideal image plugin in dev env ( #5540 )
...
* fix: do not use ideal image plugin in dev env
* Back to JS
2021-09-23 15:41:12 +02:00
Joshua Chen
452f85b5a3
refactor(core): enforce noImplicitAny ( #5605 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove .d.ts files
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-09-23 15:25:16 +02:00
Alexey Pyltsyn
e66e045b74
fix(docs): create tags route if only tags exists ( #5606 )
2021-09-23 13:02:54 +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
Alexey Pyltsyn
02822b8a42
refactor: use only one close icon ( #5487 )
2021-09-22 13:36:37 +02:00
Alexey Pyltsyn
8a85031078
refactor: use CSS Modules for styles of toggle ( #5592 )
2021-09-22 12:31:05 +02:00
Sébastien Lorber
b403356dbd
fix(preset-classic): fix TS build issue ( #5603 )
2021-09-22 12:15:39 +02:00
Stefan Norberg
dc5ec324dc
feat: make Webpack url-loader limit configurable (env variable) ( #5498 )
...
* Make urlLoaderLimit in the webpack config user-overridable via environment variable 'URL_LOADER_LIMIT'.
* Apply suggestions from code review
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
* Changes as per @slorber's suggestions:
* moving it to packages/docusaurus/src/constants.ts
* name it WEBPACK_ URL_LOADER_LIMIT
* add comment to say it's temporary, link to this PR/issue
Co-authored-by: stnor <stefan@selessia.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-09-22 11:55:42 +02:00
Joshua Chen
19b27ef73b
refactor(plugin-google-gtag, plugin-google-analytics): migrate packages to TS ( #5561 )
...
* migration
* Move to devDeps
* Use type assertion
2021-09-22 11:36:04 +02:00
Joshua Chen
2ef70cb806
refactor(preset-classic): migrate preset-classic to TypeScript ( #5579 )
2021-09-22 11:09:52 +02:00
Alexey Pyltsyn
578470a24c
fix: ignore code block lines when create excerpt ( #5495 )
2021-09-22 10:15:46 +02:00
Alexey Pyltsyn
ebf81b6ef6
fix: install deps for new project via Yarn properly ( #5490 )
2021-09-22 10:13:01 +02:00
Alexey Pyltsyn
29e06d0677
feat: make tags route path configurable ( #5545 )
2021-09-21 19:19:18 +02:00
Alexey Pyltsyn
ba402e9e63
fix: pin react-live due to possible mismatch React ( #5556 )
2021-09-21 18:33:55 +02:00
Joshua Chen
a839966cd2
polish: remove unused eslint-disable ( #5560 )
...
* fix eslint
* Add report unused disable to CI
* Fix two anys
2021-09-21 18:07:54 +02:00
Alexey Pyltsyn
911d6b1087
fix: highlight active item in recent post list ( #5571 )
2021-09-21 17:07:24 +02:00
Joshua Chen
e0aa87fe7f
refactor(core): type improvements for PendingNavigation
( #5580 )
...
* Fix type
* Completely fix
* Fix type
2021-09-21 10:05:42 +03:00
Don
b6d0378704
refactor: adjust styling of back top top button ( #5469 )
...
* refactor: css variables for back to top button
* refactor: adjust back to top button styling
* Update from PR feedback
* err... darker.
* swap secondary color for emphasis scale
* reduce contrast further
* Add new translations
* Cleanup CSS
* Remove active state
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-09-11 16:09:58 +03:00
Alexey Pyltsyn
453d9c099d
fix: remove deprecated createRequireFromPath ( #5496 )
2021-09-11 12:39:33 +03:00
Sébastien Lorber
28d2d6a8d0
polish: prevent pop navigation on back if navbar sidebar is open ( #5485 )
2021-09-03 18:31:32 +02:00
Sébastien Lorber
3d05ec2e4b
chore: regenerate beta.6 examples + fix regen script ( #5484 )
...
* update examples script
* rename ext
* typo
* update examples
* fix script to update starters
* update examples
* add --allow-empty so that script does not fail if nothing changed
* fix lint
2021-09-03 16:54:06 +02:00
Joshua Chen
52844f2b01
polish(theme-classic): add Chinese translations ( #5472 )
...
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-09-03 15:03:23 +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
Alexey Pyltsyn
812327155b
fix: use heading itself as anchor for better crawling ( #5481 )
2021-09-03 13:11:06 +02:00
Sébastien Lorber
2611bbb501
chore(v2): prepare v2.0.0-beta.6 release ( #5473 )
...
* add beta.6
* v2.0.0-beta.6
2021-09-02 18:31:42 +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
Sébastien Lorber
f361e89b14
feat: on back navigation, close mobile sidebar ( #5462 )
...
* On back, close mobile navbar sidebar
* more reliable code to block history pop events
* android backbutton: just close the drawer without cancellin the backward navigation
2021-09-02 16:03:17 +02:00
Joshua Chen
6b7f3e8553
refactor(plugin-debug): migrate package to TypeScript ( #5465 )
...
* Complete migration
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix JSON root name
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-09-02 15:58:28 +02:00
Sébastien Lorber
402a5e1f88
feat: infima 33 + navbar-sidebar close button ( #5460 )
...
* infima 33 + navbar-sidebar close button
* duplicate close icons + theme switch margin
2021-09-01 19:48:13 +02:00
Joshua Chen
78d84006bb
refactor(theme-classic): completely migrate package to TypeScript ( #5459 )
...
* Migrate
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Migrate prism as well
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix lock file
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix typing
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* refactor a bit CodeBlock
* simplify versionBanner typing => use null instead of "none" (apart plugin options for retrocompatibility)
* Remove return signatures
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-01 14:34:26 +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
Alexey Pyltsyn
914e204dcb
refactor: use SVG for closable button in announcement bar ( #5453 )
2021-08-31 11:03:14 +02:00
Sébastien Lorber
3a312d964d
feat: Add docs-related stable classnames ( #5445 )
2021-08-31 11:00:46 +02:00
Sébastien Lorber
280a8abac9
fix: fix some theme UI issues (blockquotes, navbar-sidebar font) with Infima alpha.32 ( #5444 )
2021-08-30 18:34:59 +02:00
Alexey Pyltsyn
a9e0e99dc5
refactor: switch to Flexbox in announcement bar ( #5430 )
...
* refactor: switch to Flexbox in announcement bar
* Fixes after review
* Fixes after review
* Fixes after review
2021-08-30 16:43:58 +02:00
Joshua Chen
df3752cc71
fix: fix a few TS errors ( #5437 )
...
* fix errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix website
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert adding lib
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore previous ordering
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* exclude sw.js from typechecking
* Tests: include typechecking of website
* cleanup @site/ alias in TS config
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-30 13:06:00 +02:00
Ali Saki
74f060dde0
refactor: update Arabic and Persian translations ( #5434 )
...
* Update Arabic Translation
* Update Persian Translation
* fix spacing problem for ar.json
* fix spacing problem for fa.json
* Update fa.json
Update Persian translation to match with @farshidinanloo translation
* fix ar.json
* Update fa.json to match with @farshidinanloo
2021-08-30 12:59:55 +02:00
farshid
f1ae06f470
refactor: add missing translations in fa.json ( #5410 )
...
* Update fa.json
fix Persian translation
* Update fa.json
* Update fa.json
* add missing translations in fa.json
* Update fa.json
2021-08-30 11:24:16 +02:00
Sébastien Lorber
7fba381a10
fix: some beta.5 bugfixes ( #5431 )
2021-08-27 15:25:16 +02:00
Sébastien Lorber
f600d5a6d7
chore: prepare v2.0.0-beta.5 release ( #5427 )
...
* beta.5
* v2.0.0-beta.5
2021-08-26 17:33:31 +02:00