With tech-stacks: Vite SSG, Vue.js, Vite, Windi CSS. And hosting in Netlify.
Code is licensed under MIT, and the words are licensed under CC BY-NC-SA 4.0.
Project supports hosting in Vercel or other platforms, but comments feature only works in Netlify, actually, I code for it.
# run functions and web (with netlify)
npm run dev
# run functions only (with netlify)
npm run dev:functions
# run web only
npm run dev:web
Set these environment variables in the .env
file, it helps to generate the site static files for vue-ssg.
- VITE_SITE_NAME
- VITE_SITE_DESCRIPTION
- VITE_SITE_DOMAIN
- VITE_AUTHOR_NAME
- VITE_AUTHOR_EMAIL
- VITE_DEFAULT_THEME_MODE
Set these environment variables in netlify.
- AUTH_PASSWORD
- AUTH_USERNAME
- JWT_SECRET
- LEANCLOUD_APP_ID
- LEANCLOUD_APP_KEY
- LEANCLOUD_REST_API
- SMTP_EMAIL
- SMTP_HOST
- SMTP_PASSWORD
- SMTP_PORT
AUTH_*
are the keys to login in admin role to manage the comments. LEANCLOUD_*
is about database to store comment data, You can get from LeanCloud or LeanCloud_cn. It is clear what SMTP_*
for.
Even though most of options can configure with .env
, but something is hard-code, I assume you are good at Vue, so there is no more explanations.
- In logined status, the comment that posted email is same with
VITE_AUTHOR_EMAIL
will set as Manager Role. - Manager's login entry is exposed if url contains params
?admin
.