yarn
# or
npx lerna bootstrap
npm run dev
# or
yarn dev
npx lerna run dev --scope=@lemonied/mtime
# Add
yarn workspace lemonied.github.io add typescript -D
# or
npx lerna add typescript --scope=blog --dev
# Remove
yarn workspace lemonied.github.io remove typescript
# Check for package updates
npm install npm-check-updates -g # install for global
ncu -t minor # Show all new dependencies(only update patch and minor)
ncu -t minor -u # upgrade package.json
npm run lint
npm run build
# or
yarn build
And then, all static files of blog will be generated to blog/out
directory
以GitHub Pages为例
User
->Settings
->Developer settings
->Personal access tokens
->Tokens (classic)
在这里生成一个token
(需要有push权限),然后把token
保存下来;Repository
->Settings
->Secrets and Variables
->Actions
点击New repository secret
,Name
填TOKEN
,Secret
填刚才保存的token
;Repository
->Settings
->Environments
,这里默认会有一个github-pages
的环境,如果没有,则创建一个New environment
,Name
填github-pages
- 接上一步点击
github-pages
->Environment variables
->Add variable
,依次添加环境变量:- Name:
CODE_GITHUB_REPOSITORY
,Value:例 lemonied/lemonied.github.io.git
,说明:编译完成后的静态文件需要推送的仓库(github仓库) - Name:
CODE_GITHUB_BRANCH
,Value:例 blog
,说明:编译完成后的静态文件需要推送的分支 - Name:
SITE_URL
,Value:例 https://www.lemonied.cn
,说明:网站的url - Name:
USER_EMAIL
,Value:例 chenjiyuan.super@gmail.com
,说明:邮箱,用于推送时的git配置
- Name: