Skip to main content

Command Palette

Search for a command to run...

Setting Up and Running the Headless Hashnode Starter Kit Locally

A Step-by-Step Guide to Setting Up and Running the Headless Hashnode Starter Kit on Your Local Machine

Published
2 min read
Setting Up and Running the Headless Hashnode Starter Kit Locally
V

I am a software developer who loves to share his experience and provide helpful insights to my fellow devs.

Introduction

To fully customize the starter kit, you'll need to have a local version running on your system. In this article, I'll guide you through the process of setting it up.

Step 1

Go to the Headless Hashnode Starter kit repository on GitHub. You can find it here: GitHub Repository. Fork the repository, then clone or download it to your system.

Step 2

Open your terminal and navigate to the directory where you downloaded the starter kit. In my case, I used the default terminal that comes with Visual Studio Code.

Step 3

Go to the starter kit README file on GitHub, and scroll down to the "Running locally" section. Follow the instructions outlined there.

On your terminal, navigate to one of the themes provided in the starter kit, either the Personal or Enterprise theme. Regardless of your choice, the instructions remain the same. For this guide, I'll use the Enterprise theme as an example:

cd packages/blog-starter-kit/themes/enterprise

Make sure you're in the root directory of the starter kit before executing the code above

Step 4

Inside your Enterprise directory, create a file named .env.local and copy the content of .env.example into the newly created file.

If you are using the Personal theme, perform the same steps within the Personal Directory.

Step 5

Run the following command in your terminal:

pnpm install
💡
If you are running on Windows and encounter an error when running pnpm in PowerShell, use a different terminal that supports pnpm, such as Git Bash.

The installation process may take some time, so sit back and relax.

Step 6

After the installation is complete, run the following command to start the localhost:

pnpm dev

Visit localhost:3000

💡
In the .env.local file, to display a specific blog on your website, edit the value of NEXT_PUBLIC_HASHNODE_PUBLICATION_HOST to match the URL of the Hashnode blog you want to display.

Conclusion

Thank you for reading. If you have any questions, please leave a comment. If you prefer a video version of this guide, you can watch it here. https://www.youtube.com/watch?v=37o4iVGsfHc&t=2s

Happy Coding!

Headless Hashnode

Part 1 of 2

In this series, I will share insights on how to use Headless Hashnode effectively for your blog.

Up next

Deploy a headless blog on Vercel using Headless Hashnode

A simple and easy step to deploy a blog with Headless Hashnode starter kit