How Do You Make a Blog Using Next JS?

In this article, we will be looking at how to make a blog using NextJS. We will be using the next-js-blog-starter kit which comes with a pre-built blog.

This kit is designed to help you easily create a blog with NextJS.

To get started, first install the next-js-blog-starter kit by running the following command in your terminal:

npm install next-js-blog-starter

Next, open up your project in Next and add the next-js-blog-starter module to your app. After that, create a new file called index.html and add the following code to it:

NextJS Blog – Using the NextJS Blog Starter

.

Finally, we need to generate our blog’s front end using Next’s generate command:

generate bootstrap

After running this command, you will find a new directory called public in your project’s root directory. This is where you will find all of your generated files: index.html , style.css , template_components/accounts/_accounts_listing_template .blade .html , and template_components/accounts/_accounts_detail_template .

blade .html . You can open up these files and see how Next has generated for you both the front end and the back end code for a blog! To finish off this tutorial, we will now add some content to our blog and see how Next renders it onscreen! First, open up index.html and add the following code into it:

Hello world

Then, create an article named “My First Article” and add it into your blog by running the following command: generate post myfirstarticle Now open up My First Article in your browser and you should see that Next has rendered it onscreen! You can also see that Next has created a link to this article in the sidebar of your blog as well as a link to its source code on GitHub! Conclusion In this article, we have seen how to use NextJS to create a simple blog using the next-js-blog-starter kit. Next has provided us with both the front end code and back end code needed to build our blog, so there was no need for us to write any of our own code! We have also seen how Next renders our content onscreen so that we can easily check its quality before publishing it online!.

Related Posts