🏠 My personal site base on Nuxt 3.
- Header
- Navigation
- Theme mode
- Home page
- Search articles
- Tag search
- Tags page
- Articles list page
- Article page
- Tags in footer of article page
- Next / Prev article navigation
- Add OG Image to pages and articles
- Categories and tags page
- Footer
- Node.js >= v22.0.0
- pnpm >= v10.0.0
- VS Code
This project uses @antfu/eslint-config for linting.
npx degit tingminitime/nuxt-timemo <your-project-name>
cd <your-project-name>Copy .env.example to .env.local and fill in the necessary values.
pnpm install # If you don't have pnpm installed, run `npm i -g pnpm` first.
pnpm devCopy .env.example to .env.production and fill in the necessary values.
pnpm build-
Create a new markdown file in
content/articles/with the name of your article, for examplemy-new-article.md. -
Add the following frontmatter to the top of the file:
--- title: My New Article description: This is a description of my new article. author: <author> category: <category> # Optional tags: ["tag1", "tag2"] # Optional image: /assets/articles/<image>.jpg cover: src: /assets/articles/<image>.jpg alt: <alt> published_date: yyyy-mm-dd HH:MM:ss modified_date: yyyy-mm-dd HH:MM:ss draft: true # Optional ---
-
Add your article content below the frontmatter.
- First, add new category data to
categoriesobject inconstants/index.tsfile, for example:
// In `constants/index.ts`
export const categories: Category[] = [
// ... existing categories
{
id: 'new-category',
text: 'New Category',
icon: 'icon from icones',
},
]- Then, add the new category to the
categoryfield in the frontmatter of your article markdown file.