From 67c333eb8830eb4c8ee8b2a811c5dd23e5a8ffd7 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Sat, 14 Oct 2023 02:19:42 +0200 Subject: [PATCH] templates should use ESM --- .../shared/docs/tutorial-basics/create-a-document.md | 2 +- .../shared/docs/tutorial-extras/manage-docs-versions.md | 2 +- .../shared/docs/tutorial-extras/translate-your-site.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-docusaurus/templates/shared/docs/tutorial-basics/create-a-document.md b/packages/create-docusaurus/templates/shared/docs/tutorial-basics/create-a-document.md index ffddfa8eb8ac..c22fe2944687 100644 --- a/packages/create-docusaurus/templates/shared/docs/tutorial-basics/create-a-document.md +++ b/packages/create-docusaurus/templates/shared/docs/tutorial-basics/create-a-document.md @@ -42,7 +42,7 @@ This is my **first Docusaurus document**! It is also possible to create your sidebar explicitly in `sidebars.js`: ```js title="sidebars.js" -module.exports = { +export default { tutorialSidebar: [ 'intro', // highlight-next-line diff --git a/packages/create-docusaurus/templates/shared/docs/tutorial-extras/manage-docs-versions.md b/packages/create-docusaurus/templates/shared/docs/tutorial-extras/manage-docs-versions.md index e12c3f3444fa..ccda0b9076bf 100644 --- a/packages/create-docusaurus/templates/shared/docs/tutorial-extras/manage-docs-versions.md +++ b/packages/create-docusaurus/templates/shared/docs/tutorial-extras/manage-docs-versions.md @@ -28,7 +28,7 @@ To navigate seamlessly across versions, add a version dropdown. Modify the `docusaurus.config.js` file: ```js title="docusaurus.config.js" -module.exports = { +export default { themeConfig: { navbar: { items: [ diff --git a/packages/create-docusaurus/templates/shared/docs/tutorial-extras/translate-your-site.md b/packages/create-docusaurus/templates/shared/docs/tutorial-extras/translate-your-site.md index 4294a27a5cf6..b5a644abdf96 100644 --- a/packages/create-docusaurus/templates/shared/docs/tutorial-extras/translate-your-site.md +++ b/packages/create-docusaurus/templates/shared/docs/tutorial-extras/translate-your-site.md @@ -11,7 +11,7 @@ Let's translate `docs/intro.md` to French. Modify `docusaurus.config.js` to add support for the `fr` locale: ```js title="docusaurus.config.js" -module.exports = { +export default { i18n: { defaultLocale: 'en', locales: ['en', 'fr'], @@ -54,7 +54,7 @@ To navigate seamlessly across languages, add a locale dropdown. Modify the `docusaurus.config.js` file: ```js title="docusaurus.config.js" -module.exports = { +export default { themeConfig: { navbar: { items: [