Commit graph

567 commits

Author SHA1 Message Date
Sébastien Lorber
dc4664b489
feat: details/summary theme / MDX component (#5216)
* Details component

* polish arrow animation

* fix text selection bug

* fix some edge cases + polish

* example of overriding baseClassName

* Move Details component to theme-common

* make component work even when JS is disabled or failed to load

* update arrow transform

* Details component: better handling of no-JS fallback mode: avoid delaying arrow navigation when JS (see review)

* prefix css vars with --docusaurus

* improve css arrow styling

* slightly change details/summary design

* better md doc + include quotes and details in doc
2021-07-27 18:45:12 +02:00
Sébastien Lorber
083037d7a5
refactor: redesign admonitions/callouts/quotes (#5193)
* prepare admonitions redesign

* Docusaurus admonition cleanup

* cover more edge cases in Docusaurus admonitions page: interleaving code blocks and links

* cover more edge cases in Docusaurus admonitions page: interleaving code blocks and links

* update Infima with new alerts
2021-07-23 17:10:38 +02:00
Joshua Chen
24156efcfb
feat: docs plugin options sidebarCollapsible + sidebarCollapsed (#5203)
* Add prop

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

* Add `collapsible` option to sidebar item

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

* Add eslint-ignore

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

* Move new page

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

* Allow in autogenerated

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

* Fix tests

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

* Move config options to plugin-docs

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

* Make non-collapsible items always expanded

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

* docs versioning cli should receive a single options object

* Update cli.test.ts

* revert validateCategoryMetadataFile change

* remove theme usage of themeConfig.sidebarCollapsible

* better handling of sidebar item category inconsistencies + add warning message

* Update snapshot

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

* Handle plugin option inconsistencies

* improve doc for new sidebarCollapsible doc options

* remove warning in fixSidebarItemInconsistencies as it will be annoyed for versioned sites, as "collapsed" is already persisted in sidebar json files

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-23 14:24:36 +02:00
Sébastien Lorber
b38c35a36d
docs: mention Link can be used for external links (#5212) 2021-07-23 12:24:03 +02:00
Pranab Das
7b2d45a439
docs(v2): Elaboration of raw-loader in markdown react component (#5210)
* docs(v2): Elaboration of raw-loader in React component

* Add prettier ignore for a blocks to avoid unintended semicolon
2021-07-23 10:31:38 +02:00
Sébastien Lorber
700a82aefe
feat: multiple playground choices (#5207)
* poc of using netlify functions for playground redirections

* push

* cleanup

* restore files

* fix netlify functions?

* fix netlify functions?

* implement serverless functions for playgrounds with persistent cookie

* move new.docusaurus.io to monorepo packages

* move new.docusaurus.io to monorepo packages

* lockfile

* push

* catch-all redirect

* Translate/Interpolate: add better error message if not used correctly

* Add /docs/playground page

* Add some additional doc
2021-07-22 21:10:36 +02:00
Sébastien Lorber
4d06f26c1f
fix(v2): Fix MDX docs being considered as partials when siteDir match the _ prefix convention (#5199)
* Add _ to dogfood docs folder to cover against edge case

* Fix edge case with MDX partials when site / content dir contains a _ prefix

* add globUtils tests

* proper dogfooding folder re-organization, all content plugins being used

* refactor dogfooding folder + expose /tests page index

* fix page plugin ignoring options.routeBasePath
2021-07-21 14:13:51 +02:00
tohid nateghi
a2729128db
docs: user should restart docusaurus after adding prism additionalLanguage (#5191)
* Update markdown-features-code-blocks.mdx

if you add php language and don't restart your server, you will get an error like this

uncaught Error: Cannot find module './prism-php'

until you restart your server

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

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-20 15:38:04 +02:00
Joshua Chen
f5f39fa8e0
docs: update API docs on navbar behavior (#5175)
* Document navbar dropdown behavior

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

* Partially done API documentation

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

* Complete API documentation

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

* Add deprecation warning

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

* Address suggestions

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

* Minor fixes

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

* Update website/docs/api/themes/theme-configuration.md

* Update website/docs/api/themes/theme-configuration.md

* Update website/docs/api/themes/theme-configuration.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-20 14:07:09 +02:00
Sébastien Lorber
81170a79f4
docs(v2): Update tutorial link (#5178) 2021-07-15 14:56:41 +02:00
Sébastien Lorber
8bdb3da233
feat(v2): generalize usage of _ prefix convention to exclude content files/folders (#5173)
* create a swizzleWarning partial for shared text

* Generalize usage of _ prefix convention to exclude content files/folders

* add api doc

* MDX loader should not expect metadata/frontmatter on MDX partial files
2021-07-15 13:21:41 +02:00
Arnaud Jeannin
2bd7f0d7a1
docs(v2): Update deploy with Qovery docs for V2 (#5158)
* Update deploy with Qovery docs for V2

Hello Docusaurus team,

I updated the docs for the new Qovery V2

https://www.qovery.com/blog/qovery-v2-beta-is-out

* run prettier on docs

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-14 11:26:42 +02:00
Raz Luvaton
d1f3a3631a
Open docs(v2): Indent code example to improve readability (#5152) 2021-07-13 10:09:19 +02:00
Nazar
f14d8d2fdd
docs(v2): GIF format is not suported (#5133)
https://github.com/facebook/docusaurus/issues/2956

Please check the issue above.
GIF format is currently is not supported
2021-07-12 19:40:42 +02:00
Lennart Koopmann
f74e6c5107
docs(v2): clarify how to disable edit links entirely (#5112)
* docs: clarify how to disable edit links entirely

* Update website/docs/api/plugins/plugin-content-docs.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-05 12:38:10 +02:00
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
Ayush das
632b21bcf6
docs(v2): update installation docs (#5073)
* docs: update installation docs to 2.0.0beta.2

* Update website/docs/installation.md

* Update website/docs/installation.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-29 10:20:41 +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
138b4c9975
fix(v2): allow undefined favicon (#5054)
* fix(v2): allow undefined favicon

* fix snapshots
2021-06-24 18:50:28 +02:00
Sébastien Lorber
364051f232
feat(v2): docs version banner configuration option (#5052)
* refactor DocVersionBanner => versionMetadata prop should be forwarded instead of using "useActiveVersion" + global data

* docs version banner configuration

* add doc for versions.banner

* fix tests

* improve docs plugin option api doc
2021-06-24 18:04:16 +02:00
Rami Yushuvaev
814455f88e
docs(v2): Fix Gatsby theme name for docs site - Docz (#5049) 2021-06-24 11:03:04 +02:00
Sébastien Lorber
119c6d143e
feat(v2): plugins injectHtmlTags + configureWebpack should receive content loaded (#5037)
* more lifecycles should receive plugin loaded content

* refactor docs/blog plugins to use newly injected loaded plugin content instead of a mutable variable

* update lifecycle docs

* update lifecycle docs

* fix failing tests
2021-06-22 17:36:51 +02:00
Sébastien Lorber
41eaa690ee
docs(v2): GH pages: recommend using trailingSlash (#5033) 2021-06-22 11:25:34 +02:00
Eshan Tripathi
425eccc5df
docs(v2): typo in deployment.mdx(#5030)
Corrected a minor grammatical error
2021-06-22 10:31:11 +02:00
Tomasz Papiernik
a865eb50b9
docs(v2): Add Buddy to deployment doc (#5027) 2021-06-21 18:15:01 +02:00
Teik Jun
c96c3b5c39
docs(v2): fix incorrect anchor links in website (#5021)
* docs: fix anchor links for docusaurus write-translations

* docs: fix anchor links for docusaurus serve
2021-06-20 22:16:17 +03:00
Sébastien Lorber
c63295a253
docs(v2): wrap mdx usage in mdx-code-block (#5007) 2021-06-18 17:59:51 +02:00
Sébastien Lorber
59f78f9084
docs(v2): document canary releases (#4987) 2021-06-16 16:11:41 +02:00
Sébastien Lorber
32e76f1cc0
feat(v2): add docs pagination_label frontmatter (#4982)
* feat(v2): add docs pagination_label frontmatter

* feat(v2): add docs pagination_label frontmatter

* feat(v2): add docs pagination_label frontmatter
2021-06-16 12:03:46 +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
Sébastien Lorber
9efa550cd5
docs(v2): mention to install the algolia package in search doc (#4976) 2021-06-15 16:14:03 +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
Sébastien Lorber
737f80a026
fix(v2): sidebar_label should be used to compute next/previous button labels (#4970)
* sidebar_label should be used to compute next/previous button texts, as documented.

* improve docs frontmatter doc

* use a little bit of destructuring
2021-06-15 12:04:29 +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
silva-nick
aebfc45627
docs(v2): fix typo in code block on Using plugins page (#4910) 2021-06-05 17:24:45 +03:00
Sébastien Lorber
57806798c5
fix(v2): fix contentTitle issues when markdown h1 title contains code blocks (#4882)
* attempt to fix contentTitle issues when markdown h1 title contains inline code blocks

* mention hide_title frontmatter only prevents frontmatter.title from being added in the dom (not a markdown # title in content)

* alwayss insert MainHeading under the div.markdown container for consistency

* ensure MainHeading has no useless id

* revert https://github.com/facebook/docusaurus/pull/4859 as it's now useless: docMeta.title contains the text/frontmatter title in priority over the contentTitle

* fix docs test after revert

* improve markdownParser and fix tests

* fix docs tests

* markdownParser: restore option to remove contentTitle (mostly for blog plugin)

* use removeContentTitle for blog
2021-06-03 17:45:19 +02:00
phwt.smwt
0587d6d6e7
Fix incorrect link to plugin-ideal-image (#4896) 2021-06-03 12:20:59 +02:00
silva-nick
5e696a03bc
docs(v2): presets: fix typo in bootstrap preset (#4893) 2021-06-03 11:14:40 +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
Sébastien Lorber
57a0a69137
docs(v2): v2 migration guide: mention Algolia config update (#4885) 2021-06-02 12:02:57 +02:00
Fardeen Panjwani
62caaeddbb
docs(v2): update steps in the github-actions section (#4876)
* docs: update steps in the github-actions section

* refactor: format warning

* Update website/docs/deployment.mdx

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2021-06-01 18:05:26 +02:00
Jonathan Mazin
60e2de6c04
docs(v2): grammar typo in migration-overview.md (#4880)
Small grammatical change
2021-06-01 17:50:45 +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
Pedro Queiroz
4db8ded2f2
docs(v2): fix missing closing bracket (#4837)
* fix: missing closing bracket

* fix: missing closing bracket
2021-05-24 12:37:30 +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