Commit graph

152 commits

Author SHA1 Message Date
Rami Yushuvaev
9b9f38cd50
docs(v2): Rewrite markdown images section (#5064)
* Rewrite markdown images section

Before it looked like we have two ways to display images, now it's three ways. Each syntax has a separate example.

This way it's clear, I see each method and the code example.

Before there were 2 methods in a single code block.

* fix typo in `markdown-features/markdown-features-assets`

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

* Rewrite image display section using CommonJS require

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

* Rewrite image display section using ES imports

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

* prettier doc

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-30 15:27:44 +02:00
Rami Yushuvaev
3fe7389ee2
docs(v2:) Divide markdown-features/code-blocks to smaller sections (#5061)
* Divide `markdown-features/code-blocks` to smaller sections

This PR adds few more heading to split the content to small topics.

This way users like me will be able to scroll directly to the specific section, instead of reading all the documentation.

I add to read the entire section because It was not divided into sections. Not a great user experience.

* Use `<h3>` heading
2021-06-25 19:25:15 +02:00
bperlmutter
1d041127b1
docs(v2): correct typo (#5066) 2021-06-25 16:18:40 +02:00
Sébastien Lorber
c63295a253
docs(v2): wrap mdx usage in mdx-code-block (#5007) 2021-06-18 17:59:51 +02:00
Alexey Pyltsyn
d7e4e422a2
docs(v2): minor tweaks (#4981) 2021-06-16 11:04:40 +02:00
Joshua Chen
af3640dca2
docs(v2): replace diff codeblocks with line highlight (#4973)
* Replace `diff` codeblocks with line highlight

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add line highlight
2021-06-16 10:29:05 +02:00
Joshua Chen
3d95a3e6b1
docs(v2): add documentation about importing code files (#4974)
* Add documentation about importing code files

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add warning about breaking API change

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update website/docs/guides/markdown-features/markdown-features-react.mdx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-15 18:38:28 +02:00
Joshua Chen
02b512c2cf
docs(v2): add documentation about importing markdown (#4958)
* Add documentation about importing markdown

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update website/docs/guides/markdown-features/markdown-features-react.mdx

* Run prettier

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-15 12:20:53 +02:00
Arthur
fea24e586e
docs(v2): add info about tabs DefaultValue prop (#4942) 2021-06-10 15:04:32 +02:00
Sébastien Lorber
df8a900f9c
feat(v2): add trailingSlash config option (#4908)
* POC: add trailingSlash option

* integrate the preferFoldersOutput option of fork @slorber/static-site-generator-webpack-plugin

* Fix broken links when using trailing slash => using md links is more reliable

* fix TS issue

* minor polish

* fix doc page being sensitive to trailing slashes

* Add tests for applyTrailingSlash

* rename test files

* extract and test applyRouteTrailingSlash

* update snapshot

* add trailing slash config to serve command

* fix getSidebar() => still sensitive to trailing slash setting

* never apply trailing slash to an anchor link

* Add documentation for trailingSlash setting
2021-06-09 19:59:39 +02:00
Alexey Pyltsyn
55e9bd8ac9
refactor(v2): remove type attribute from link and script tags (#4907)
* refactor(v2): remove type attribute from link and script tags

* minor TS fix

* stylesheets.type => optional

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-09 14:55:47 +02:00
phwt.smwt
0587d6d6e7
Fix incorrect link to plugin-ideal-image (#4896) 2021-06-03 12:20:59 +02:00
Pranab Das
6d184a3e3d
docs(v2): New doc page for math equations (#4821)
* New doc page for math equations

* improve math equations doc

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-02 14:55:50 +02:00
Christopher Hsieh
792ff9326a
docs(v2): fix grammar typo on Creating pages (#4835)
* Update creating-pages.md

* Update creating-pages.md
2021-05-24 12:46:03 +03:00
Pranab Das
4b5d612009
docs(v2): Fix typo in doc: sidebar.md (#4820)
Fixed a typo on `highlight-start` in the section **Hideable sidebar**.
2021-05-20 11:28:12 +02:00
Sébastien Lorber
0c105a2a79
docs(v2): fix css snipped with missing color (#4813)
* Update markdown-features-code-blocks.mdx

* fix doc lint issue
2021-05-18 18:40:15 +02:00
Sébastien Lorber
86cab6111b
docs(v2): fix doc lint (#4727) 2021-05-04 16:30:08 +02:00
Joshua Chen
ccf1a222a3
docs(v2): emphasize subset of markdown supported languages (#4725)
* doc(v2): emphasize subset of markdown supported
languages

* Update website/docs/guides/markdown-features/markdown-features-code-blocks.mdx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-05-04 15:57:17 +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
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
Forresst
b9de28e42f
docs(v2): fix markdown headings level 4 (#4526) 2021-03-29 17:23:20 +02: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
78349480af
chore: rename v2.docusaurus.io urls after domain switch + redirect + cleanups (#4490)
* prepare v1-v2 domain switch

* rename v1 changelog as CHANGELOG-1.x.md

* switch v1/v2 changelogs

* Cleanup v2.docusaurus.io urls

* add netlify domain redirect

* remove circleci config

* remove another circle file
2021-03-22 20:57:49 +01:00
aehrea
3c165c3b89
docs(v2): fix grammar and improve wording (#4481)
- resolve grammar issue in Setup heading and rephrase to (subjectively) more clear wording
- more consistent wording in first line of Versioned paths heading
2021-03-22 17:57:11 +01:00
Arijit Kundu
be6ef076f0
docs(v2): corrected the use of delimiters (#4478) 2021-03-21 12:23:08 +03:00
Arijit Kundu
9bdb9eb630
docs(v2): fixed broken link in sidebar documentation (#4472) 2021-03-19 22:29:03 +03:00
Alexey Pyltsyn
291a72fbae
docs(v2): use explicit heading IDs (#4460) 2021-03-19 11:00:41 +01:00
Alexey Pyltsyn
1c7d423e0c
docs(v2): various improvements (#4369)
* docs(v2): various improvements

* Update blog.md
2021-03-09 14:59:32 +01:00
Alexey Pyltsyn
96e7fcef25
feat(v2): add ability to set custom heading id (#4222)
* feat(v2): add ability to set custom heading id

* Add cli command

* Fix slugger

* write-heading-ids doc + add in commands/templates

* refactor + add tests for writeHeadingIds

* polish writeHeadingIds

* polish writeHeadingIds

* remove i18n goals todo section as the  remaining items are quite abstract/useless

* fix edge case with 2 md links in heading

* extract parseMarkdownHeadingId helper function

* refactor using the shared parseMarkdownHeadingId utility fn

* change logic of edge case

* Handle edge case

* Document explicit ids feature

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-05 19:36:14 +01:00
tokarchyn
98a4b3a65c
feat(v2): Add playgroundPosition config for live codeblock (#4328)
* docs(v2): Add configuration parameter to allow putting Result before Editor in @docusaurus/theme-live-codeblock

* update doc

* refactor as playgroundPosition

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-05 14:49:17 +01:00
Sébastien Lorber
cc42cf5af7
docs(v2): escape more jsx in mdx files for Crowdin (#4285) 2021-02-24 15:46:00 +01:00
Sébastien Lorber
6811a72e72
feat(v2): ability to "escape" JSX in MDX files as code blocks (#4278)
* Fix MDX Crowdin issues by wrapping complex JSX in code blocks

* Add a remark plugin to unwrap MDX code blocks

* Update MDX Crowdin doc
2021-02-24 12:34:03 +01:00
Juan Carlos Blanco Delgado
2ff5d347ba
docs(v2): Removing wrong parenthesis on image variable (#4226)
* Removing wrong parenthesis on image variable

* Updating markdown feature documenation
2021-02-16 09:28:54 +01:00
Sébastien Lorber
e807bff666
docs(v2): improve bad static assets doc + remove some useless useBaseUrl usage (#4158) 2021-02-02 18:26:51 +01:00
Nahiyan Kamal
f0f3de8008
docs(v2): guide docs typo fix (#4143) 2021-02-01 12:02:59 +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
Vamsi Krishna Reddy Satti
d8ef2a9051
docs: fix typo from 'dissapear' to 'disappear' (#4022) 2021-01-10 13:20:28 +08:00
Sébastien Lorber
d5d6e2fba2
docs(v2): Add documentation for docs multi-instance support (#3978)
* Add documentation for docs multi-instance support

* Add documentation for docs multi-instance support
2020-12-30 19:41:42 +01:00
Sébastien Lorber
d99d53a236
docs(v2): Reorganize/split the guides doc sections (#3975)
* docs reorg

* refactor docs/markdown features section

* fix broken links after docs refactor
2020-12-30 17:03:25 +01:00
Sébastien Lorber
8f47babb46
docs(v2): Docs refactoring and reorganization (#3831)
* stable refactor of plugins api documentation

* plugins sidebar not collapsed by default as small?

* theme docs reorg

* Refactor migration guide doc

* fix broken link
2020-11-30 14:07:08 +01: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
Alexey Pyltsyn
498f8a0f27
chore(v2): adjust website npm package (#3709) 2020-11-09 15:28:18 +01:00
Hamza Hamidi
e0c644e623
feat(v2): Add themeConfig.noIndex option #3528 (#3573)
* feat(v2): Add themeConfig.noIndex option #3528

* feat(v2): Add themeConfig.noIndex optionthrough ssrTemplate

* feat(v2): Include themeConfig.noIndex in CLI migration v1 to v2

* feat(v2): Remove themeConfig.noIndex from env dev
2020-10-14 11:14:16 +02:00
Alexey Pyltsyn
9134b1396b
docs: various fixes and improvements (#3546) 2020-10-07 12:39:47 +02:00
Sébastien Lorber
637fe0087d
feat(v2): add TOC to markdown pages #3529 2020-10-03 17:33:36 +02:00
Bartosz Kaszubowski
ae2c063929
feat(v2): allow to use array of files in customCss field (#3474)
* feat(v2): allow to use array of files in customCss field

* customCss array:
- fix bug (push instead of concat)
- update docs
- add theme config validation + tests

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-09-28 18:15:41 +02:00
Bogdan
b75a7150b2
docs(v2): fix migration command (#3249) 2020-08-11 17:16:48 +02:00
Anshul Goyal
f234c407f1
feat(v2): add support to ignore files in pages plugin (#3196)
* add support to ignore pages

* fix import problem

* Update website/docs/guides/creating-pages.md

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

* Revert "fix import problem"

This reverts commit 4457a2e938.

* revert

* fix slash

* forbid frontmatter

* fix formatting

* Update website/docs/guides/creating-pages.md

* Update website/src/pages/examples/_chapter1.md

* Update website/src/pages/examples/_chapter2.mdx

* Update website/src/pages/examples/markdownPageExample.md

* Update website/src/pages/examples/markdownPageExample.md

* Update website/src/pages/examples/markdownPageExample.md

* Update website/src/pages/examples/markdownPageExample.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-05 21:35:55 +02:00
alex busnelli
0d7314a6f7
docs(v2): removed duplicate text under "Using React" section (#3201)
* removed duplicate text under "Using React" section

* docs(v2): removed duplicate text under "Using React" section in trunk docs
2020-08-04 07:30:22 +08:00
Teik Jun
300aecb8bc
feat(v2): warn user when there are conflicting routes (#3083)
* feat(v2): add warning for path override

* feat(v2): check all routes recursively

* docs(v2): add docs for conflicting routes

* style(v2): improve comments in code

* refactor(v2): remove unused lifecycle method from docs plugin

* Revert "refactor(v2): remove unused lifecycle method from docs plugin"

This reverts commit 8b2caaa091.

* feat(v2): add option for changing duplicate path behavior

* feat(v2): decouple logging from logic and detect duplicate routes in one pass

* test(v2): fix failing tests

* test(v2): add tests for duplicateRoutes

* test(v2): add test for handleDuplicateRoutes

* style(v2): add else statement

* docs(v2): modify documentation for duplicate routes

* docs(v2): move doc into guides folder

* fix(v2): fix broken links

* docs(v2): move docs for docusaurus config into api folder

* style(v2): add comments

* refactor(v2): extract getFinalRoutes

* refactor(v2): scope getFinalRoutes to docusaurus package

* test(v2): remove obsolete snapshots

* docs(v2): remove some docs

* fix(v2): rerun github actions

* docs(v2): change slug of docs in api folder

* refactor(v2): extract out a reportMessage method

* refactor(v2): extract getAllFinalRoutes

* test(v2): replace snapshots with actual value

* style(v2): remove unnecessary comment and change type

* chore(v2): remove unused dependency

* style(v2): remove unused code

* Update packages/docusaurus/src/server/utils.ts

* Update website/docs/guides/creating-pages.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-07-31 21:14:49 +02:00