Commit graph

211 commits

Author SHA1 Message Date
Joshua Chen
fa1ce230ea
refactor: capitalize comments (#7188)
* refactor: capitalize comments

* revert...
2022-04-17 16:39:11 +08:00
Alexey Pyltsyn
84d04ed6ed
feat(theme-classic): new 'html' type navbar item (#7058)
* feat(theme-classic): allow using html in dropdown items

* Fix tests

* Introduce HTML type for navbar item

* Update packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 18:58:15 +08:00
Jody Heavener
5fb0a2e274
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-13 18:02:05 +02:00
Alexey Pyltsyn
c669c103f9
refactor(website): minor fixes and improvements (#7119)
* refactor(website): minor fixes and improvements

* Some fixes

* Round all the corners in browser window

* Add rounded bottom corners to browser window
2022-04-07 08:33:52 +08:00
ApsarasX
103ea04661
feat(sitemap): add ignorePatterns option (#6979)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-06 15:44:07 +02:00
Joshua Chen
19942f990a
chore: migrate Jest and website to SWC (#6944)
* chore: migrate Jest and website to SWC

* ignore template
2022-03-19 20:56:30 +08:00
Sébastien Lorber
74f653dd82
refactor(theme-{classic,common}): change how site/page/search metadata is handled (#6925) 2022-03-18 18:53:00 +01:00
Joshua Chen
68aaf9201f
feat(core): allow plugin lifecycles to return relative paths (#6921)
* feat(core): resolve plugin lifecycles returning relative paths

* fix typo

* fix tests

* revert

* rename path -> entryPath
2022-03-16 20:47:15 +08:00
Joshua Chen
2648ec090e
docs: editorial fixes (#6889) 2022-03-10 13:43:22 +08:00
Joshua Chen
39b66d82ef
feat(core): rework swizzle CLI (#6243)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-25 14:13:15 +01:00
Joshua Chen
dcbf9f644e
chore: upgrade docsearch-react to v3 stable, bump dependencies (#6752)
* chore: upgrade dependencies

* revert

* validation

* fix blog

* reformat
2022-02-24 19:39:32 +08:00
Muhammad Redho Ayassa
48f080ebca
feat(content-blog): Allow pagination for BlogTagsPostsPage (#6221)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-03 18:33:13 +01:00
Joshua Chen
aa446b7a9c
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules

* enable max-len for comments

* fix build
2022-01-31 10:31:24 +08:00
Joshua Chen
f6ff6474bc
feat(website): new plugin to load CHANGELOG and render as blog (#6414)
* feat(website): new plugin to load CHANGELOG and render as blog

* use CJS

* move footer links

* better design

* fixes

* correctly order posts

* add authors

* Add axios

* Update styles

* oops

* oops

* add expand button

* back to index page link

* fix styles

* add feed options

* fix

* fix

* Add fallback

* fix

* fixes
2022-01-27 23:17:31 +08:00
Pranab Das
f415da1c95
refactor: self-host KaTeX assets (#6429)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-27 11:39:45 +01:00
Sébastien Lorber
dd539dd23f
feat(search): enable contextual search by default (#6407) 2022-01-25 11:45:41 +08:00
Nick Schonning
2528226eeb
chore: add height/width for front page images (#6385)
* chore: add height/width for Lighthouse performance

* use auto width

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-23 09:57:31 +08:00
Joseph
8ce3cee400
feat(theme-classic): auto-collapse sibling categories in doc sidebar (#3811)
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-01-20 16:38:16 +01:00
Pranab Das
4ebb1ca8c8
chore: upgrade rehype-katex with ESM support, update docs (#6320)
* chore: upgrade rehype-katex to latest version with ESM support and update the docs

* Update documentation to reflect ESM upgrade is currently optional

* rewording

* final tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-14 09:06:10 +08:00
Joshua Chen
4fad1ce0cd
misc: convert all internal scripts to ESM (#6286)
* misc: convert all internal scripts to ESM

* fixes

* fix

* fixes

* fix!

* complete eslint

* more move

* fix!

* This looks better?

* Final ones
2022-01-08 12:59:28 +08:00
Minh Pham
eade41a702
feat(theme-classic): new navbar item linking to a sidebar (#6139)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-01-06 11:52:25 +01:00
Joshua Chen
24d65d9bdd
refactor(utils): reorganize functions; move authors file resolution to utils (#6229)
* refactor(utils): reorganize functions; move authors file resolution to utils

* More refactor
2021-12-31 11:55:42 +08:00
Sébastien Lorber
7adc1c0cdb
test: ensure consistent CSS ordering (#6222) 2021-12-30 14:26:26 +01:00
Joshua Chen
96dbb8e7ef
feat(website): improve prism themes (#6214)
* feat(website): modify Prism dark theme

* update

* Use vsDark

* update crowdin config

* fix light theme as well

* revert comment changes
2021-12-29 21:25:01 +08:00
Joshua Chen
5132ecdeee
docs: normalize plugin API documentation (#6193)
* docs: normalize plugin API documentation

* Revert change

* Use remark plugin

* edits

* edit again

* Fixes
2021-12-28 21:23:27 +08:00
Joshua Chen
c8fad02029
docs: fix highlighting of YAML front matter (#6206) 2021-12-28 13:19:08 +08:00
Joshua Chen
e1bff072fe
feat(ideal-image): new option disableInDev (#6155)
* feat(ideal-image): new option disableInDev

* Add docs

* Use import type

* More docs
2021-12-25 21:48:38 +08:00
Pranab Das
e4f9ab072c
chore: upgrade rehype-katex and katex stylesheet for website (#6172)
* chore: Update rehype-katex and katex stylesheet for doc website

* Reformat

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-12-23 14:24:56 +08:00
Sébastien Lorber
f8a670966e
feat(core): async docusaurus.config.js creator function (#6165) 2021-12-22 17:03:01 +01:00
Sébastien Lorber
5dc1cdf987
fix(website): fix yarn build:website:fast (#6122) 2021-12-17 12:30:06 +01: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
Fernando Maia
b366ba5603
feat: shorthands for themes/plugins/presets configuration (#5930)
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2021-12-03 18:23:12 +01: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
Joshua Chen
3334bfb4fa
chore(website): enable strict compiler option (#6012) 2021-11-26 18:14:35 +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
ac88d979f1
refactor(ganalytics, gtag): move options out of themeConfig (#5832)
* refactor(ganalytics, gtag): move options out of themeConfig

* Forbid themeConfig options

* Add PR link

* Add key names to error message

* Fix?

* Doc updates

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-11-10 19:04:43 +08: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
Joshua Chen
e0127c66be
chore(website): enable eslint in website (#5889)
* chore: enable eslint in website

* Fixes

* prettier users
2021-11-06 19:04:45 +08:00
Alexey Pyltsyn
9f13f8f7af
misc: show only latest archive alpha/beta versions dropdown (#5862) 2021-11-03 17:41:27 +01:00
Devtato
41ef9daafd
feat(theme-classic): allow specifying width/height in logo (#5770)
* feat: changed the logo properties to allow width/height specification

* fixup! feat: changed the logo properties to allow width/height specification

* fixup! feat: changed the logo properties to allow width/height specification

* Rework: add fields to logo object

* Fix

* More fixes

* Wrong width!

* No need for optional chaining

* Doc writeup

Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2021-11-01 18:09:30 +08:00
Joshua Chen
1c8b8362f7
fix(live-codeblock): render static codeblock server-side (#5754)
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-21 17:17:03 +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
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
d76091c7fe
fix: website bad version name in docusaurus.config.js (#5455) 2021-08-31 17:40:47 +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
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
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
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
174fd2d248
docs(website): bump announcement bar + include Twitter link + refactor site colors (#5351)
* bump announcement bar + include Twitter link

* customize announcementBar css background + refactor infima colors
2021-08-13 16:23:56 +02:00