
Build a personal blog with Nuxt 3 and Nuxt Content 2 - Part 1
26 November, 2022
2
2
0
Contributors
Introduction to Nuxt
Installing and Running our first Nuxt app
You can start the development server by using following command inside the project folder. You can quit you dev server using the ctrl+c
keys.
welcome page of nuxt app
Exploring the initial project structure
initial folder structure of nuxt app
•
•
•
•
•
Our first Nuxt page
Create a folder called pages
in the root directory of the project. We will create a file contact.vue
. You can add any number of pages insides the pages
directory. It looks something like this.
starting of contact page
not found page of nuxt
When you visit the /contact
page you will be redirect to the initial welcome page. This is due to the by default nuxt only renders the content inside the app.vue
file. Let's tell the nuxt that we are building pages. Open you app.vue
file and add the single line which tells nuxt to render the pages.
Even if you add the above code, you will still get not found page. But when you visit the /contact
page, you will see the contact page rendered. But problem with not found is we do not have any home page in our site. So, we need to add a special file called index.vue
inside the pages
folder. The name should be exactly index.vue
. We will end up with following folder structure.
basic pages folder structure
Closing
vue
nuxt
develevate