I've decided to open-source my latest portfolio website! it has dynamic content management to add projects and posts using Contentful CMS, and was built using Next.js and Chakra UI.
Refer to Next.js and Chakra UI documentation to learn more.
Feel free to fork this repository to make your own portfolio, and if you liked the repo, kindly support it by giving it a star ā!
Create an .env.local
and follow the variable name based on .env.example
and get the API Keys based on the steps below
1. Create a Contentful account
2. Add a Community Space (It's free!)
3. Choose "I create content"
4. Go to content model and start to add content type
> š In this portfolio website, it has 5 Content type which is:
> > ~~1. BlogPosts~~
> > After the [ā”2.0.0 update](https://github.com/abdulrcs/abdulrahman.id/pull/17), I use Github Issues as blog content!
> > More details about this on: https://abdulrahman.id/blog/unleash-your-dev-blog-write-more-with-github-issues-as-your-cms
> 2. FeaturedProjects
> 3. Projects
> 4. Introduction
> 5. ContactMe
>
> You must add this exact name since it's the ID that's used in the code.
5. Add the content type according to these fields:
![](https://i.imgur.com/OD1oWG2.png)
![](https://i.imgur.com/nIkloDk.png)
![](https://user-images.githubusercontent.com/54136956/166127110-7baaef65-87b1-4f89-bbf5-eae3207f9ba6.png)
![image](https://user-images.githubusercontent.com/54136956/166127116-66f51c82-8944-4cf6-9ecf-cdcc6e2b10a2.png)
6. Go to settings -> API Keys -> Content Delivery / Preview tokens -> "Your space name"
copy the Space ID and Content Delivery API access token
7. Put it into the environment variables according to `.env.example` and you're all set!
1. Create a Firebase project
2. After setting things up you'll get the API keys, save those.
3. Go to Firestore Database
4. Add a collection named views
5. Then, put those API Keys before according to the .env.example
and that's it!
1. Create a Google Analytics account, in the property settings part, don't forget to turn on Universal Analytics
2. After that, you'll see a code starting with UA-
3. Copy those code and put it into environment variables according to env.example
and done!
Install the dependencies with npm i
or yarn
Start the project by npm run dev
or yarn dev
You can deploy easily by using Vercel š
pages/index.js
= Homepage
pages/projects/index.js
= Projects archive page
pages/blog/index.js
= Blog listings page
pages/blog/[slug].js
= Blog post page
pages/api/views
= API to fetch blog post views from Firebase