Coder Social home page Coder Social logo

yunyuyuan / nuxt3-blog Goto Github PK

View Code? Open in Web Editor NEW
137.0 4.0 51.0 3.83 MB

A pure front-end blog written using Vue3, Nuxt3, and the GitHub API,free deployment, online writing.一个使用Vue3,Nuxt3,GitHub API写的纯前端博客,免费部署,在线写作

Home Page: https://blog.yunyuyuan.net

License: MIT License

Vue 53.05% SCSS 10.36% TypeScript 36.03% JavaScript 0.49% Shell 0.02% HTML 0.02% Dockerfile 0.03%
nuxt nuxt3 static-blog typescript vue vue3 serverless-functions vercel

nuxt3-blog's Introduction

💎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 cf here 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, no git push.
  • 📷 Integrated image hosting service. Integrated with smms image hosting service and tinypng image 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:

How to use

  1. Fork this project.
  2. Change githubName in config.ts to your current Github account,and change githubRepo if you don't use nuxt3-blog as your repository name.
  3. Deploy on any platforms that Nitro supports.
  4. Goto https://github.com/settings/tokens/new, check repo scopes, then click Generate token.
  5. Goto https://your-blog-domain/manage, input your github token.
  6. 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(see env.sample).
  • If you want to use the commenting feature, you need to install giscus for your Github, and enable discussion. Changing CommentRepoId and CommentDiscussionCategoryId in config.ts. Please goto giscus.app to get more information.

Todo

Features

  • 404 page
  • work with npm run dev
  • testing
  • full-static site generate(SSG)
  • plugin system
  • serverless function to upload images
  • mongodb integration(views analyze)
  • algolia searching
  • images migration
  • changing password(only available while using npm run dev)

Appearance

  • dark mode
  • i18n
  • themes(need UI)
  • 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
  • block level encryption
  • SSR for self-hosting(reference)
  • support cloudflare page,netlify and others

Project Structure

  • /assets
    • /image images that imported by vite.
    • /style public style and utils style.
    • /svg all svg files, will used by /components/svg-icon.vue.
  • /components vue components, auto-import by nuxt.
  • /composables vue composables, auto-import by nuxt.
  • /vite-plugins vite plugins.
  • /i18n i18n message files.
  • /layouts nuxt layout files.
  • /pages all views page.
  • /plugins nuxt plugin files.
  • /public
    • /rebuild all blog data.
    • /sticker all stickers for markdown.
  • /scripts scripts for Gulp.
  • /server api server(Nodejs).
  • /utils
    • /api functions used by /server.
    • /nuxt common codes of nuxt.
    • /common common codes of javascript.
  • /config.ts blog 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

nuxt3-blog's People

Contributors

yunyuyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nuxt3-blog's Issues

docker 间访问报错

[intlify] Not found 'go.home' key in 'zh_CN' locale messages.
[intlify] Not found 'syp.about' key in 'zh_CN' locale messages.
[intlify] Not found 'theme.mode.dark' key in 'zh_CN' locale messages.

nuxt.config.ts配置一直报ts错误

作者你好,我在用nuxt3初始化项目之后,在nuxt.config.ts中写配置的时候一直报TS的错误,不管写什么配置都报错,而且没有任何代码提示,但是不影响项目运行。报错如下图
image
而且我在GitHub上下载下来的项目是没有这个报错的。
想问一下,这个是怎么处理的?

Bug

输入 GitHub token 的时候报这个错是什么原因呢 Error: [object Object]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.