Commit graph

109 commits

Author SHA1 Message Date
Anshul Goyal
3155dc30dc
feat(v2): support for adding relative images and handling broken image links (#3069)
* all relative path in image url

* throw error if file doesn't present

* better error

* add @docusaurus/core to deps

* fix test
2020-07-21 15:27:45 +02:00
Sébastien Lorber
15e73daae7
feat(v2): global data + useGlobalData + docs versions dropdown (#2971)
* doc components initial simplification

* doc components initial simplification

* add docContext test

* Add poc of global data system + use it in the theme

* Revert "doc components initial simplification"

This reverts commit f657b4c4

* revert useless changes

* avoid loosing context on docs switch

* fix docs tests

* fix @generated/globalData ts declaration / es import

* typo

* revert bad commit

* refactor navbar in multiple parts + add navbar item types validation + try to fix remaining merge bugs

* add missing watch mode for plugin debug

* fix docs global data integration, move related hooks to docs plugin + convert to TS

* change versions link label

* fix activeClassName react warning

* improve docs global data system + contextual navbar dropdown

* fix bug preventing the deployment

* refactor the global data system to namespace automatically by plugin name + plugin id

* proper NavbarItem comp

* fix tests

* fix snapshot

* extract theme config schema in separate file + rename navbar links to navbar items

* minor typos

* polish docs components/api

* polish useDocs api surface

* fix the docs version suggestions comp + data

* refactors + add docsClientUtils unit tests

* Add documentation

* typo

* Add check for duplicate plugin ids detection

* multi-instance: createData plugin data should be namespaced by plugin instance id

* remove attempt for multi-instance support
2020-07-21 11:16:08 +02:00
Anshul Goyal
a51a56ec42
feat(v2): add support for serve command (#3080)
* add support for serve command

* add serve to init

* use existing choosePort function

* add --host

* add more docs

* add docs to deployment
2020-07-20 19:00:37 +02:00
Sébastien Lorber
9265de982b
chore(v2): refactor scripts + add theme-classic watchmode (#2998) 2020-07-01 18:30:44 +02:00
Sam Zhou
cf5babd5c1
chore(v2): Add E2E test for yarn v2 (#3008)
* chore(v2): Add E2E test for yarn v2

* Remove root node_modules to prevent them from accessible in e2e test

The purpose of e2e test is to ensure that the docusaurus inited website can stand on its own. The root node_modules remain accessible according to how node resolution works and it might interfere with the test. Remove them for safety.

* Add @mdx-js/react to docusaurus init templates
2020-07-01 12:06:03 +02:00
Sam Zhou
6e43c9bd34
chore(v2): Fix more eslint errors (#2976) 2020-06-21 15:09:00 +08:00
slorber
16ba6e54b6 v2.0.0-alpha.58 2020-06-18 14:02:26 +02:00
Sébastien Lorber
72884a0c1a
chore(v2): fix eslint TS setup (#2949)
* update eslint parser

* fix yarn lint script

* lint-staged, lint ts files

* fix TS eslint configuration + fix some lint errors (https://github.com/facebook/docusaurus/pull/2949)

* eslint root + separate linting in 2 scripts

* test commit

* test commit

* test commit

* fix /// TS directive
2020-06-18 17:37:48 +08:00
Sébastien Lorber
b5d7c3a111
misc(v2): better dx: yarn clear, yarn watch, yarn serve (#2922)
* add clear + serve scripts

* add ability to launch all TS projects in --watch mode

* attempt to create a watch plugin

* use rimraf for clear script

* update watch plugin poc

* add start:v2:watch

* remove the watch plugin
2020-06-16 20:40:46 +08:00
Sam Zhou
729b3cae9b
feat(v2): Allow configuring babel via babel.config.js (#2903)
* feat(v2): Allow configuring babel via docusaurus.config.js

* Use api.caller feature from babel to avoid expose isServer to users

* Remove unused optional config key

* Make babel loader resolve and require config file
2020-06-12 11:03:00 +08:00
Teik Jun
66716d1619
feat(v2): add nojekyll file to static folder for all templates (#2902) 2020-06-08 09:45:57 +08:00
Alexey Pyltsyn
afe9ff91a4
chore(v2): replace classnames with clsx (#2895) 2020-06-07 13:40:06 +08:00
Alexey Pyltsyn
d8ebe8b2e4 v2.0.0-alpha.56 2020-05-27 20:18:28 +03:00
Sam Zhou
33b60c6ba4
fix(v2): Consistently use 10.15.1 as the minimum required node version (#2819) 2020-05-27 23:18:48 +08:00
Alexey Pyltsyn
ca90b42991
misc: minor improvements for init templates (#2802) 2020-05-24 19:47:04 +08:00
Alexey Pyltsyn
2e12269f94
misc: use branded favicon in init templates (#2803) 2020-05-24 12:48:04 +08:00
Alexey Pyltsyn
0ff6dd31f4
style(v2): disable Prettier checks for Markdown files of init templates (#2792) 2020-05-23 05:05:16 +08:00
Yangshun Tay
20fbceb9f1 docs(v2): fix markdown syntax examples in templates 2020-05-22 19:18:29 +08:00
Piotr Baran
926cbb818b
docs(v2): change docs for markdown features (#2786)
* fix(v2): change docs for markdown features

* Update doc1.md

* Update doc1.md

* Update doc1.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-05-22 18:57:48 +08:00
Alexey Pyltsyn
d94a549cfb v2.0.0-alpha.55 2020-05-19 13:55:03 +03:00
Alexey Pyltsyn
c7baa125e6
chore(v2): mention about docs home page in init templates (#2763)
* chore(v2): mention about docs home page in init templates

* use home page id for docs

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-05-18 13:14:06 +08:00
Fanny
7e97d40075
feat(v2): bootstrap doc sidebar (#2735)
* feat(v2): add minor adjustements and footer component

* fix(v2): margin and spacing of footer

* feat(v2): add navbar component

* ádd collapse classname

* feat(v2): add dependencies

* feat(v2): remove unused code

* feat(v2): remove unused links

* feat(v2): add reactstrap components :|

* feat(v2): add brand and other nav componnets

* feat(v2): Add the layout tag

* feat(v2): bootstrap start doc components

* feat(v2: Add syntax highlight

* Ádd Page components

* feat(v2): Bootstrap MDX Componnets

* fix(v2): Fix layout height

* fix(v2): Fix spacings

* feat:(v2): Add the layout in doc content

* feat(v2): Start the pagination

* feat(v2): Finish pagination

* Fix margins in mobile

* feat(v2): Add the doc sidebar

* feat(v2): Add sidebar

* feat(v2): Makes sidebar responsive

* feat(v2): Add context

* feat(v2): Add new hook and docs to the template sidebar

* feat(v2): Add css modules

* feat(v2): add sidebar class

* feat(v2): add floating action button

* fix fab styles

* fix(v2): fix height

* feat(v2): Remove context

* feat(v2): Finish sidebar

* feat(v2): Add resize window hook

* feat(v2): Remove unsed fields

* feat(v2): Add theme

* feat(v2): improve sidebar definitions

* feat(v2): fix conflicts
2020-05-18 11:06:48 +08:00
Fanny
b91f02dee2
feat(v2): bootstrap doc paginator (#2734)
* feat(v2): add minor adjustements and footer component

* fix(v2): margin and spacing of footer

* feat(v2): add navbar component

* ádd collapse classname

* feat(v2): add dependencies

* feat(v2): remove unused code

* feat(v2): remove unused links

* feat(v2): add reactstrap components :|

* feat(v2): add brand and other nav componnets

* feat(v2): Add the layout tag

* feat(v2): bootstrap start doc components

* feat(v2: Add syntax highlight

* Ádd Page components

* feat(v2): Bootstrap MDX Componnets

* fix(v2): Fix layout height

* fix(v2): Fix spacings

* feat:(v2): Add the layout in doc content

* feat(v2): Start the pagination

* feat(v2): Finish pagination

* Fix margins in mobile

* feat(v2): Add theme
2020-05-17 22:51:03 +08:00
Fanny
063484a05a
feat(v2): bootstrap layout (#2710)
* feat(v2): add minor adjustements and footer component

* fix(v2): margin and spacing of footer

* feat(v2): add navbar component

* ádd collapse classname

* feat(v2): add dependencies

* feat(v2): remove unused code

* feat(v2): remove unused links

* feat(v2): add reactstrap components :|

* feat(v2): add brand and other nav componnets

* feat(v2): Add the layout tag

* fix(v2): Fix layout height

* fix(v2): Fix spacings
2020-05-17 18:01:38 +08:00
Julien Deniau
29506be389
fix(v2): fix index page features.length when 0 (#2751) 2020-05-15 21:29:48 +08:00
Fanny
dd1ad5d943
Merge pull request #2739 from facebook/fanny/copyright-headers
chore(v2): Add missing copyright headers
2020-05-13 14:26:04 -03:00
fanny
f8a22d1394 çhore(v2): revert changes 2020-05-13 14:07:35 -03:00
fanny
06f8a90b81 chore(v2): remove unnecessary comments 2020-05-13 13:34:58 -03:00
fanny
a6cc1f88e3 çhore(v2): revert changes 2020-05-13 13:32:04 -03:00
Fanny
7d8aeacf52
feat(v2): bootstrap layout navbar (#2668)
* feat(v2): add minor adjustements and footer component

* fix(v2): margin and spacing of footer

* feat(v2): add navbar component

* ádd collapse classname

* feat(v2): add dependencies

* feat(v2): remove unused code

* feat(v2): remove unused links

* feat(v2): add reactstrap components :|

* feat(v2): add brand and other nav componnets
2020-05-13 11:24:53 +08:00
fanny
c23f065175 chore(v2): Add copyright headers 2020-05-12 14:01:12 -03:00
Alexey Pyltsyn
753d117025 v2.0.0-alpha.54 2020-04-28 09:49:27 +03:00
Alexey Pyltsyn
d90fdb04d5 v2.0.0-alpha.53 2020-04-27 16:38:33 +03:00
Alexey Pyltsyn
7359945f52 v2.0.0-alpha.52 2020-04-27 16:30:15 +03:00
Alexey Pyltsyn
c9c5aedcb5 v2.0.0-alpha.51 2020-04-27 14:44:56 +03:00
Alexey Pyltsyn
8730df7044
chore: upgrade shelljs to 0.8.4 (#2661) 2020-04-26 03:34:48 +08:00
Yangshun Tay
e1258baa77
chore(v2): add Privacy Policy and Terms of Use links to footer (#2638)
* chore(v2): add Privacy Policy and Terms of Services links to footer

* rename

* Shift to links
2020-04-22 12:30:03 +08:00
Fanny
ea5a50c4de
feat(v2): bootstrap theme blog post page (#2591)
* feat(v2): init the blog post card

* feat(v2): Update card design

* chore(v2): remove unused dependency

* feat(v2): add post list

* feat(v2): improve html tags

* chore(v2): run prettier

* feat(v2): remove old tag

* feat(v2): apply suggestions

* feat(v2): add tags for blog post

* feat(v2): add post content

* feat(v2): add tags

* feat(v2): add specific tag page

* feat(v2): fix tablet layout

* feat(v2): fix tablet layout

* feat(v2): add blog post page

* feat(v2): apply suggestions

* Update 2020-04-14-blog-plugin.md

* Update 2020-04-14-large-blog-post.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-15 10:03:23 +08:00
Fanny
f61b92d86a
feat(v2): bootstrap blog post page and card (#2584)
* feat(v2): init the blog post card

* feat(v2): Update card design

* chore(v2): remove unused dependency

* feat(v2): add post list

* feat(v2): improve html tags

* chore(v2): run prettier

* feat(v2): remove old tag

* feat(v2): apply suggestions
2020-04-12 22:41:34 +08:00
Fanny
434da1d7ea
feat(v2): bootstrap bootstrap (heh) theme, preset, template (#2557)
* feat(v2): Add bootstrap theme structure

* chore(v2): run prettier

* chore(v2): remove unused dependencies

* feat(v2): add bootstrap preset

* feat(v2): add bootstrap template

* remove unnecessary stuff

* --

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-09 12:58:01 +08:00
Alexey Pyltsyn
8f0206b2fe
chore(v2): update Prettier config (#2542)
* chore(v2): update prettier config

* Update .prettierrc

* --

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-05 23:51:47 +08:00
Fanny
c09835a762
feat(v2): add showReadingTime and editUrl to the templates (#2541)
* Add mdx plugins

* Apply suggestions from code review

Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>

* Update website/docs/markdown-features.mdx

Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>

* Update markdown-features.mdx

* Update templates with new fields

* Rebase

* fix(v2): tests

* Update docusaurus.config.js

* Update docusaurus.config.js

* Update docusaurus.config.js

* Update docusaurus.config.js

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-04-05 23:16:40 +08:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Alexey Pyltsyn
c207c3ba31 v2.0.0-alpha.50 2020-04-02 21:00:47 +03:00
Alexey Pyltsyn
9cff1bb9e4
chore(v2): upgrade deps (#2508) 2020-04-02 19:05:03 +08:00
Yangshun Tay
409f169379 v2.0.0-alpha.49 2020-04-01 16:00:14 +08:00
Elvis Wolcott
16a84998da
fix(v2): expand broken admonitions (#2458)
* fix: expand broken admonitions

* fix: properly format admonitions
2020-03-25 18:22:03 +08:00
Alexey Pyltsyn
38bb8c4ced v2.0.0-alpha.48 2020-03-09 01:46:10 +03:00