Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to create a blog in nuxt.js?


Asked by Kareem Carpenter on Dec 08, 2021 FAQ



Using the $content method, which is made available by the content module, we perform a query to fetch all posts inside the posts directory and sort them by their created date in descending order. Then inside the template, we loop through the posts and display the title and description of each of them with a link to view a particular post.
Furthermore,
Let's see some of Nuxt.js features which makes it a great framework: Easy to create universal applications Pre-rendered pages Great project structure Easy page routing Lot of useful modules Good documentation Growing Community Nuxt JS makes the development of Vue apps a much easier.
Indeed, First, install @nuxtjs/sitemap and add it to the nuxt.config.js file. Next, you need to add the sitemap configuration object in your nuxt.config.js file. In it, you'll need to add your hostname (site URL) and a routes property, which lists all the dynamic routes.
And,
To get started quickly you can use the create-nuxt-app. Make sure you have npx installed (npx is shipped by default since npm 5.2.0) or npm v6.1 or yarn. yarn create nuxt-app <project-name> It will ask you some questions (name, Nuxt options, UI framework, TypeScript, linter, testing framework, etc).
Just so,
Creating a Nuxt.js project from scratch only requires one file and one directory. We will use the terminal to create the directories and files, feel free to create them using your editor of choice. Create an empty directory with the name of your project and navigate into it: Replace <project-name> with the name of your project.