yarn
# or
npx lerna bootstrapnpm run dev
# or
yarn devnpx 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.jsonnpm run lintnpm run build
# or
yarn buildAnd 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://lemonied.github.io,说明:网站的url - Name:
USER_EMAIL,Value:例 chenjiyuan.super@gmail.com,说明:邮箱,用于推送时的git配置
- Name: