Commit graph

111 commits

Author SHA1 Message Date
Alexey Pyltsyn
78d146419f
chore: fix gen script to support TS template (#5722) 2021-10-20 12:45:06 +02:00
Alexey Pyltsyn
7ae3ea2c37
chore: regenerate beta.7 examples (#5720) 2021-10-16 09:25:24 +03:00
Sébastien Lorber
a0c2c52829
chore: remove unused Bootstrap theme (#5634)
* remove package

* remove bootstrap from doc

* remove bootstrap init template + examples

* remove bootstrap preset

* remaining bootstrap refs

* update lockfile
2021-10-01 17:44:34 +02:00
Sébastien Lorber
3d05ec2e4b
chore: regenerate beta.6 examples + fix regen script (#5484)
* update examples script

* rename ext

* typo

* update examples

* fix script to update starters

* update examples

* add --allow-empty so that script does not fail if nothing changed

* fix lint
2021-09-03 16:54:06 +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
b3e89d2a86
feat: docusaurus.new + improved StackBlitz playground (#5235)
* Upgrade playground shortcut domain to docusaurus.new

* update generateExamples

* update generateExamples + re-generate with stackblitz config

* test

* test

* test

* test

* test

* update examples

* upgrade lockfile

* fix yarnlock

* fix yarnlock
2021-07-28 19:27:58 +02:00
Sébastien Lorber
8e386e0244
chore(v2): upgrade examples to beta.2 (#5057) 2021-06-24 20:02:57 +02:00
Sébastien Lorber
8f8a5afb0c
chore: regenerate examples on 2.0.0-beta.0 (#4777) 2021-05-12 16:35:51 +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
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
Arijit Kundu
ecc3444865
docs(v2): fixed typos (#4560)
* docs(v2): fixed typos

* docs(v2): fixed typos
2021-04-05 18:42:41 +02:00
Guillaume Claret
bc7c06ee37
chore(v2): fix typo in classic init template (#4488) 2021-03-22 00:26:31 +03:00
Armano
357ea7d836
chore(v2): migrate babel-eslint to @babel/eslint-parser (#4453)
* chore(v2): migrate babel-eslint to @babel/eslint-parser

* chore(v2): align facebook example packages

* chore(v2): lock babel-eslint for docusaurus-1x

* chore(v2): align pakcages in facebook init template

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-19 11:59:36 +01:00
Sébastien Lorber
5543f09ed1
chore: json files should be linted (#4462) 2021-03-18 19:39:50 +01:00
Sébastien Lorber
f71c246ff1
chore(v2): upgrade example projects (#4399) 2021-03-11 17:01:04 +01:00
Alexey Pyltsyn
175d9c3c8e
feat(v2): support/use React v17 by default (#4218)
* chore(v2): allow React v17 as peer dependency

* minor React 17 changes

* Revert examples

* Possible fix

* Use @docusaurus/react-loadable fork

* add back react-loadable to please eslint/ts/linters, even if it's unused in practice

* missing dependency bump

* move enzyme dependencies to docusaurus v1

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-02-12 17:04:45 +01:00
LittleboyHarry
22e231904d
feat(v2): improve templates, use JSDoc type annotation, improve docusaurus.config.js autocompletion (#4098)
Co-authored-by: LittleboyHarry <LittleboyHarry@users.noreply.github.com>
2021-01-27 15:34:12 +01:00
Sébastien Lorber
eeb167e244
polish(v2): improve codesandbox template package.json (#4074) 2021-01-20 13:29:45 +01:00
Sébastien Lorber
a8ee7fd3e8
docs(v2): i18n doc + polish (#4014)
* add some initial i18n doc

* i18n doc progress

* i18n tutorial progress

* i18n tutorial progress

* polish Crowdin docs

* i18n sidebar in guides

* polish crowdin doc

* update Crowdin doc a bit

* fix annoying relative link to global site resource in template (breaks i18n tutorial)

* template: use simpler export for homepage

* add markdown page example

* rename mdx.md to interactiveDoc.mdx

* update bootstrap/facebook templates too

* sync init template package scripts

* add slug frontmatter doc

* improve i18n doc

* complete i18n doc

* temporarily enable the localeDropdown

* doc typo

* improve the i18n doc

* Add Git i18n doc

* add missing "--" for npm run options (unfortunately they don't get stripped by npm2yarn, and are required foor npm)

* improve a bit the Crowdin doc
2021-01-19 17:26:31 +01:00
Sébastien Lorber
c6ce46ac72
chore(v2): Regen codesandbox templates + add template: "docusaurus" (#4063) 2021-01-19 16:13:14 +01:00
Joel Marcey
827de9a840
feat: add new policy links to Docusaurus site and FB template (#4019) 2021-01-10 14:07:59 +08: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
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
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
Yangshun Tay
f2927a9fc4
Move Docusaurus 1 files into directory (#966)
* Move Docusaurus 1 into v1 directory

* Update Circle CI commands for new v1 dir

* Remove OC

* Fix tests
2018-09-18 00:58:07 +08:00
Yangshun Tay
9d4a5d5359
Prettify all JavaScript files (#964)
* Prettify all JavaScript files

* Make trailingComma all

* Delete v2/.prettierignore

* Remove v2 Prettier commands in package.json
2018-09-17 15:34:55 +08:00
Eric Nakagawa
ac01fcf881
Merge pull request #936 from wszgxa/add-docker-support
Add docker support
2018-09-06 11:20:11 -07:00
hiluluke
6dcd24ec8d Add docker related file to basic example 2018-09-03 13:21:03 +08:00
Jaril Valenciano
7987e66bed Add new README.md for new Docusaurus projects (#930)
* added new readme.md

* Update README.md
2018-09-01 13:50:57 -07:00
Yangshun Tay
a7a214fb3a ESLintify Part 3 (#846)
* ESLintify Part 3

* ESLintify Part 3

* ESLintify Part 3
2018-07-11 18:21:31 +08:00
Yangshun Tay
5ac2cee658
ESLintify Part 2 (#841)
* ESLintify Part 2

* Fix

* Fix tests

* Fix tests

* Fix tests
2018-07-10 21:53:08 -07:00
Yangshun Tay
e8e3f42685
ESLintify Part 1 (#837)
* ESLint-ify

* Allow empty try/catch

* Escape regexp
2018-07-08 09:13:18 -07:00
Yangshun Tay
128dbfca0a Tidy up ESLint usage (#836)
* Use Airbnb ESLint

* Turn off rules

* Add back

* add website to eslint precommit

* Add back

* remove useless escape
2018-07-07 15:25:14 +07:00
Yangshun Tay
1094dbd352
CSS revamp - Improve typography and overall styling (#757)
* Improve CSS code

* Fix blog layout

* Fix

* Refactor onPageNav

* More fixes

* Fix docs nav

* Use alternative hack

* Tweak clearfix
2018-06-19 21:46:15 -07:00
Endilie Yacop Sucipto
767cd88d86 Update gitignore docusaurus-init (#728) 2018-06-06 12:07:22 -07:00
Joel Marcey
b56bb5aa27
Revert "Update static image assets (#631)" (#632)
This reverts commit 6bcc9e44a0.
2018-05-03 12:20:37 -07:00
Yangshun Tay
6bcc9e44a0
Update static image assets (#631)
* Update static image assets

* Update image
2018-05-03 11:10:20 -07:00
Yangshun Tay
d7c093e241 Fix example site's user image path (#605) 2018-04-25 12:29:25 -07:00
Joel Marcey
71b5d46f46 Run prettier 2018-04-17 21:16:31 -07:00
Joel Marcey
fd04b44dda
Updates to the example site config
- Open Graph and Twitter Card images
- Enable on page navigation
- formtting
2018-04-17 21:14:01 -07:00
Joel Marcey
bc3eef1b00
Update siteConfig example and docs (#544) 2018-04-10 10:00:04 -07:00
Joel Marcey
fc051acde5
Fix .gitignore placement when running example script or docusaurus-init (#533)
Fixes #415
2018-04-08 07:35:35 -07:00
Yangshun Tay
e19b9ac56e Add rel="noreferrer noopener" to <a> with target="_blank" (#531)
* Add rel="noreferrer noopener" to <a> with target="_blank"

* Run Prettier
2018-04-07 19:14:28 -07:00
Amy Lam
c2cd169b64 Add alt tags to images for a11y (#529)
- Add imageAlt to GridBlock
- Set alt equal to `user.caption` for mapped users
- Set alt equal to `post.author` for blog posts
- Update documentation
2018-04-07 19:13:12 -07:00
Happy-Ferret
37c699e8bd Use siteConfig properties inside Example pages (#497)
Replace hardcoded values inside "footer",
"help" and "users" with properties
from siteConfig.

Fixes #488
2018-03-16 14:07:09 -07:00
Joel Marcey
f1893d5fea
Add secondary, page-specific navigation documentation (#498)
And enable for docusaurus.io
2018-03-12 16:27:37 -07:00
Ronen Amiel
c800870fef use id attribute instead of name for in page anchors and remove redundant anchors (#449) 2018-03-07 14:25:48 -08:00
Aimee Pierce
8c2145585c support optional siteConfig.users (#484)
Fixes Issue #402 caused by removing optional users array from siteConfig file. Users array is now validated before using its properties.
2018-03-07 14:21:12 -08:00
Joel Marcey
edbb869e26
Add more details on configurable fonts (#409) 2018-01-21 20:10:04 -08:00
ppatel221
7864e1b329 Update doc2.md (#366) 2018-01-11 16:38:20 -08:00