Commit graph

1747 commits

Author SHA1 Message Date
Alexey Pyltsyn
877373e108
chore: prepare v2.0.0-beta.7 release (#5713)
* chore: prepare v2.0.0-beta.7 release

* v2.0.0-beta.7
2021-10-15 16:31:01 +03:00
Alexey Pyltsyn
1361a5a38e
fix: proper collapsing of long element (#5694)
* fix: proper collapsing of long element

* Add example

* Reorder

* Another solution with overflow

* Restore original solution
2021-10-15 16:02:56 +03:00
Alexey Pyltsyn
e22170408a
refactor: cleanup scroll handlers (#5709) 2021-10-15 13:07:03 +02:00
Alexey Pyltsyn
c12fe963c9
refactor: hide hash link from crawlers (#5708) 2021-10-15 12:32:41 +02: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
8d92e9bcf5
refactor(content-docs): refactor sidebars, Joi validation, generator rework, expose config types (#5678) 2021-10-14 14:38:26 +02:00
Alexey Pyltsyn
543011c9d2
fix: use realpath for site dir to resolve symlink (#5684) 2021-10-14 12:08:48 +02:00
Alexey Pyltsyn
fee10c9e13
fix: apply announcement bar class if only needed (#5699) 2021-10-14 11:10:59 +02:00
Alexey Pyltsyn
54015de628
chore: upgrade Infima to alpha.34 (#5666) 2021-10-14 10:42:10 +02:00
Alexey Pyltsyn
00bb405b89
fix: expand tag column on truncated post (#5667) 2021-10-14 09:54:57 +02:00
Alexey Pyltsyn
99f6e665e8
fix: preserve line breaks when copy code in Firefox (#5668) 2021-10-13 19:40:16 +02:00
Shrugsy
7868df13f1
feat: maintain page position for clicked grouped tabs (#5618)
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-13 19:08:00 +02:00
Nathaniel Tucker
4a4f8497b3
fix: Don't ignore options.transforms for buble (#5677)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-12 20:01:27 +02:00
Alexey Pyltsyn
67403b3b65
fix: preserve hash in asset link (#5690) 2021-10-12 16:49:01 +02:00
moonrailgun
6ed698976d
feat(content-blog): add full blog post html into RSS/Atom feeds (#4330)
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-08 12:59:02 +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
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
Sébastien Lorber
e1b4da04fe
fix: restore duplicate Tabs rendering to fix hydration issue (#5652)
* restore duplicate Tabs rendering to fix hydration issue

* comment
2021-10-07 12:40:19 +02:00
Alexey Pyltsyn
e6e2db7f24
fix: place root route at the end (#5645)
* fix: place root route at the end

* Use sorting independent of subroutes

* Add better test to cover edge-case and ensure "/" routes with child are at the end

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-06 14:00:49 +02:00
Ana Carolina
10941f0b6a
refactor: improve pt-BR translation for classic theme (#5649) 2021-10-06 08:20:57 +03:00
Joshua Chen
7f7b858cd4
refactor: make all Props defined as interface + readonly (#5636)
* Initial work

* Fix
2021-10-05 19:04:24 +02:00
David Callizaya
21ef908f00
refactor: complete missing ES translations (#5646) 2021-10-05 11:16:12 +03:00
Ekaterina Mozheiko
7b3daee102
fix(theme-classic): reset default style for task lists (#5643)
* fix(theme-classic): fix markdown list style

* fix(theme-classic): change style for consistency

Co-authored-by: Ekaterina Mozheiko <emojeyko@sberhealth.ru>
2021-10-04 02:15:10 +03:00
Mahdi Hamldar
730de9f025
refactor: update Persian translation with the latest version (#5640)
* Synchronize Persian language with the latest base version

* style: synchronize Persian language with the latest base version
2021-10-03 01:28:12 +03:00
Alexey Pyltsyn
4260768c53
misc: update base translation + remove extra char (#5639) 2021-10-02 18:36:30 +03: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
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