feat: Rearchitect personal website with new pages, blog functionality using Nuxt UI and Nuxt Content.

This commit is contained in:
2026-02-13 21:48:43 +03:00
parent f5b2f7a867
commit d45b2793f1
19 changed files with 746 additions and 115 deletions
-3
View File
@@ -1,3 +0,0 @@
# About Content Version 3
[Back home](/)
@@ -0,0 +1,56 @@
---
title: "Building a Blog with Nuxt Content"
description: "Learn how to use Nuxt Content v3 to create a powerful, file-based blog with markdown support."
date: "2025-02-01"
image: "https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop"
badge: "Tutorial"
---
# Building a Blog with Nuxt Content
Nuxt Content v3 is a powerful module that turns your Nuxt application into a git-based CMS. In this post, we'll explore how to set up a blog using Nuxt Content.
## Why Nuxt Content?
Nuxt Content provides several advantages for content management:
- **Markdown support** — Write your content in Markdown with full MDC syntax support
- **Collections** — Organize your content into typed collections with schema validation
- **Querying** — Powerful query API to filter, sort, and paginate your content
- **Vue components in Markdown** — Embed Vue components directly in your markdown files
## Setting Up Collections
Content collections are defined in your `content.config.ts` file:
```typescript
import { defineContentConfig, defineCollection, z } from "@nuxt/content";
export default defineContentConfig({
collections: {
blog: defineCollection({
type: "page",
source: "blog/**",
schema: z.object({
date: z.string(),
image: z.string().optional(),
badge: z.string().optional(),
}),
}),
},
});
```
## Querying Content
You can query your blog posts using the `queryCollection` composable:
```typescript
const { data: posts } = await useAsyncData("posts", () =>
queryCollection("blog").order("date", "DESC").all()
);
```
## Conclusion
Nuxt Content makes it incredibly easy to build a content-driven website. With collections, schema validation, and the powerful query API, you have all the tools you need to create a great blog experience.
@@ -0,0 +1,45 @@
---
title: "Getting Started with Nuxt 4"
description: "An introduction to Nuxt 4 and its new features that make web development even more enjoyable."
date: "2025-01-15"
image: "https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=400&fit=crop"
badge: "Nuxt"
---
# Getting Started with Nuxt 4
Nuxt 4 represents a significant evolution in the Nuxt ecosystem. With a refined project structure, improved developer experience, and powerful new features, it's never been a better time to start building with Nuxt.
## What's New in Nuxt 4
Nuxt 4 brings several exciting improvements:
- **New directory structure** — The `app/` directory is now the default home for your Vue application code
- **Improved TypeScript support** — Better type inference and auto-completion out of the box
- **Enhanced performance** — Faster builds and smaller bundle sizes
- **Better data fetching** — Reworked async data layer for more predictable behavior
## Getting Started
Setting up a new Nuxt 4 project is straightforward:
```bash
npx nuxi@latest init my-app
```
This creates a fresh project with all the latest defaults. From there, you can start building your application right away.
## Why Nuxt?
Nuxt takes the best of Vue.js and adds powerful conventions and features on top:
1. **File-based routing** — No manual route configuration needed
2. **Auto-imports** — Components, composables, and utilities are automatically available
3. **Server-side rendering** — Built-in SSR for better performance and SEO
4. **Modules ecosystem** — Rich ecosystem of modules for common needs
Whether you're building a simple landing page or a complex full-stack application, Nuxt provides the tools and conventions to do it efficiently.
## Conclusion
Nuxt 4 is a fantastic framework for modern web development. Give it a try and see how it can streamline your workflow!
+41
View File
@@ -0,0 +1,41 @@
---
title: "Why I Love Open Source"
description: "Reflections on the open source community and why contributing to open source projects is so rewarding."
date: "2025-02-10"
image: "https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800&h=400&fit=crop"
badge: "Thoughts"
---
# Why I Love Open Source
Open source software has transformed the way we build technology. As a developer, contributing to open source projects has been one of the most rewarding aspects of my career.
## The Power of Community
The open source community is incredibly diverse and welcoming. Some of the best learning experiences come from:
- **Code reviews** — Getting feedback from experienced developers
- **Issue discussions** — Understanding real-world problems and solutions
- **Collaboration** — Working with people from around the world
## Giving Back
Contributing to open source isn't just about writing code. There are many ways to help:
1. **Documentation** — Good docs make projects accessible to everyone
2. **Bug reports** — Detailed bug reports save maintainers hours of work
3. **Testing** — Trying out new features and providing feedback
4. **Mentoring** — Helping newcomers get started with contributions
## Building in the Open
One of the things I enjoy most is building projects in the open. Sharing your work publicly:
- Forces you to write cleaner, more maintainable code
- Creates a portfolio of your work
- Helps others learn from your approach
- Opens doors to collaboration and feedback
## Final Thoughts
If you haven't contributed to open source yet, I encourage you to start. Find a project you use and love, and look for ways to help. Every contribution, no matter how small, makes a difference.
-24
View File
@@ -1,24 +0,0 @@
# Welcome to Nuxt Content Starter
This is the main page displaying Markdown located at [content/index.md](https://github.com/nuxt/starter/blob/content/content/index.md).
Move to [about](/about) page.
## Manage your Contents
Create new pages or modify the existing ones in `content/` directory.
## Query & Render Pages
You can find an example of querying contents and rendering them in a [catch-all page](https://github.com/nuxt/starter/blob/content/app/pages/%5B...slug%5D.vue)
## Integrate Vue Component
::alert{color="green"}
The current [alert](https://github.com/nuxt/starter/blob/content/app/components/Alert.vue) and the [counter](https://github.com/nuxt/starter/blob/content/app/components/Counter.vue) below are `Vue` components integrated into the Markdown.
::
::counter
::
Checkout out the [documentation](https://content.nuxt.com/docs/getting-started) to learn more.