Joshua Chen
e07ebadf6c
fix: make Docusaurus PnP strict mode compatible ( #6047 )
...
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2021-12-08 14:26:24 +01:00
Joshua Chen
8644097ab7
fix(content-blog): make post ID unique ( #6061 )
...
* fix(content-blog): make post ID unique
* Fixes
2021-12-08 09:28:17 +08:00
Joshua Chen
fb6393fdce
chore: clean up dev dependency declarations ( #6055 )
...
* chore: clean up dev dependency declarations
* Fix prettier version
2021-12-05 23:07:34 +08: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
Joshua Chen
0374426ce3
chore: upgrade TypeScript & other ESLint related deps ( #5963 )
...
* chore: upgrade ESLint related deps
* Upgrade TS
* Fix lock
* Bump Babel
* Update config
2021-11-18 21:15:37 +08:00
Joshua Chen
c5feac6ba2
refactor: move deps declarations into src ( #5946 )
2021-11-14 13:35:15 +08:00
Joshua Chen
d1308a8736
refactor: improve setup of type declaration files ( #5914 )
2021-11-12 17:47:27 +01:00
Devtato
1c024470e0
feat(content-blog): allow sorting posts in ascending order ( #5787 )
2021-11-09 18:25:43 +01:00
Joshua Chen
1363a25819
refactor: use js-yaml to parse both JSON and YAML ( #5806 )
2021-11-03 17:55:14 +01:00
Alexey Pyltsyn
91ec2509b7
chore: prepare v2.0.0-beta.9 release ( #5859 )
...
* chore: prepare v2.0.0-beta.9 release
* v2.0.0-beta.9
2021-11-02 20:40:01 +03:00
Sébastien Lorber
c2009ab6b7
fix(content-blog): Fix blog feeds not generated ( #5835 )
2021-11-02 19:28:40 +03:00
Sébastien Lorber
3b66c68e92
feat: Support Node 17 ( #5814 )
2021-10-29 17:21:01 +02:00
Avi Vahl
96da25e422
feat(core): upgrade to webpack-dev-server@4 ( #5420 )
...
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-28 18:06:20 +02:00
Sébastien Lorber
1ce6253cc1
chore: require Node 14 ( #5812 )
2021-10-28 17:11:25 +02:00
Joshua Chen
7a6607cfa1
refactor: remove a few Lodash usages & ESLint enforcement ( #5807 )
...
* refactor: remove some lodash usage
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Enforce ESLint
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More forbids
* Fixup
* Fix
* Fix website
2021-10-28 12:48:58 +08:00
Joshua Chen
68c970175a
refactor: migrate lqip-loader to TS, fix typing for Webpack Loaders ( #5779 )
2021-10-27 16:38:11 +02:00
Sébastien Lorber
68a116611f
chore: prepare v2.0.0-beta.8 release ( #5762 )
2021-10-21 18:52:17 +02:00
Joshua Chen
9ad6de2b85
feat(content-blog): new readingTime plugin option ( #5702 )
2021-10-21 15:26:10 +02:00
Sébastien Lorber
29d13351a4
fix(content-blog): temporarily swallow feed mdxToHtml errors + feed refactor ( #5753 )
2021-10-21 11:57:47 +02:00
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
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
7f7b858cd4
refactor: make all Props defined as interface + readonly ( #5636 )
...
* Initial work
* Fix
2021-10-05 19:04: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
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
Joshua Chen
2ef70cb806
refactor(preset-classic): migrate preset-classic to TypeScript ( #5579 )
2021-09-22 11:09:52 +02:00
Alexey Pyltsyn
29e06d0677
feat: make tags route path configurable ( #5545 )
2021-09-21 19:19:18 +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
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
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
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
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
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
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
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
John Reilly
08597045ed
feat: add metatags support for seo / blogposts #5373 ( #5375 )
...
* feat: add metatags support for seo / blogposts
* feat: different implementation
* feat: use isBlogPostPage
* feat: implement in BlogPostPage-remove Seo changes
* Revert "feat: implement in BlogPostPage-remove Seo changes"
This reverts commit 1cba459b
* Move Seo to BlogPostPage + some fixes
* fix social preview asset
* Fix blog social image + improve a bit Seo setup
* fix bootstrap theme
Co-authored-by: John <john.reilly@investec.co.uk>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-20 16:36:18 +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
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
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
Joshua Chen
0c0c14120e
refactor(plugin-blog): style improvements in blogUtils ( #5338 )
...
* Minor refactor
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert forEach change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-11 15:40:33 +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
Sébastien Lorber
fc64c12e41
chore(v2): prepare v2.0.0-beta.4 release ( #5238 )
...
* chore(v2): prepare v2.0.0-beta.4 release
* update publish
* v2.0.0-beta.4
2021-07-28 22:54:41 +02:00
陈杨文
bb0c9eed0d
fix(v2): parse frontMatter.date ( #5232 )
...
Signed-off-by: wener <wenermail@gmail.com>
2021-07-28 19:32:14 +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
Sébastien Lorber
4d06f26c1f
fix(v2): Fix MDX docs being considered as partials when siteDir match the _ prefix convention ( #5199 )
...
* Add _ to dogfood docs folder to cover against edge case
* Fix edge case with MDX partials when site / content dir contains a _ prefix
* add globUtils tests
* proper dogfooding folder re-organization, all content plugins being used
* refactor dogfooding folder + expose /tests page index
* fix page plugin ignoring options.routeBasePath
2021-07-21 14:13:51 +02:00
Sébastien Lorber
8bdb3da233
feat(v2): generalize usage of _ prefix convention to exclude content files/folders ( #5173 )
...
* create a swizzleWarning partial for shared text
* Generalize usage of _ prefix convention to exclude content files/folders
* add api doc
* MDX loader should not expect metadata/frontmatter on MDX partial files
2021-07-15 13:21:41 +02:00
Sébastien Lorber
1ec2c95e3d
chore(v2): prepare v2.0.0-beta.3 release ( #5098 )
...
* beta.3
* publish guide
* publish guide
* v2.0.0-beta.3
2021-06-30 16:05:49 +02:00
Sébastien Lorber
ec2486d2c9
chore(v2): prepare v2.0.0-beta.2 release ( #5056 )
...
* prepare beta.2
* v2.0.0-beta.2
2021-06-24 19:39:37 +02:00