diff --git a/docs/content/2.getting-started.md b/docs/content/2.getting-started.md index 64d6c9e7..a3bfab93 100644 --- a/docs/content/2.getting-started.md +++ b/docs/content/2.getting-started.md @@ -1,6 +1,6 @@ --- title: Getting started -description: '' +description: 'Download & install Ionic and setup Capacitor for usage' --- ## Installation @@ -96,6 +96,11 @@ export default defineNuxtConfig({ Default: `true` Disable to configure Ionic Router yourself. +- **icons** + + Default: `true` + Disable to stop icons from being auto-imported. + ### `css` - **core** diff --git a/docs/content/3.usage.md b/docs/content/3.features.md similarity index 64% rename from docs/content/3.usage.md rename to docs/content/3.features.md index f72e26ec..fadc6c33 100644 --- a/docs/content/3.usage.md +++ b/docs/content/3.features.md @@ -1,11 +1,11 @@ --- -title: Usage -description: '' +title: Features +description: 'All the features this module offers for building apps with Ionic at great speed' --- ## Page routing -Out of the box, you can start building your Ionic application by creating routes within `~/pages` directory. To access the router, you should use `useIonRouter()` rather than an import from `vue-router`. +Out of the box, you can start building your Ionic application by creating routes within `~/pages` directory. To access the router, you should use `useIonRouter()` rather than `useRouter()` (which is auto-imported from `vue-router`). Nuxt utilities like `definePageMeta` will continue to work, but you should avoid using `` or ``. @@ -30,6 +30,34 @@ All Ionic Vue components should be auto-imported throughout your app. (If you fi For more on how component imports work, see the [Nuxt documentation](https://v3.nuxtjs.org/guide/directory-structure/components#components-directory). +## Icons + +Icons are auto-imported from `ionicons/icons` by default, following the pattern of camel case naming with `ionicons` in front of the original icon name from the [official icons website](https://ionic.io/ionicons). + +For example, instead of this + +```vue [component.vue] + + + +``` + +You would write this + +```vue [component.vue] + +``` + +You can opt-out of auto-importing by setting `integrations.icons` module options in your `nuxt.config.ts` to `false`. + ## Helper functions Nuxt provides a number of Ionic hooks/composables via auto-imports within your app: diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 05f6a2cd..e847d8b2 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -4,6 +4,7 @@ export default defineNuxtConfig({ modules: ['nuxt-ionic'], ionic: { // integrations: { + // icons: true, // meta: true, // pwa: true, // router: true, diff --git a/playground/pages/tabs.vue b/playground/pages/tabs.vue index d846e307..fbf4d6dd 100644 --- a/playground/pages/tabs.vue +++ b/playground/pages/tabs.vue @@ -1,5 +1,4 @@