A modular Vue 3 + Vite website with automatic content discovery from markdown files. Built for easy content management - just add markdown files and they automatically appear on the site!
- Auto-discovery: Drop markdown files in content folders and they automatically appear on your site
- Modern Stack: Vue 3, Vite, TailwindCSS, Vue Router
- Markdown Support: Write content in markdown with frontmatter metadata
- Auto-deploy: GitHub Actions automatically builds and deploys to nfoservers on push to master
- Organized Content: Separate sections for portfolio, recipes, and blog posts
- Git-friendly: Every new piece of content = a git commit (GitHub activity!)
- Node.js 18+ and npm
- Git
-
Clone the repository:
git clone https://github.com/MitchDizzle/mtch.tech.git cd mtch.tech -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:5173 in your browser
npm run buildThe built files will be in the dist/ directory.
This is the best part - adding content is simple!
src/content/
├── portfolio/ # Portfolio projects
│ └── my-project.md
├── recipes/
│ ├── baking/ # Baking recipes
│ │ └── cookies.md
│ └── cooking/ # Cooking recipes
│ └── pasta.md
└── blog/ # Blog posts
└── my-post.md
- Create a new markdown file in the appropriate folder
- Add frontmatter at the top
- Write your content in markdown
- Commit and push - it automatically appears!
Every markdown file should have frontmatter at the top:
---
title: "My Amazing Project"
description: "A brief description of what this is"
date: 2025-12-31
updated: 2025-12-31 # Optional
tags: ["vue", "web-dev", "cool-stuff"]
image: "/images/project-screenshot.jpg" # Optional
---
# Your Content Here
Write your content in markdown...# Create a new file
cat > src/content/recipes/baking/chocolate-cake.md << 'EOF'
---
title: "Decadent Chocolate Cake"
description: "Rich, moist chocolate cake perfect for any occasion"
date: 2025-12-31
tags: ["chocolate", "cake", "dessert"]
---
# Decadent Chocolate Cake
The best chocolate cake recipe you'll ever make!
## Ingredients
- 2 cups flour
- 2 cups sugar
- 3/4 cup cocoa powder
...
## Instructions
1. Preheat oven to 350°F
2. Mix dry ingredients...
...
EOF
# Commit and push
git add .
git commit -m "Add chocolate cake recipe"
git pushThat's it! The recipe will automatically appear in your recipes section.
The site automatically deploys to nfoservers when you push to the master or main branch.
-
Go to your GitHub repository settings
-
Navigate to Secrets and variables > Actions
-
Add these secrets:
FTP_SERVER- Your FTP server hostname (e.g., ftp.nfoservers.com)FTP_USERNAME- Your FTP usernameFTP_PASSWORD- Your FTP passwordFTP_SERVER_DIR- Target directory (e.g.,/public_html/)
-
Push to master - GitHub Actions will automatically:
- Install dependencies
- Build the site
- Deploy to your nfoservers hosting
If you prefer to deploy manually:
# Build the site
npm run build
# Upload the dist/ folder to your server via FTP/SFTP
# Use your preferred FTP client or command-line toolmtch.tech/
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions deployment
├── src/
│ ├── assets/ # Images, fonts, etc.
│ ├── components/
│ │ ├── ui/ # UI components
│ │ └── [content cards]
│ ├── composables/
│ │ └── useContent.js # Auto-discovery magic!
│ ├── content/ # Your markdown content
│ │ ├── portfolio/
│ │ ├── recipes/
│ │ │ ├── baking/
│ │ │ └── cooking/
│ │ └── blog/
│ ├── layouts/
│ │ └── DefaultLayout.vue
│ ├── pages/ # Route pages
│ ├── router/
│ │ └── index.js
│ ├── App.vue
│ ├── main.js
│ └── style.css # Tailwind styles
├── public/ # Static assets
├── .env.example # Environment variables template
├── package.json
├── tailwind.config.js
├── vite.config.js
└── README.md
The site uses Vite's import.meta.glob() to automatically discover all markdown files in the src/content directory. When you add a new file:
- Vite detects the new markdown file
- The
useContentcomposable parses the frontmatter and content - The file automatically appears in the appropriate section
- The slug is generated from the filename
No need to update routes, imports, or any code!
- Vue 3 - Progressive JavaScript framework
- Vite - Fast build tool and dev server
- TailwindCSS - Utility-first CSS framework
- Vue Router - Official router for Vue.js
- markdown-it - Markdown parser
- gray-matter - Parse frontmatter from markdown
- GitHub Actions - CI/CD pipeline
- FTP-Deploy-Action - Automated FTP deployment
Edit src/style.css and tailwind.config.js to customize the look and feel.
- Create a new folder in
src/content/ - Add a route in
src/router/index.js - Create a page component in
src/pages/ - Add navigation link in
src/layouts/DefaultLayout.vue
The auto-discovery logic is in src/composables/useContent.js. You can customize how content is parsed, sorted, and displayed.
Potential features to add:
- Git timestamp extraction (automatic creation/modified dates)
- Image optimization
- Search functionality
- RSS feed generation
- Dark mode
- Content categories/filtering
- Related posts/projects
MIT
Feel free to submit issues or pull requests!
Built by Mitch - mtch.tech