diff --git a/src/routes/docs/tutorials/nuxt/step-2/+page.markdoc b/src/routes/docs/tutorials/nuxt/step-2/+page.markdoc index 83d04a1964..dbdb37a30f 100644 --- a/src/routes/docs/tutorials/nuxt/step-2/+page.markdoc +++ b/src/routes/docs/tutorials/nuxt/step-2/+page.markdoc @@ -27,7 +27,7 @@ Open the file `nuxt.config.ts`and add links to the stylesheets from the `appwrit The design system is then ready to be used in all pages and components with auto-import, meaning that you don't have to add import statements to the scripts. ```ts -[nuxt.config.ts] +// [nuxt.config.ts] export default defineNuxtConfig({ app: { @@ -55,23 +55,27 @@ npm run dev Nuxt relies on an opiniated directory structure to automate tasks and help organize the codebase. To take advantage of this we need to add the following directories: -- components -- composables -- layouts -- pages +- `/components/` to keep our UI components in one place. + We will get back to it in [step 5](/docs/tutorials/nuxt/step-5) +- `/composables/`for storing files handling global states and data fetching. + We will use it in [step 4](/docs/tutorials/nuxt/step-5) +- `/layouts/` to store the page layouts +- `/pages/` for the content pages. -Create the `components` directory for our components. -We will come back to it in step 5 when adding navigation. +Run the following command to create these folders -Add the `composables/` directory and leave it empty for now, too. -We will use it in step 4 to handle the global states and data fetching for the user authentication. +```sh +mkdir components composables layouts pages +``` -Next, create the `layouts/` directory and add the file `default.vue`. +# Add layout {% #add-layout %} + +Go to the `layouts/` directory and add the file `default.vue`. Add the following code for the default layout. As you see it's nearly empty but it is needed for the automatic routing to work properly. ```vue -[src/layouts/default.vue] +// [layouts/default.vue]