Commit graph

3971 commits

Author SHA1 Message Date
Alexey Pyltsyn
5b6dcbdfd1
refactor(v2): align external icon on right (#4682) 2021-04-26 19:22:07 +02:00
MisterFISHUP
a7dd932298
docs(v2): Add Daily Digest - COVID-19 IN FRANCE to showcase (#4676)
* add Daily Digest - COVID-19 IN FRANCE to users.js

* add daily-digest-covid-19-in-france.png to showcase
2021-04-23 20:05:46 +02:00
Sébastien Lorber
046f174620
chore: add some redirects to v1.docusaurus.io (#4670)
* Add some useful v1 site redirects

* Redirect older Docusaurus v1 links that do not exist anymore in v2
2021-04-22 19:50:16 +02:00
Sam Zhou
2dcbd50b60
fix(v2): Unbreak blog post title by handling title fallback in LayoutHead (#4667)
* fix(v2): Unbreak blog post title

* Revert "fix(v2): Unbreak blog post title"

This reverts commit d21444b6fb.

* Move title fallback to LayoutHead

* Make SEO component only render title when not null
2021-04-22 19:04:34 +02:00
Lisa Chandra
458af077ae
feat(v2): new showcase page with tags and filters (#4515)
* docs: add ToggleTags component for showcase

* docs: add filter functionality

* docs: remove redundant variables

* docs: use react state for selectedTags

* docs: add control to tag checkbox

* docs: use useMemo for filteredUsers

* docs: change names of tags

* revert name tag changes

* polish the showcase page

* cleanup tags on the users list

* minor polish

* add querystring filtering

* typo

* Add title/arialabel to emulate tooltip

Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-22 17:15:28 +02:00
Sébastien Lorber
792f4ac6fb
feat(v2): allow user to customize/enhance the default sidebar items generator (#4658)
* allow and document how to wrap/enhance the default docusaurus sidebar items generator

* improve doc

* doc

* doc
2021-04-21 18:35:03 +02:00
John Reilly
e11597aba9
fix(v2): fix too strict markdown frontmatter validation (#4654)
* start work

* use orta.vscode-jest

* node 14

* add some better  infra to validate markdown frontmatter

* better docs frontmatter validation

* fix Yaml / Joi validation issues

* fix Yaml / Joi validation issues

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-21 16:19:55 +02:00
Sébastien Lorber
c04e613ffe
feat(v2): docs, make numberPrefixParser configurable, better defaults, minor breaking-changes (#4655)
* make number prefix parsing logic configurable

* Make numberPrefixParser configurable + rename frontmatter + avoid parsing date/version patterns by default

* add more tests

* more test cases
2021-04-21 12:06:06 +02:00
Sébastien Lorber
d0d29f43cc
fix(v2): sidebar autogen from subfolder should read category metadata correctly (#4651)
* fix sidebar autogen bug

* fix sidebar autogen bug
2021-04-20 18:16:51 +02:00
dependabot[bot]
03536a0682
chore(deps): bump ssri from 6.0.1 to 6.0.2 (#4645)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 15:29:08 +02:00
Tommy
1cbd80b8cd
docs(v2): Fix typo in installation.md(#4643) 2021-04-20 15:27:09 +02:00
DOLLE
ca9752fd0b
docs(v2): Add new showcase user (#4649)
* Add React Native Boilerplate to the list of users

* Add React Native Boilerplate site preview

* Update website/src/data/users.js

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-04-20 15:21:00 +02:00
Alexey Pyltsyn
4835222c16
fix(v2): ignore imports when h1 heading parsing (#4646) 2021-04-20 15:20:38 +02:00
kazk
5088a1e48f
fix(v2): fix validation rejecting admonitions false (#4629)
Prevents disabling default admonitions as documented under
https://docusaurus.io/docs/presets#official-presets
2021-04-19 10:49:58 +02:00
Alexey Pyltsyn
808b0fa62a
fix(v2): parse headings directly after h1 properly (#4641) 2021-04-19 10:10:24 +02:00
Sébastien Lorber
c8cf48a355
chore(v2): update examples to use alpha73 (#4631)
* regenerate examples on alpha73

* fix init template typo + add missing files
2021-04-16 14:08:23 +02:00
Sébastien Lorber
4d49945775
chore(v2): prepare v2.0.0.alpha-73 release (#4628)
* add changelog

* add alpha 73

* run prettier on versions file (+ ignore it as we don't care much and it's annoying when releasing)

* v2.0.0-alpha.73
2021-04-16 12:48:10 +02:00
Sébastien Lorber
93bd8fec7b
chore(v2): update Infima to alpha.22 (#4627) 2021-04-16 11:28:34 +02:00
Sébastien Lorber
38a1003233
refactor(v2): toggleResponsiveSidebar => more stable callback (#4626) 2021-04-16 10:27:16 +02:00
Alexey Pyltsyn
42d02369d8
fix(v2): center align content if no sidebar exists (#4621) 2021-04-16 10:20:49 +02:00
Dennis Thompson
04fa8c2755
Open docs(v2): Adding new community plugins (#4622) 2021-04-16 10:09:55 +02:00
Marco Enrico
70574618e9
feat(v2): Add Filipino default translations to theme (#4624)
* Create fil.json

Add default Filipino translations.

* Update packages/docusaurus-theme-classic/codeTranslations/fil.json

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-04-16 10:07:43 +02:00
Alexey Pyltsyn
41aede985e
fix(v2): restore toggle responsive sidebar button (#4620) 2021-04-16 00:50:19 +03:00
Sébastien Lorber
073fdeae8e
refactor(v2): rename class main-docs-wrapper to docs-wrapper (#4619) 2021-04-15 18:56:41 +02:00
Sébastien Lorber
2d89d5c84f
refactor(v2): simplify and optimize sidebar (#4617)
* safe sidebar refactor

* simplify and optimize a bit the sidebar code
2021-04-15 18:43:38 +02:00
Steven Hansel
cd47d8a815
feat(v2): add unique page/wrapper className to each theme pages (#4511)
* chore: add theme classnames for blog pages

* fix: component syntax error in blog pages

* style: fix camelcase issue with theme class names

* chore: add theme classnames for doc page and mdx page

* chore: make wrapper classnames in blog and doc page into constants

* chore: add main wrapper theme class name for layout component

* fix: change wrong theme classnames and improve naming

* chore: add wrapper theme class name for mdx page

* docs: add docs for theme class names

* docs: use raw-loader to import documentation and add some comments

* docs: provide more detail to comment

* chore: rename ThemeClassname.ts to ThemeClassName.ts

Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
2021-04-15 18:36:40 +02:00
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