Commit graph

3428 commits

Author SHA1 Message Date
Sébastien Lorber
42c40f4221
fix(v2): temporary disable crowdin until PR env variable permission fixed (#3833) 2020-11-27 20:30:58 +01:00
Sébastien Lorber
22c06c2775
fix(v2): fix search (#3829)
* fix little search facet typo

* revert Alexey change, as we  are sure a site always has a locale
2020-11-27 10:24:43 +01:00
Alexey Pyltsyn
0f13780045
fix(v2): restore Algolia search (#3828) 2020-11-27 12:06:47 +03:00
Sarthak kundra
bd62be93d9
feat(v2): Added Lighthouse CI to PR checks (#3761)
* added lighthouse CI

removed wait for Netlify action

corrected Netlify deploy urls

corrected sitename

corrected sitename

* removed bootstrap and blog-only urls

* upload results to public storage

* added lighthousesrc.json

* corrected configPath

* corrected robots-txt assertion

* corrected syntax for lighthousesrc

* tried different audit

* corrected all audits for lighthouse

* added is-crawlable audit to skip

* added lighthouse stats commit to action

* Fixed Lighthouse yml syntax

* Fixed lighthouse yml syntax(2)

* trying comment

* trying yaml syntax

* test logging

* trying to see a log

* logging....

* corrected audit step id

* Corrected token

* changed comment number from issue to PR

* trying different message

* corrected message

* added offline-start-url to skip audits

* added start-url to skip fields

* added offline-starts-url
2020-11-26 17:42:05 +01:00
hackerman
fc4b756ec3
fix(v2): support rendering of singular tabs (#3823)
* fix(v2): support rendering of singular tabs

Closes #3822

* Update index.tsx

* fix type

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-11-26 17:12:51 +01:00
Sébastien Lorber
3166fab307
feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325)
* docs i18n initial poc

* docs i18n initial poc

* docs i18n initial poc

* docs i18n initial poc

* crowdin-v2 attempt

* fix source

* use crowdin env variable

* try to install crowdin on netlify

* try to install crowdin on netlify

* try to use crowdin jar directly

* try to curl the crowdin jar

* add java version cmd

* try to run crowdin jar in netlify

* fix translatedDocsDirPath

* fix loadContext issue due to site baseUrl not being modified in generted config file

* real validateLocalesFile

* add locale option to deploy command

* better LocalizationFile type

* create util getPluginI18nPath

* better core localization context loading code

* More explicit VersionMetadata type for localized docs folders

* Ability to translate blog posts with Crowdin!

* blog: refactor markdown loader + report broken links + try to get linkify working better

* upgrade crowdin config to upload all docs folder files except source code related files

* try to support translated pages

* make markdown pages translation work

* add write-translations cli command template

* fix site not  reloaded with correct options

* refactor a bit the read/write of @generated/i18n.json file

* Add <Translate> + translate() API + use it on the docusaurus homepage

* watch locale translation dir

* early POC of adding babel parsing for translation extraction

* fs.stat => pathExists

* add install:fast script

* TSC: noUnusedLocals false as it's already checked  by eslint

* POC of extracting translations from source code

* minor typo

* fix extracted key to code

* initial docs extracted translations

* stable plugin translations POC

* add crowdin commands

* quickfix for i18n deployment

* POC  of themeConfig translation

* add ability to have localized site without path prefix

* sidebar typo

* refactor translation system to output multiple translation files

* translate properly  the docs plugin

* improve theme classic translation

* rework translation extractor to handle new Chrome I18n JSON format (include id/description)

* writeTranslations: allow to pass locales cli arg

* fix ThemeConfig TS issues

* fix localizePath errors

* temporary add write-translations to netlify deploy preview

* complete example of french translated folder

* update fr folder

* remove all translations from repo

* minor translation  refactors

* fix all docs-related tests

* fix blog feed tests

* fix last blog tests

* refactor i18n context a bit, extract codeTranslations in an extra generated file

* improve @generated/i18n type

* fix some i18n todos

* minor refactor

* fix logo typing issue after merge

* move i18n.json to siteConfig instead

* try to fix windows CI build

* fix config test

* attempt to fix windows non-posix path

* increase v1 minify css jest timeout due to flaky test

* proper support for localizePath on windows

* remove non-functional install:fast

* docs, fix docsDirPathLocalized

* fix Docs i18n / md linkify issues

* ensure theme-classic swizzling will use "nextjs" sources (transpiled less aggressively, to make them human readable)

* fix some snapshots

* improve themeConfig translation code

* refactor a bit getPluginI18nPath

* readTranslationFileContent => ensure files are valid, fail fast

* fix versions tests

* add extractSourceCodeAstTranslations comments/resource links

* ignore eslint: packages/docusaurus-theme-classic/lib-next/

* fix windows CI with cross-env

* crowdin ignore .DS_Store

* improve writeTranslations + add exhaustive tests for translations.ts

* remove typo

* Wire currentLocale to algolia search

* improve i18n locale error

* Add tests for translationsExtractor.ts

* better code translation extraction regarding statically evaluable code

* fix typo

* fix typo

* improve theme-classic transpilation

* refactor  +  add i18n tests

* typo

* test new utils

* add missing snapshots

* fix snapshot

* blog onBrokenMarkdownLink

* add sidebars tests

* theme-classic index should now use ES modules

* tests for theme-classic translations

* useless comment

* add more translation tests

* simplify/cleanup writeTranslations

* try to fix Netlify fr deployment

* blog: test translated md is used during feed generation

* blog: better i18n tests regarding editUrl + md translation application

* more i18n tests for docs plugin

* more i18n tests for docs plugin

* Add tests for pages i18n

* polish docusaurus build i18n logs
2020-11-26 12:16:46 +01:00
Sébastien Lorber
85fe96d112
fix(v2): bad update notifier dist tag (#3824) 2020-11-26 12:06:52 +01:00
François Chalifour
aa2daf10fc
chore(v2): update DocSearch to alpha.31 (#3819)
* feat(search): update DocSearch to alpha.30

* chore: update to alpha.31
2020-11-26 00:22:12 +03:00
Aarón García Hervás
1fafdb0d33
fix(v2): Allow footer logo at attribute to be empty (#3817) 2020-11-25 13:12:45 +01:00
Alexey Pyltsyn
d25a54f61d
chore(v2): prepare v2.0.0.alpha-69 release (#3808)
* chore(v2): prepare v2.0.0.alpha-69 release

* v2.0.0-alpha.69
2020-11-24 13:51:15 +03:00
Alexey Pyltsyn
a9e27da09f
chore(v2): upgrade Infima to v0.2.0-alpha.18 (#3807) 2020-11-24 13:00:30 +03:00
Alexey Pyltsyn
9ca85cfff6
fix(v2): remove aria-hidden attr from anchor link of heading (#3806) 2020-11-24 00:53:39 +03:00
Sébastien Lorber
f1bed8dd69
fix(v2): Algolia: allow contextualSearch + facetFilters (#3804)
* remove contextualSearch facetFilters  merging security

* update doc
2020-11-23 19:43:38 +01:00
Maël Nison
b6cd303354
fix(v2): add createRequire for preset resolution (#3796)
* Adds createRequire for preset resolution

* Prettier

* Fixes tests
2020-11-23 19:33:17 +01:00
Sébastien Lorber
746a19f25b
feat(v2): add baseUrlIssueBanner configuration to disable banner (#3802)
* add baseUrlIssueBanner configuration

* handle review
2020-11-23 20:54:13 +03:00
Sébastien Lorber
9e314bcb11
docs(v2): fix Docusaurus init issue when not using @latest (#3803) 2020-11-23 20:24:11 +03:00
Sébastien Lorber
e949f4c52a
chore(v2): remove useless stylelint-copyright peerDependency (#3800) 2020-11-23 16:10:07 +03:00
Bartosz Kaszubowski
d79d5ba898
fix(v2): ensure that the react-router and *-dom version matches (#3794) 2020-11-21 18:50:25 +03:00
Bartosz Kaszubowski
d9ed20ebcf
chore: match fs-events version across the workspace (#3795) 2020-11-21 18:49:48 +03:00
Sébastien Lorber
533bc6ad9a
docs(v2): recommend Docusaurus 2 usage (#3785)
* recommend using Docusaurus v2

* Little improvements

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-11-21 15:42:56 +03:00
Sébastien Lorber
04f307cf66
chore(v2): ensure publishConfig.access presence with tests (#3786) 2020-11-19 17:14:45 +01:00
Bartosz Kaszubowski
a4e0992b27
fix(v2): fix missing logo in dark theme when darkSrc was not set (#3784) 2020-11-19 15:34:23 +01:00
Sébastien Lorber
4fbece2383
docs(v2): remove @next tags + minor docs changes (#3783) 2020-11-19 12:48:18 +01:00
camiluc
7d4510b686
docs(v2): rename zeit to vercel (#3781) 2020-11-19 12:43:38 +01:00
Sébastien Lorber
d1e51f7e3b
chore(v2): prepare v2.0.0.alpha-68 release (#3779)
* changelog

* add alpha 68 docs

* add missing publishConfig

* update publish doc + v1 private package system

* add version files

* v2.0.0-alpha.68
2020-11-18 20:02:06 +01:00
Alexey Pyltsyn
643a1ffd7e
chore(v2): upgrade ESLint deps (#3767)
* chore(v2): upgrade ESLint deps

* Fix for no-redeclare rule
2020-11-18 17:52:50 +01:00
Kaartic Sivaraam
118c76b47c
docs(v2): doc typo (#3776) 2020-11-18 16:42:50 +01:00
Alexey Pyltsyn
0331c55850
chore(v2): upgrade Infima to v0.2.0-alpha.17 (#3777) 2020-11-18 16:35:51 +01:00
Alexey Pyltsyn
5acb842c57
fix(v2): do not remove duplicate properties in during minification (#3768) 2020-11-18 16:33:27 +01:00
Alexey Pyltsyn
7d540a87d7
refactor(v2): adjust dark mode toggle to site style (#3774) 2020-11-18 16:29:13 +01:00
Alexey Pyltsyn
61fd53f7c0
fix(v2): increase stability of hideable navbar (#3733)
* fix

* fix(v2): increase stability of hideable navbar

* Fix bug after reload

* Remove state for hash
2020-11-18 16:17:04 +01:00
Sébastien Lorber
abcd8cefd6
feat(v2): @docusaurus/theme-common (#3775)
* create base @docusaurus/theme-common package + fix Webpack client export aliases issue shadowing other theme-common package

* Move theme-classic/src/utils code to new @docusaurus/theme-common package

* add prettierignore

* fix bad test location for getDocusaurusAliases()
2020-11-18 16:00:51 +01:00
Bartosz Kaszubowski
5872bbc735
chore(v2): fixes website styles (#3769) 2020-11-18 01:20:54 +03:00
Alexey Pyltsyn
de87eb5ca0
chore(v2): replace wait-file with wait-on to reuce npm warnings (#3765) 2020-11-17 11:25:29 +01:00
Alexey Pyltsyn
d5c8a0ca79
chore(v2): fix several npm warnings (#3766) 2020-11-17 11:22:51 +01:00
Alexey Pyltsyn
47a4b5b55e
refactor(v2): make accessible anchor links from keyboard (#3764)
* refactor(v2): make accessible acnhor links from keyboard

* Add transition
2020-11-17 03:06:53 +03:00
Alexey Pyltsyn
1dac7e33f7
fix(v2): add support for interleaving Markdown in code blocks (#3749)
* fix(v2): add support for interleaving Markdown in code blocks

* Improve check for array
2020-11-17 02:18:45 +03:00
Alexey Pyltsyn
30d7408815
refactor(v2): various markup improvements (#3763) 2020-11-17 02:15:22 +03:00
Gergely Sinka
c69ea51592
docs(v2): add ConfigCat to showcase (#3762)
* adding configcat to showcase

* Change URL to docs

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-11-17 01:42:28 +03:00
Alexey Pyltsyn
3ab7336875
fix(v2): restore prefetch functionality (#3723)
* fix(v2): attempt to restore prefetch functionality

* chore(v2): downgrade babel-plugin-dynamic-import-node to 2.3.0

* Get needed routes chunk names

* refactor prefetching logic to make it easier to understand

* array.flat() => flatten(array)

* fix flatten() typo

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-11-16 19:52:26 +01:00
Alexey Pyltsyn
153d2d46e6
fix(v2): add support for prefers-reduced-motion in hideable sidebar (#3739)
* chore(v2): downgrade babel-plugin-dynamic-import-node to 2.3.0

* fix(v2): add support for prefers-reduced-motion in hideable sidebar
2020-11-16 19:44:46 +01:00
Sébastien Lorber
f26d478f2d
fix(v2): codesandbox generated examples should use published init package (#3760)
* Fix codesandbox generated examples to use published init script instead of local one

* Fix codesandbox generated examples to use published init script instead of local one
2020-11-16 17:09:44 +01:00
Bartosz Kaszubowski
3ab9204ced
chore(internal): fix CI on merge after build size addition 2020-11-16 16:59:35 +01:00
sammychinedu2ky
bb33f54ba8
feat(v2): official CodeSandbox support (#3717)
* feat:added support for codesandbox

* added sandbox config file

* feat:added script to generate template for codesandbox

* added examples:generate script to package.json file

* added failing path to eslintignore

* added script to eslintignore

* added cleaning feature to script

* deleted sandbox script in root

* changed comment in codesandboxscript file

* update codesandboxscript.js + revert bad package.json changes

* eslint should check codesandboxscript

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-11-16 16:20:16 +01:00
Alexey Pyltsyn
5f20200661
feat(v2): allow init project via npm (#3729)
* feat(v2: allow init project via npm

* Add test-website to workspace

* Remove test-website from workspace

* Refactor
2020-11-16 16:11:16 +01:00
Jainam Chirag Shah
d05d703dad
chore(v2): add build size bot workflow Github CI workflow (#3744) 2020-11-16 15:32:04 +01:00
Alexey Pyltsyn
311be6e71a
fix(v2): escape alt text in img tag (#3757) 2020-11-16 15:21:36 +01:00
Bartosz Kaszubowski
3ad453932f
refactor(v2): introduce Logo component, remove useLogo hook (#3745)
* fix(v2): refactor theme-classic logo, remove useLogo hook

* Logo component small code tweaks

* Logo component returned type fix
2020-11-16 15:03:10 +01:00
Alexey Pyltsyn
cb55a2ba4b
chore(v2): fix mismatch peer dependency in MDX loader (#3753) 2020-11-16 12:36:24 +01:00
David Goss
bb64f68acd
docs(v2): add npm2yarn to TypeScript install command (#3750) 2020-11-15 01:08:38 +03:00