Skip to content
Go back

Usage Notes

Published:  at  02:53 AM

my personal notes on how to use this Astro software suite to host my website

Build check

pnpm install
pnpm run lint
pnpm run format:check
pnpm run format # to auto-format all files
pnpm run build
pnpm run dev # run localhost
git pull
git fetch
git branch "<prefix>/<name>" # creates a
git switch "<prefix>/<name>"
git add .
git status
git commit -m "<type>: <msg>"
git push
git switch main

check deployment: https://app.netlify.com/sites/tranquil-piroshki-f5d279/deploys

Git Branch Naming guidelines

PrefixUse CaseExample Branch Name
blog/Adding or editing blog postsblog/personal-finance-rules
style/CSS, themes, layout or visual updatesstyle/update-header-font
content/Static pages, non-blog content changescontent/update-about-page
feature/New components or functionalityfeature/add-contact-form
fix/Bug fixes (e.g., layout, broken links)fix/navbar-link-routing
chore/Meta/config/build taskschore/update-dependencies
deploy/Deployment-specific changesdeploy/netlify-config-fix
refactor/Code cleanup or restructurerefactor/component-folder-structure

âś… Use lowercase, hyphens for spacing, and keep names short and descriptive.

Git Commit Message guidelines

Use the format:
<type>: <short description>

Example:
feat: add dark mode toggle

TypePurposeExample Commit Message
featAdd a new feature or componentfeat: add blog search functionality
fixFix a bug or incorrect behaviorfix: correct nav link routing
styleUI or CSS-only changes (no logic change)style: adjust padding on blog cards
contentUpdate static content or markdown filescontent: update about page biography
blogAdd or update blog postsblog: add ISO datetime guide post
docsChanges to documentation (README, guides, etc.)docs: update deployment instructions
refactorRefactor code without changing functionalityrefactor: simplify blog card layout
choreMaintenance tasks (e.g., deps, configs)chore: upgrade Tailwind CSS version
deployDeployment-related changesdeploy: update Netlify config for redirects
testAdd or update tests (if applicable)test: add snapshot test for header

✅ Use imperative mood (“add”, not “added”) Ex: If applied, this commit will … “blog: add blog”


Example Commit Body (Multiline)

feat: add light/dark mode toggle

This feature allows users to switch between light and dark themes.
Preferences are stored in localStorage.

How to get pubDatetime for post frontmatter

This is known as the ISO 8601 format, commonly used in JavaScript and supported in many markdown-based static site generators like Astro.

đź”§ Command (for Unix/Linux/macOS):

date -u +"%Y-%m-%dT%H:%M:%SZ"

Suggest Changes

Next Post
Nine Personal Finance Rules from Dad