Commit graph

3545 commits

Author SHA1 Message Date
Sébastien Lorber
db79d462ab
feat(v2): auto-generated sidebars, frontmatter-less sites (#4582)
* POC of autogenerated sidebars

* use combine-promises utility lib

* autogenerated sidebar poc working

* Revert "autogenerated sidebar poc working"

This reverts commit c81da980

* POC of auto-generated sidebars for community docs

* update tests

* add initial test suite for autogenerated sidebars + fix some edge cases

* Improve autogen sidebars: strip more number prefixes in folder breadcrumb + slugs

* fix typo!

* Add tests for partially generated sidebars + fix edge cases + extract sidebar generation code

* Ability to read category metadatas file from a file in the category

* fix tests

* change position of API

* ability to extract number prefix

* stable system to enable position frontmatter

* fix tests for autogen sidebar position

* renamings

* restore community sidebars

* rename frontmatter position -> sidebar_position

* make sidebarItemsGenerator fn configurable

* minor changes

* rename dirPath => dirName

* Make the init template use autogenerated sidebars

* fix options

* fix docusaurus site: remove test docs

* add _category_ file to docs pathsToWatch

* add _category_ file to docs pathsToWatch

* tutorial: use sidebar_position instead of file number prefixes

* Adapt Docusaurus tutorial for autogenerated sidebars

* remove slug: /

* polish the homepage template

* rename _category_ sidebar_position to just "position"

* test for custom sidebarItemsGenerator fn

* fix category metadata + add link to report tutorial issues

* fix absolute path breaking tests

* fix absolute path breaking tests

* Add test for floating number sidebar_position

* add sidebarItemsGenerator unit tests

* add processSidebars unit tests

* Fix init template broken links

* windows test

* increase code translations test timeout

* cleanup mockCategoryMetadataFiles after windows test fixed

* update init template positions

* fix windows tests

* fix comment

* Add autogenerated sidebar items documentation + rewrite the full sidebars page doc

* add useful comment

* fix code block title
2021-04-15 16:20:11 +02:00
Alexey Pyltsyn
836f92708a
refactor(v2): replace react-toggle with own implementation (#4608)
* refactor(v2): replace react-toggle with own implementation

* Extract toggle into child component
2021-04-15 16:15:07 +02:00
guoxudong
fbe4a4ac14
docs(v2): add Kubevela showcase (#4616)
Co-authored-by: guoxudong <guoxudong.dev@gmial.com>
2021-04-15 16:03:04 +02:00
Sébastien Lorber
2a2da8006f
chore(v2): fix yarn2 end2end test by using lerna publish --exact (#4613) 2021-04-14 17:25:50 +02:00
duanwilliam
1abadbaeca
fix(v2): fix code block title parsing, support multiple metastring attributes (#4541)
* feat: lazy match classic theme code block title

* feat: allow single quotes for classic theme code block title

* refactor(v2): extract parseCodeBlockTitle function

extract `parseCodeBlockTitle` function to add tests for title parsing

* test(v2): add tests for parseCodeBlockTitle

* move code block title parser to theme-common

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-14 10:24:52 +02:00
Sébastien Lorber
8119de105a
chore(v2): do not build all locales when monitoring build time perf (#4611) 2021-04-14 09:28:38 +02:00
akepecs
5ded1eb95d
docs(v2): Added IntelAGENT website to showcase. (#4612)
* Added IntelAGENT website to showcase.

* Added IntelAGENT png
2021-04-14 09:26:49 +02:00
Dick Wyn Yong
de9f414919
docs(v2): add clarity to tip in versioned using-themes page (#4609) 2021-04-13 19:59:50 +02:00
John Knox
2c57f44bd6
fix(v2): fail-safe usage of browser storage (localStorage/sessionStorage) when access is denied (#4501)
* fix: Fix unsafe uses of localStorage

Puts all uses of localStorage behind an abstraction which doesn't fail
when localStorage isn't available.

* cleanup fail-safe browser storage usage

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-13 12:38:12 +02:00
Artur Carvalho
cbb31783d7
docs(v2): heading typo (#4606) 2021-04-13 11:24:46 +02:00
Dick Wyn Yong
edfc7ff3b8
docs(v2): add clarity to tip in using-themes page (#4604) 2021-04-13 11:23:18 +02:00
Brent Ely
7ba0fdf831
docs(v2): Add "PptxGenJS" to showcase (#4602)
* Added PptxGenJS

* added new image for pptxgenjs

* Update website/src/data/users.js

* Update website/src/data/users.js

* Update users.js

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-04-13 11:11:53 +02:00
Alexey Pyltsyn
bfea8d632d
refactor(v2): increase heading anchor offset (#4601) 2021-04-12 18:59:59 +02:00
Alexey Pyltsyn
2b4a52e27a
fix(v2): use page title from config if not set (#4600) 2021-04-12 18:39:34 +02:00
Alexey Pyltsyn
6b0df65786
fix(v2): render escaped HTML entities inside code properly (#4598) 2021-04-12 18:33:38 +02:00
Alexey Pyltsyn
7c56f816c6
perf(v2): avoid rerender of sidebar items while scrolling (#4603) 2021-04-12 18:14:02 +02:00
Lisa Chandra
154ba62627
feat(v2): theme default translations hindi (#4596)
* docs: theme default translations for hindi

* docs: fix lastUpdatedAtBy for hindi

Co-authored-by: Javid <singularity.javid@gmail.com>
2021-04-12 18:02:56 +02:00
Sébastien Lorber
41af0c9f90
docs(v2): i18n site: enable ko + zh-CN locales (#4599)
* enable locales

* do not deploy multiple locales in netlify deploy preview: keep it fast
2021-04-11 19:21:13 +02:00
Forresst
aa392a9907
docs(v2): fix typo theme-configuration.md (#4595)
We are in the footer section, I think it's a bad copy and paste
2021-04-11 17:44:35 +02:00
Anthony Bobsin
4c09249d72
docs(v2): Include docusaurus-protobuffet to community plugins (#4594) 2021-04-11 17:43:18 +02:00
Sébastien Lorber
cb403afa93
fix(v2): i18n perf issue: getTranslationFile() should not load content again (#4593)
* Fix getTranslationFiles() perf issue

* improve doc
2021-04-09 19:28:48 +02:00
Tales Porto
e99bb43823
feat(v2): docusaurus deploy: ability to configure port in git url (#4545)
* Creating a way to configure the port used on the guthub deploy.

* Fixing some mistakes

Documenting

Adding githubPort documentation on docusaurus.config.js.

Addind SSH protocol prefix. ssh://

Using the default protocol port instead of define it on the code.

Prettify.

* Fixing some mistakes

Documenting

Adding githubPort documentation on docusaurus.config.js.

Addind SSH protocol prefix. ssh://

Using the default protocol port instead of define it on the code.

Prettify.

* Isolating the logic to generate the url and testing it.

* Changing all the names used on tests to something more unserstandable.

* Prettify

Co-authored-by: Tales Porto <t.andrade-porto@klarna.com>
2021-04-09 18:05:16 +02:00
Sébastien Lorber
4efe6824b3
feat(v2): various markdown string parsing improvements/fixes (#4590)
* extract createExcerpt code in separate file + add bad test

* almost working markdown parsing refactor

* complete parseMarkdownString refactor

* fix tests

* fix blog test issue

* fix docusaurus utils imports
2021-04-09 17:09:33 +02:00
Sébastien Lorber
b743edf5fb
feat(v2): default theme translations: locale "pt" should load "pt-BR" translations (#4581)
* code translation utils => locale "pt" should attempt to load "pt-BR" (not "pt-PT")

* useless async test
2021-04-07 18:28:48 +02:00
Sébastien Lorber
3bcd0a6ab1
fix(v2): examples should use Node 14 by default on CodeSandbox + regen with alpha72 (#4574)
* codesandbox: use node 14 by default

* Regenerate examples

* Add example json files to prettierrignore
2021-04-07 18:28:06 +02:00
besemuna
44029128fa
fix(v2) : use safe/unsafe wording to denote swizzle safety (#4547)
* fix : make swizzle items more accessible

* feat : use safe/unsafe wording

Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
2021-04-06 15:02:07 +02:00
Sébastien Lorber
b6fbca70b8
fix(v2): fix i18n isLastLocale bug preventing docusaurus from building some locales (#4575)
* fix i18n isLastLocale bug

* fix i18n isLastLocale bug
2021-04-05 19:56:28 +02:00
Arijit Kundu
4a219f1983
docs(v2); fixed broken link i18n-tutorial.md (#4558) 2021-04-05 19:00:54 +02:00
Sébastien Lorber
0ae001bcf4
docs: Update README badges (#4573) 2021-04-05 18:58:28 +02:00
Arijit Kundu
d324dc3869
docs(v2): fixed the directory of index.js (#4559) 2021-04-05 18:56:14 +02:00
Foxeye-Rinx
ddcdb1cc2d
docs(v2): add a missing slug from the initial template (#4561) 2021-04-05 18:53:49 +02:00
Arijit Kundu
ecc3444865
docs(v2): fixed typos (#4560)
* docs(v2): fixed typos

* docs(v2): fixed typos
2021-04-05 18:42:41 +02:00
Tony Narlock
a627a264fb
docs(v2): add social-embed to showcase (#4568) 2021-04-05 18:35:04 +02:00
Ajeet Singh Raina, Docker Captain, RedisLabs
d9067748fd
docs(v2): Add Redis Labs Developer Site to docusaurus showcase page (#4570)
* Add files via upload

* Update users.js
2021-04-05 18:33:21 +02:00
serut
902aad55bb
fix(v2): DocNavbarItem error message (#4554)
* Fix DocNavbarItem error message

* Clean code

* clean code
2021-04-02 17:07:41 +02:00
Foxeye-Rinx
9fceeb9ec5
docs(v2): add a missing "export" from the initial template (#4546)
* docs(v2): add a missing "export" from the initial template

* Update create-a-page.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-04-02 12:43:36 +02:00
Lucas Alves
5357fcefee
docs(v2): Updates showcase: Channel.js renamed to Repeater.js (#4551)
* fix: Updates Channel.js to Repeater.js

* fix: Includes Repeater.js in alphabetical order
2021-04-02 12:21:17 +02:00
duanwilliam
51031c1afd
docs(v2): fix run-on sentence (#4543)
* docs: fix run-on sentence

* Update cli.md

* Update cli.md

* Update cli.md

* Update cli.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-04-01 19:59:39 +02:00
Forresst
51a7988923
docs(v2): fix typo deployment.mdx (#4539) 2021-03-31 15:51:13 +02:00
Pedro Piñera Buendía
e6a8111025
docs(v2): Add Tuist to the list of projects that use Docusaurus (#4538) 2021-03-30 19:41:34 +02:00
ZhengYuan Loo
fe2c6b8924
docs(v2): remove duplicate line on v1 docs (#4531) 2021-03-30 11:10:39 +02:00
Tiago Ribeiro
fb07bd871c
feat(v2): add pt-PT translations for docusaurus-theme-classic (#4536)
* Added a JSON file with the portuguese (Portugal) translations

* Changed the file according to linting

* Add a new line at the end of the file

* Changes because of prettier, there was a whitespace at the end of a line
2021-03-30 10:47:21 +02:00
dependabot[bot]
982a84e70c
chore(deps): bump y18n from 4.0.0 to 4.0.1 (#4533)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-30 10:42:56 +02:00
Armano
5534affdb9
fix(v2): remove no longer used postcss-present-env from dependencies (#4506) 2021-03-29 18:04:13 +02:00
ZhengYuan Loo
11843a02fe
docs(v2): config for self-hosted docsearch crawler (#4524) 2021-03-29 17:53:51 +02:00
Forresst
b9de28e42f
docs(v2): fix markdown headings level 4 (#4526) 2021-03-29 17:23:20 +02:00
Thiago Sciotta
61414f9a11
feat(v2): add Brazilian Portuguese translation (#4525) 2021-03-29 17:06:50 +02:00
Chris Kanich
b10ed6cb00
feat(v2): include frontmatter in loadedContent doc metadatas (#4495)
* feat: include frontmatter in globals

* feat: include frontmatter in globals (options schema test)

* feat(v2): document frontmatter in document metadata

* feat(v2): frontmatter in metadata, tests updated

* Update packages/docusaurus-plugin-content-docs/src/types.ts

* Update packages/docusaurus-plugin-content-docs/src/types.ts

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-03-26 19:54:29 +01:00
besemuna
9715048f79
feat(v2): provide doc sidebar_label through sidebars.js (#4500)
* feat : update SidebarItemDoc type

* feat : update assertIsDoc

* feat : allow configuring title from sidebar.js

* feat : add docs

* docs : refactor i18n docs to use label in sidebar.js

* test : add test

* Update website/docs/guides/docs/sidebar.md

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

* docs : remove backported docs

Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-03-26 15:11:21 +01:00
Sébastien Lorber
f7614081dd
ci(v2): fail CI if build takes too much time (#4516)
* remove the .cache folder so that it removes both webpack cache-loader-v4/persistent-cache-v5 + webpack terser cache

* Add GH action to track build time perf with a timeout

* Add GH action to track build time perf with a timeout
2021-03-25 17:30:49 +01:00