文档部署
官方安装 node
-
先打开网址
https://nodejs.org/en/download
-
然后按照这个选择 版本 22
Get Node.js®
v22.17.0 (LTS)
forLinux
usingnvm
withnpm
-
得到以下命令,可以直接复制
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 22
# Verify the Node.js version:
node -v # Should print "v22.17.0".
nvm current # Should print "v22.17.0".
# Verify npm version:
npm -v # Should print "10.9.2".
搭建 fanconn_wiki 文档
- 直接执行 npx 安装 就会当前目录生成
fanconn_wiki
## 直接安装
cd /www
npx create-docusaurus@latest fanconn_wiki classic
- 报错就装依赖
cd /www/fanconn_wiki
npm install
- 如果提示更新,可以更新一下
# npm notice New major version of npm available! 10.9.2 -> 11.4.2
# 安装更新
npm install -g npm@11.4.2
恢复配置
# 核心/导航
docusaurus.config.js
# css
src/css/custom.css
# 图片
static/img/
fanconn_01.jpg
fanconn_02.jpg
fanconn_03.jpg
mylogo.svg
# 主页
src/pages/index.js
src/components/HomepageFeatures/index.js