Replace blog post markdown files from posts to contents

This commit is contained in:
Sat Naing
2022-09-11 01:51:54 +06:30
parent 463022acc9
commit b4089f2d1d
7 changed files with 211 additions and 20 deletions
-99
View File
@@ -1,99 +0,0 @@
---
title: How Do I Develop My Portfolio Website & Blog
author: Sat Naing
datetime: 2022-03-25T16:55:12.000+00:00
slug: how-do-i-develop-my-portfolio-and-blog
featured: true
tags:
- NextJS
- TailwindCSS
- HeadlessCMS
- Blog
description:
My experience about developing my first portfolio website and a blog
using NextJS and a headless CMS.
---
My experience about developing my first portfolio website and a blog using NextJS and a headless CMS.
## Motivation
I've been always thinking about launching my own website with my custom domain name (**satnaing.dev**) since my college student life. But that never happened until this project. I've done several projects and works about web application development but I didn't make an effort to do this.
So, "what about blog?" you may ask. Yeah, blog also has been in my project list for some time. I always wanted to make a blog project using some of the latest technologies. However, I've been busy with my works and other projects so that blog project has never been started.
In these days, I tend to develop my own projects with the focus in good quality rather than quantity. After the project is done, I usually put a proper readme file in the Github repo. But Github repo readme is only suitable for technical aspects (this is just my thought). I want to write down my experiences and challenges. Thus, I decided to make my own blog. Plus, at this point, I have decent experiences and confidence to develop this project.
## Tech Stack
For the front-end, I wanted to use [React](https://reactjs.org/ "React Official Website"). But React alone is not good enough for SEO; and I did have to consider many factors like routing, image optimization etc. So, I chose [NextJS](https://nextjs.org/ "NextJS Official Website") as my main front-end stack. And of course TypeScript for type checking. (It's said that you'll love TypeScript when you're used to it 😉)
For styling, I use [TailwindCSS](https://tailwindcss.com/ "Tailwind CSS Official Website"). This is because I love developer experience that Tailwind gives and it has a lot of flexibilities compared to other component UI libraries like MUI or React Bootstrap.
All contents of this project reside within the GitHub repository. All my blog posts (including this one) are written in Markdown file format since I'm very used to with this. But to write Markdown along with its frontmatter effortlessly, I use [Forestry](https://forestry.io/ "Forestry Official Website") headless CMS. It is a git-based CMS that can serve Markdown and other contents. Because of this, I can write my contents either using Markdown or wysiwyg editor. Besides, writing frontmatters with this is a breeze.
Images and assets are uploaded and stored in [Cloudinary](https://cloudinary.com/ "Cloudinary Official Website"). I connect Cloudinary via Forestry and manage them directly in the dashboard.
In conclusion, these are the tech stack I've used for this project.
- Front-end: NextJS (TypeScript)
- Styling: TailwindCSS
- Animations: GSAP
- CMS: Forestry Headless CMS
- Deployment: Vercel
## Features
The following are certain features of my portfolio and blog
### SEO Friendly
The entire project is developed with SEO focus in mind. I've used proper meta tags, descriptions and heading alignments. This website is now indexed by Google.
> You can search this website on google by using keywords like 'sat naing dev'
![searching satnaing.dev on google](https://res.cloudinary.com/noezectz/image/upload/v1648231400/SatNaing/satnaing-on-google_asflq6.png "satnaing.dev is indexed")
Moreover, this website will be displayed well when shared to social media due to properly used meta tags.
![satnaing.dev card layout when shared to Facebook](https://res.cloudinary.com/noezectz/image/upload/v1653106955/SatNaing/satnaing-dev-share-on-facebook_1_zjoehx.png "Card layout when shared to Facebook")
### Dynamic Sitemap
Sitemap plays an important part in SEO. Because of this, every single page of this site should be included in sitemap.xml. I made an auto generated sitemap in my website whenever I create a new content or tags or categories.
### Light & Dark Themes
Due to dark theme trend in recent years, many websites include dark theme out of the box nowadays. Certainly, my website also supports light & dark themes.
### Fully Accessible
This website is fully accessible. You can navigate around by only using keyboard. I put all a11y enhancement best practices like including alt text in all images, no skipping headings, using semantic HTML tags, using aria-attributes properly.
### Search box, Categories & Tags
All blog contents can be searched by search box. Moreover, contents can be filtered by categories and tags. In this way, blog readers can search and read what they really want.
### Performance and Lighthouse Score
This website got very good performance and lighthouse score thanks to proper development and best practices. Here's the lighthouse score for this website.
![satnaing.dev Lighthouse score](https://user-images.githubusercontent.com/53733092/159957822-7082e459-11e9-4616-8f1e-49d0881f7cbb.png "satnaing.dev Lighthouse score")
### Animations
Initially I used [Framer Motion](https://www.framer.com/motion/ "Framer Motion") to add animations and micro interactions for this website. However, when I tried to use some complex animations and parallax effects, I found it inconvenient to integrate with Framer Motion (Maybe I'm not very good at and used to working with it). Hence, I decided to use [GSAP](https://greensock.com/ "GSAP Animation Library") for all of my animations. It is one of the most popular animation library and it is capable of doing complex and advanced animations. You can see animations and micro interactions on pretty much every page of this website.
![animations at satnaing.dev](https://res.cloudinary.com/noezectz/image/upload/v1653108324/SatNaing/ezgif.com-gif-maker_2_hehtlm.gif "satnaing.dev website")
## Outro
In conclusion, this project gives me a lot of experience and confidence about developing blog site (SSG). Now, I have gained knowledge of git-based CMS and how it interacts with NextJS. I've also learned about SEO, dynamic sitemap generation and indexing Google procedures. I will make better projects in the future. So, stay tuned! ✌🏻
And... last but not least, I would like to say 'thanks' to my friend [Swann Fevian Kyaw](https://www.facebook.com/bon.zai.3910 "Swann Fevian Kyaw's Facebook Account") (@[ToonHa](https://www.facebook.com/ToonHa-102639465752883 "ToonHa Facebook Page")) who has drawn a beautiful illustration for my hero section of the website.
**Project Links**
- Website: [https://satnaing.dev/](https://satnaing.dev/ "https://satnaing.dev/")
- Blog: [https://satnaing.dev/blog](https://satnaing.dev/blog "https://satnaing.dev/blog")
- Repo: [https://github.com/satnaing/my-portfolio](https://github.com/satnaing/my-portfolio "https://github.com/satnaing/my-portfolio")
-20
View File
@@ -1,20 +0,0 @@
---
title: My recent article 1
author: Sat Naing
datetime: 2022-7-25T16:55:12.000+00:00
slug: my-recent-1
featured: false
tags:
- TypeScript
- Astro
description:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel
fringilla est
---
My experience about developing my first portfolio website and a blog using NextJS and a headless CMS.
## Motivation
rec 1
-20
View File
@@ -1,20 +0,0 @@
---
title: My recent article 2
author: Sat Naing
datetime: 2022-8-30T10:12:12.000+00:00
slug: my-recent-2
featured: false
tags:
- TypeScript
- Astro
description:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel
fringilla est
---
My experience about developing my first portfolio website and a blog using NextJS and a headless CMS.
## Motivation
rec 1
-20
View File
@@ -1,20 +0,0 @@
---
title: My recent article 3
author: Sat Naing
datetime: 2022-8-1T12:45:12.000+00:00
slug: my-recent-3
featured: false
tags:
- TypeScript
- Astro
description:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel
fringilla est
---
My experience about developing my first portfolio website and a blog using NextJS and a headless CMS.
## Motivation
rec 1
-20
View File
@@ -1,20 +0,0 @@
---
title: My recent article 4
author: Sat Naing
datetime: 2022-9-10T16:55:12.000+00:00
slug: my-recent-4
featured: false
tags:
- TypeScript
- Astro
description:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel
fringilla est
---
My experience about developing my first portfolio website and a blog using NextJS and a headless CMS.
## Motivation
rec 1
-81
View File
@@ -1,81 +0,0 @@
---
title: How Do I Develop My Terminal Portfolio Website with React
author: Sat Naing
datetime: 2022-06-09T03:42:51Z
slug: how-do-i-develop-my-terminal-portfolio-website-with-react
featured: true
tags:
- JavaScript
- ReactJS
- ContextAPI
- Styled-Components
- TypeScript
description:
Developing a terminal-like website using ReactJS, TypeScript and Styled-Components.
Includes features like autocomplete, multiple themes, command hints etc.
---
Developing a terminal-like website using ReactJS, TypeScript and Styled-Components. Includes features like autocomplete, multiple themes, command hints etc.
## Intro
Recently, I've developed and published my portfolio + a blog. Im glad I got some good feedback for it. Today, I want to introduce my new terminal-like portfolio website. It is developed using ReactJS, TypeScript. I got this idea from CodePen and YouTube.
## Tech Stack
This project is a frontend project without any backend codes. The UI/UX part is designed in Figma. For the frontend user-interface, I chose React over pain JavaScript and NextJS. Why?
- Firstly, I want to write declarative code. Managing HTML DOM using JavaScript imperatively is really tedious.
- Secondly, because it is React!!! It is fast, and reliable.
- Lastly, I dont need much of the SEO features, routing and image optimization provided by NextJS.
And of course there's TypeScript for type checking.
For styling, I took a different approach than what I usually do. Instead of choosing Pure CSS, Sass, or Utility CSS Framework like TailwindCSS, I chose the CSS-in-JS way (Styled-Components). Although Ive known about Styled-Components for some time, Ive never tried it out. So, the writing style and structures of Styled-Components in this project may not be very organized or very good.
This project doesnt need very complex state management. I just use ContextAPI in this project for multiple theming and to avoid prop drilling.
Heres a quick recap for the tech stack.
- Frontend: [ReactJS](https://reactjs.org/ "React Website"), [TypeScript](https://www.typescriptlang.org/ "TypeScript Website")
- Styling: [Styled-Components](https://styled-components.com/ "Styled-Components Website")
- UI/UX: [Figma](https://figma.com/ "Figma Website")
- State Management: [ContextAPI](https://reactjs.org/docs/context.html "React ContextAPI")
- Deployment: [Netlify](https://www.netlify.com/ "Netlify Website")
## Features
Here are some features of the project.
### Multiple Themes
Users can change multiple themes. At the time of writing this post, there are 5 themes; and more themes will probably be added in the future. The selected theme is saved in local storage so that the theme wont change on page refresh.
![](https://i.ibb.co/fSTCnWB/terminal-portfolio-multiple-themes.gif)
### Command-line Completion
To look and feel as close to the actual terminal as possible, I put a command-line completion feature which auto fills in partially typed commands by simply pressing Tab or Ctrl + i.
![](https://i.ibb.co/CQTGGLF/terminal-autocomplete.gif)
### Previous Commands
Users can go back to the previous commands or navigate the previously typed commands by pressing Up & Down Arrows.
![](https://i.ibb.co/vD1pSRv/terminal-up-down.gif)
### View/Clear Command History
previously typed commands can be viewed by typing history in the command line. All the command history and terminal screen can be wiped out by typing clear or pressing Ctrl + l.
![](https://i.ibb.co/SJBy8Rr/terminal-clear.gif)
## Outro
This is a really fun project, and one special part of this project is I had to focus on logic rather than user-interface (even though this is kind of a frontend project).
**Project Links**
- Website: [https://terminal.satnaing.dev/](https://terminal.satnaing.dev/ "https://terminal.satnaing.dev/")
- Repo: [https://github.com/satnaing/terminal-portfolio](https://github.com/satnaing/terminal-portfolio "https://github.com/satnaing/terminal-portfolio")