diff --git a/docs/components/content/Logo.vue b/docs/components/content/Logo.vue index 4cc29b09a..5db140ef6 100644 --- a/docs/components/content/Logo.vue +++ b/docs/components/content/Logo.vue @@ -1,56 +1,33 @@ + + diff --git a/docs/content/1.getting-started/1.setup.md b/docs/content/1.getting-started/1.setup.md index 525b0c39f..7fa560b9b 100644 --- a/docs/content/1.getting-started/1.setup.md +++ b/docs/content/1.getting-started/1.setup.md @@ -1,6 +1,4 @@ ---- -title: Setup ---- +# Setup ::alert{type="warning"} ❗IMPORTANT diff --git a/docs/content/1.getting-started/2.basic-usage.md b/docs/content/1.getting-started/2.basic-usage.md index 802d0d04d..48f22d857 100644 --- a/docs/content/1.getting-started/2.basic-usage.md +++ b/docs/content/1.getting-started/2.basic-usage.md @@ -1,6 +1,7 @@ ---- -title: Basic Usage -description: 'The basic to get started with @nuxtjs/i18n is to translate with Vue I18n via the `vueI18n` option' +# Basic Usage + +The basic to get started with @nuxtjs/i18n is to translate with Vue I18n via the `vueI18n` option. + --- ## Translate with Vue I18n diff --git a/docs/content/1.index.md b/docs/content/1.index.md index d76b0d973..210651cdc 100755 --- a/docs/content/1.index.md +++ b/docs/content/1.index.md @@ -2,10 +2,11 @@ title: I18n for Nuxt developers description: I18n (Internationalization) for your Nuxt project powered by Vue I18n layout: page -page.fluid: true navigation: false --- +:ellipsis{right=0px width=75% blur=150px} + ::block-hero --- cta: diff --git a/docs/content/2.guide/1.routing-strategies.md b/docs/content/2.guide/1.routing-strategies.md index df2aabc21..0eed67739 100644 --- a/docs/content/2.guide/1.routing-strategies.md +++ b/docs/content/2.guide/1.routing-strategies.md @@ -1,7 +1,9 @@ +# Routing & Strategies + +@nuxtjs/i18n overrides Nuxt default routes to add locale prefixes to every URL with routing strategies. + --- -title: Routing & Strategies -description: '@nuxtjs/i18n overrides Nuxt default routes to add locale prefixes to every URL with routing strategies' ---- + ## Routing @@ -11,7 +13,7 @@ Say your app supports two languages: French and English as the default language, ```asciidoc └── pages ├── about - │   └── index.vue + │ └── index.vue └── index.vue ``` diff --git a/docs/content/2.guide/10.different-domains.md b/docs/content/2.guide/10.different-domains.md index 555518cf4..897673755 100644 --- a/docs/content/2.guide/10.different-domains.md +++ b/docs/content/2.guide/10.different-domains.md @@ -1,9 +1,10 @@ ---- -title: Different domains -description: 'You might want to use a different domain name for each language your app supports. To achieve this:' +# Different domains + +You might want to use a different domain name for each language your app supports. + --- -You might want to use a different domain name for each language your app supports. To achieve this: +Here is how to achieve this: - Set `differentDomains` option to `true` - Configure the `locales` option as an array of objects, where each object has a `domain` key whose value is the domain name you'd like to use for that locale. Optionally include a port (if non-standard) and/or a protocol. If the protocol is not provided then an attempt will be made to auto-detect it but that might not work correctly in some cases like when the pages are statically generated. diff --git a/docs/content/2.guide/11.locale-fallback.md b/docs/content/2.guide/11.locale-fallback.md index fc3d8a796..61afaf188 100644 --- a/docs/content/2.guide/11.locale-fallback.md +++ b/docs/content/2.guide/11.locale-fallback.md @@ -1,6 +1,7 @@ ---- -title: Locale fallback -description: 'How a fallback gets selected when a translation is missing' +# Locale fallback + +How a fallback gets selected when a translation is missing. + --- **@nuxtjs/i18n** takes advantage of **Vue I18n** ability to handle localization fallback. It is possible to define a single fallback locale, an array of locales, diff --git a/docs/content/2.guide/12.per-component-translations.md b/docs/content/2.guide/12.per-component-translations.md index 6fca80bf6..7fa80f716 100644 --- a/docs/content/2.guide/12.per-component-translations.md +++ b/docs/content/2.guide/12.per-component-translations.md @@ -1,6 +1,7 @@ ---- -title: Per-component translations -description: 'enable vue-i18n-loader' +# Per-component translations + +Enable vue-i18n-loader. + --- If you'd like to define translations per-page or per-component you can take advantage with i18n custom block. diff --git a/docs/content/2.guide/13.extend-messages.md b/docs/content/2.guide/13.extend-messages.md index 64781b910..59ade0b18 100644 --- a/docs/content/2.guide/13.extend-messages.md +++ b/docs/content/2.guide/13.extend-messages.md @@ -1,6 +1,7 @@ ---- -title: Extending messages hook -description: "Nuxt hook to extend app's messages" +# Extending messages hook + +Nuxt hook to extend app's messages. + --- If you're a **module author** and want that module to provide extra messages for your project, you can merge them into the normally loaded messages by using the `i18n:extend-messages` hook. diff --git a/docs/content/2.guide/14.migrating.md b/docs/content/2.guide/14.migrating.md index 62ea8d1e2..95c7523e7 100644 --- a/docs/content/2.guide/14.migrating.md +++ b/docs/content/2.guide/14.migrating.md @@ -1,10 +1,9 @@ ---- -title: Migration guide -description: Follow this guide to upgrade from one major version to the other. ---- +# Migration guide Follow this guide to upgrade from one major version to the other. +--- + ## Upgrading from `nuxtjs/i18n` v7.x ### Change the route key rules in `pages` option diff --git a/docs/content/2.guide/2.callbacks.md b/docs/content/2.guide/2.callbacks.md index e3163b1fd..a43b98940 100644 --- a/docs/content/2.guide/2.callbacks.md +++ b/docs/content/2.guide/2.callbacks.md @@ -1,6 +1,7 @@ ---- -title: Callbacks -description: "@nuxtjs/i18n exposes some callbacks that you can use to perform specific tasks that depend on the app's language." +# Callbacks + +@nuxtjs/i18n exposes some callbacks that you can use to perform specific tasks that depend on the app's language. + --- **@nuxtjs/i18n** exposes some callbacks that you can use to perform specific tasks that depend on the app's language. diff --git a/docs/content/2.guide/4.custom-paths.md b/docs/content/2.guide/4.custom-paths.md index e2a306343..0ad6145eb 100644 --- a/docs/content/2.guide/4.custom-paths.md +++ b/docs/content/2.guide/4.custom-paths.md @@ -1,6 +1,7 @@ ---- -title: Custom route paths -description: 'Customize the names of the paths for specific locale.' +# Custom route paths + +Customize the names of the paths for specific locale. + --- In some cases, you might want to translate URLs in addition to having them prefixed with the locale code. There are 2 ways of configuring custom paths for your [Module configuration](#nodule-configuration) or your pages [Page component](#page-component). diff --git a/docs/content/2.guide/5.ignoring-localized-routes.md b/docs/content/2.guide/5.ignoring-localized-routes.md index c630de1da..825418c65 100644 --- a/docs/content/2.guide/5.ignoring-localized-routes.md +++ b/docs/content/2.guide/5.ignoring-localized-routes.md @@ -1,6 +1,7 @@ ---- -title: Ignoring localized routes -description: 'Customize localized route exlusions per page component.' +# Ignoring localized routes + +Customize localized route exlusions per page component. + --- ::alert{type="warning"} diff --git a/docs/content/2.guide/6.browser-language-detection.md b/docs/content/2.guide/6.browser-language-detection.md index a7ba58306..ecaf83986 100644 --- a/docs/content/2.guide/6.browser-language-detection.md +++ b/docs/content/2.guide/6.browser-language-detection.md @@ -1,9 +1,8 @@ ---- -title: Browser language detection -description: "By default, @nuxtjs/i18n attempts to redirect users to their preferred language by detecting their browser's language. This is controlled by the `detectBrowserLanguage` option:" ---- +# Browser language detection -By default, **@nuxtjs/i18n** attempts to redirect users to their preferred language by detecting their browser's language. This is controlled by the `detectBrowserLanguage` option: +By default, @nuxtjs/i18n attempts to redirect users to their preferred language by detecting their browser's language. This is controlled by the `detectBrowserLanguage` option. + +--- ```js {}[nuxt.config.js] export default defineNuxtConfig({ diff --git a/docs/content/2.guide/7.seo.md b/docs/content/2.guide/7.seo.md index 9e8a66aa7..1fb794592 100644 --- a/docs/content/2.guide/7.seo.md +++ b/docs/content/2.guide/7.seo.md @@ -1,6 +1,7 @@ ---- -title: SEO -description: "When the `useLocaleHead` is called, @nuxtjs/i18n attempts to add some metadata to improve your pages SEO. Here's what it does" +# SEO + +When the `useLocaleHead` is called, @nuxtjs/i18n attempts to add some metadata to improve your pages SEO. Here's what it does. + --- ## Introduction diff --git a/docs/content/2.guide/8.lazy-load-translations.md b/docs/content/2.guide/8.lazy-load-translations.md index ba50a4f48..80b9571cb 100755 --- a/docs/content/2.guide/8.lazy-load-translations.md +++ b/docs/content/2.guide/8.lazy-load-translations.md @@ -1,6 +1,7 @@ ---- -title: Lazy-load translations -description: 'Lazy-load translations' +# Lazy-load translations + +How to lazy-load translations. + --- For apps that contain a lot of translated content, it is preferable not to bundle all the messages in the main bundle but rather lazy-load only the language that the users selected. diff --git a/docs/content/2.guide/9.lang-switcher.md b/docs/content/2.guide/9.lang-switcher.md index da115d052..8a0576093 100644 --- a/docs/content/2.guide/9.lang-switcher.md +++ b/docs/content/2.guide/9.lang-switcher.md @@ -1,10 +1,9 @@ ---- -title: Lang Switcher -description: 'When @nuxtjs/i18n loads in your app, it adds your `locales` configuration to `nuxtApp.$i18n` (or `this.$i18n`), which makes it really easy to display a lang switcher anywhere in your app.' ---- +# Lang Switcher When **@nuxtjs/i18n** loads in your app, it adds your `locales` configuration to `nuxtApp.$i18n` (or `this.$i18n`), which makes it really easy to display a lang switcher anywhere in your app. +--- + Here's an example lang switcher where a `name` key has been added to each locale object in order to display friendlier titles for each link: ```vue diff --git a/docs/content/3.options/1.vue-i18n.md b/docs/content/3.options/1.vue-i18n.md index 9f5d6d444..b072506e2 100644 --- a/docs/content/3.options/1.vue-i18n.md +++ b/docs/content/3.options/1.vue-i18n.md @@ -1,6 +1,7 @@ ---- -title: Vue I18n -description: 'Related Vue I18n options' +# Vue I18n + +Related Vue I18n options. + --- ## `vueI18n` diff --git a/docs/content/3.options/2.routing.md b/docs/content/3.options/2.routing.md index 087dd9ac4..5412ab6c5 100644 --- a/docs/content/3.options/2.routing.md +++ b/docs/content/3.options/2.routing.md @@ -1,6 +1,7 @@ ---- -title: Routing -description: Routing and Strategies options +# Routing + +Routing and Strategies options. + --- ## `baseUrl` @@ -241,4 +242,4 @@ definPageMeta({ ``` -See more information in [Dynamic route parameters](/guide/lang-switcher#dynamic-route-parameters) \ No newline at end of file +See more information in [Dynamic route parameters](/guide/lang-switcher#dynamic-route-parameters) diff --git a/docs/content/3.options/3.lazy.md b/docs/content/3.options/3.lazy.md index 1b241db9a..0f059d98d 100644 --- a/docs/content/3.options/3.lazy.md +++ b/docs/content/3.options/3.lazy.md @@ -1,6 +1,7 @@ ---- -title: Lazy loading -description: Lazy loading options +# Lazy loading + +Lazy loading options. + --- ## `lazy` diff --git a/docs/content/3.options/4.browser.md b/docs/content/3.options/4.browser.md index 078c43ba5..c89ea42c7 100644 --- a/docs/content/3.options/4.browser.md +++ b/docs/content/3.options/4.browser.md @@ -1,6 +1,7 @@ ---- -title: Browser -description: Browser locale management options +# Browser + +Browser locale management options. + --- ## `detectBrowserLanguage` diff --git a/docs/content/3.options/5.domain.md b/docs/content/3.options/5.domain.md index a3798b3cd..bac4f2474 100644 --- a/docs/content/3.options/5.domain.md +++ b/docs/content/3.options/5.domain.md @@ -1,6 +1,7 @@ ---- -title: Domain -description: Related domain options +# Domain + +Related domain options. + --- ## `differentDomains` diff --git a/docs/content/3.options/6.misc.md b/docs/content/3.options/6.misc.md index cfefe480d..a337416ca 100644 --- a/docs/content/3.options/6.misc.md +++ b/docs/content/3.options/6.misc.md @@ -1,6 +1,7 @@ ---- -title: Misc -description: Miscellaneous options +# Misc + +Miscellaneous options. + --- ## `types` diff --git a/docs/content/4.API/1.compoables.md b/docs/content/4.API/1.composables.md similarity index 71% rename from docs/content/4.API/1.compoables.md rename to docs/content/4.API/1.composables.md index 238d93f01..b20337c70 100644 --- a/docs/content/4.API/1.compoables.md +++ b/docs/content/4.API/1.composables.md @@ -1,7 +1,6 @@ ---- -title: Composables -description: 'Composition API for `@nuxtjs/i18n`' ---- +# Composables + +Composition API for `@nuxtjs/i18n`. ## useLocalePath() @@ -28,4 +27,4 @@ description: 'Composition API for `@nuxtjs/i18n`' // TODO: ## useCookieLocale -// TODO: \ No newline at end of file +// TODO: diff --git a/docs/content/4.API/2.compiler-macros.md b/docs/content/4.API/2.compiler-macros.md index 9eb7f054b..524991638 100644 --- a/docs/content/4.API/2.compiler-macros.md +++ b/docs/content/4.API/2.compiler-macros.md @@ -1,6 +1,7 @@ ---- -title: Compiler Macros -description: 'Compiler Macros for `@nuxtjs/i18n`' +# Compiler Macros + +Compiler Macros for `@nuxtjs/i18n`. + --- ## `defineI18nRoute` diff --git a/docs/content/4.API/3.vue-i18n.md b/docs/content/4.API/3.vue-i18n.md index b9e35ea12..35a322d53 100644 --- a/docs/content/4.API/3.vue-i18n.md +++ b/docs/content/4.API/3.vue-i18n.md @@ -3,6 +3,12 @@ title: Vue I18n description: Extension of Vue I18n --- +# Vue I18n + +Extension of Vue I18n. + +--- + ::alert{type="info"} Instance of [Composer (for Composition API)](https://vue-i18n.intlify.dev/api/composition.html#composer) or [VueI18n (for Legacy API)](https://vue-i18n.intlify.dev/api/legacy.html#vuei18n) is exposed as `$i18n` on Vue instance. :: diff --git a/docs/content/4.API/4.vue.md b/docs/content/4.API/4.vue.md index ec795fd82..f427813f9 100644 --- a/docs/content/4.API/4.vue.md +++ b/docs/content/4.API/4.vue.md @@ -1,6 +1,7 @@ ---- -title: Vue -description: Extension of Vue +# Vue + +Extension of Vue. + --- ## Extension of Vue diff --git a/docs/content/4.API/5.nuxt.md b/docs/content/4.API/5.nuxt.md index f6a3ddc6f..8d3e89f03 100644 --- a/docs/content/4.API/5.nuxt.md +++ b/docs/content/4.API/5.nuxt.md @@ -1,6 +1,7 @@ ---- -title: Nuxt -description: Other APIs +# Nuxt + +Other APIs + --- ## Extension of Nuxt runtime app context @@ -72,4 +73,4 @@ export default defineNuxtModule({ } ``` -See also [Extending messages hook](/guide/extend-messages) \ No newline at end of file +See also [Extending messages hook](/guide/extend-messages) diff --git a/docs/content/changelog.md b/docs/content/changelog.md index 46c62fdca..849461575 100644 --- a/docs/content/changelog.md +++ b/docs/content/changelog.md @@ -1,9 +1,17 @@ --- layout: docs toc: false -title: Changelog -description: Discover the latest updates. +navigation: false --- -::releases -:: \ No newline at end of file +# Changelog + +Discover the latest updates. + +--- + +::alert{type="warning"} +This page is work in progress. + +[Visit this page](https://github.com/nuxt-modules/i18n/releases). +:: diff --git a/docs/package.json b/docs/package.json index 4be7f7f0b..73d9de92d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,8 +8,7 @@ "preview": "nuxi preview" }, "devDependencies": { - "@nuxt-themes/docus": "npm:@nuxt-themes/docus-edge@latest", - "nuxt": "^3.0.0", - "@nuxtjs/tailwindcss": "latest" + "@nuxt-themes/docus": "^1.1.3", + "nuxt": "^3.0.0" } } diff --git a/docs/tokens.config.ts b/docs/tokens.config.ts index f5c2e286f..2696d2ab2 100644 --- a/docs/tokens.config.ts +++ b/docs/tokens.config.ts @@ -1,10 +1,9 @@ -import { defineTheme, pallete } from 'pinceau' +import { defineTheme } from 'pinceau' // TODO: We need to dig a little deeper pinceau export default defineTheme({ - colors: { - // primary: pallete('#d6ffee') + color: { primary: { 50: { value: '#ecfdf5' }, 100: { value: '#d1fae5' }, @@ -17,31 +16,5 @@ export default defineTheme({ 800: { value: '#065f46' }, 900: { value: '#064e3b' } } - }, - fonts: { - primary: { - value: 'Inter, sans-serif' - }, - code: { - value: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace' - } - }, - page: { - height: { - value: 'calc(100vh - calc(calc({header.height} + {footer.height})))' - }, - maxWidth: { - value: '90rem' - } - }, - header: { - height: { - value: '4rem' - } - }, - footer: { - height: { - value: '4rem' - } } })