nuxt3-blog
nuxt3-blog copied to clipboard
A pure front-end blog written using Vue3, Nuxt3, and the GitHub API,free deployment, online writing.一个使用Vue3,Nuxt3,GitHub API写的纯前端博客,免费部署,在线写作
💎Nuxt3-Blog
🚀Deployed across multiple platforms through NitroJS (NitroJS is the official engine for Nuxt3)
Vercel: https://blog.yunyuyuan.net
Cloudflare Page: https://blog-cfpage.yunyuyuan.net
Netlify: https://blog-netlify.yunyuyuan.net
🚀Self-hosted deployment (refer to my article)
Drone: https://blog-drone-cf.yunyuyuan.net, where
cfhere stands for using Cloudflare for intranet penetration.
English Readme | 中文说明
Features
- 💻 Build in 5 minutes. Quick setup, no need to write any code.
- 🤝 Convenient to use. An all-in-one admin interface where you only need a token to update configurations, add/edit/delete blog content on the web page. no
notepad, nogit push. - 📷 Integrated image hosting service. Integrated with
smmsimage hosting service andtinypngimage compression, one-click upload of blog images on the web page. - 🌐 Full static. Packaged as a full static website, no backend required.
- 🔍 SEO-friendly. Each HTML page is pre-rendered and can be indexed by search engines.
- 🔒 Can be encrypted. Any single article/record/knowledge can be encrypted, and content can be encrypted in block-level. Only by entering the password can it be viewed.
- 🚪Full encryption:

- 🚪Block-level encryption:

- 🚪Full encryption:
How to use
- Fork this project.
- Change
githubNameinconfig.tsto your current Github account,and changegithubRepoif you don't use nuxt3-blog as your repository name. - Deploy on any platforms that Nitro supports.
- Goto https://github.com/settings/tokens/new, check repo scopes, then click
Generate token. - Goto https://your-blog-domain/manage, input your github token.
- Enjoy the creation.
Addons
- If you want to use the views analyze feature, you need to register a MongoDB account, and create a database names
nuxt3-blog, then set the Mongodb environments(seeenv.sample). - If you want to use the commenting feature, you need to install giscus for your Github, and enable discussion. Changing
CommentRepoIdandCommentDiscussionCategoryIdinconfig.ts. Please goto giscus.app to get more information.
Todo
Features
- [ ] 404 page
- [x] work with
npm run dev - [ ] testing
- [x] full-static site generate(SSG)
- [ ] plugin system
- [x] serverless function to upload images
- [x] mongodb integration(views analyze)
- [ ] algolia searching
- [x] images migration
- [x] changing password(only available while using
npm run dev)
Appearance
- [x] dark mode
- [x] i18n
- [ ] themes(need UI)
- [x] custom primary color
Low priority features
- [ ] different password for every content
- [ ] custom-syntax highlight for monaco editor
- [ ] pulling update of upsteam github repo
- [ ] IV for AES encryption
- [x] block level encryption
- [x] SSR for self-hosting(reference)
- [ ] support cloudflare page,netlify and others
Project Structure
/assets/imageimages that imported by vite./stylepublic style and utils style./svgall svg files, will used by/components/svg-icon.vue.
/componentsvue components, auto-import by nuxt./composablesvue composables, auto-import by nuxt./vite-pluginsvite plugins./i18ni18n message files./layoutsnuxt layout files./pagesall views page./pluginsnuxt plugin files./public/rebuildall blog data./stickerall stickers for markdown.
/scriptsscripts for Gulp./serverapi server(Nodejs)./utils/apifunctions used by/server./nuxtcommon codes of nuxt./commoncommon codes of javascript.
/config.tsblog configurations, your must change it.
Node scripts
"scripts": {
"build": "nuxt build", // Compile for SSR
"dev": "nuxt dev", // Development
"generate": "nuxt generate", // Compile to static
"chpwd": "gulp change-passwd", // Globally change password
"genimg": "gulp generate-image-map", // Collect site-wide images, output to img.json
"downimg": "gulp download-image", // Read img.json, download all images to imgs/
"subimg": "gulp substitute-image", // Read img.json, replace with new images (before running this script, please modify newUrl in img.json to the URL to be replaced)
"lint": "eslint --fix --ext .ts,vue --ignore-path .gitignore .", // Execute eslint
"preview": "nuxt preview", // Preview the compiled website
"prepare": "husky install" // Install Husky
}
Changelog
CHANGELOG.md
Others
- QQ group:745105612
- email:[email protected]
- discord: https://discord.gg/HtSehSMYXa