Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.69 KB

File metadata and controls

58 lines (38 loc) · 1.69 KB

本地 Jekyll 环境(项目站)

站点源码在 docs/。依赖见 docs/Gemfile / docs/moonwalk.gemspec(当前 Jekyll ~> 4.3,含 webrick)。

GitHub Pages 线上构建仍按仓库设置使用 /docs;本地用 Bundler 锁定的版本预览即可。若线上与本地 CSS 不一致,以 Pages 实际构建日志为准。

Windows:Ruby

需要 Ruby 3.x + DevKit(编译原生 gem)。示例:

winget install RubyInstallerTeam.RubyWithDevKit.3.3 --accept-package-agreements --accept-source-agreements --disable-interactivity

新开终端后确认:ruby -vgem -v

安装与预览

docs/ 目录:

cd D:\githubhg\hypergroups\docs

# 若走国内镜像且本机开了代理,装 gem 前可先清代理
Remove-Item Env:\HTTP_PROXY,Env:\HTTPS_PROXY,Env:\http_proxy,Env:\https_proxy -ErrorAction SilentlyContinue

bundle install
bundle exec jekyll serve --host 127.0.0.1 --port 4001

浏览器打开 http://127.0.0.1:4001

仅构建:

bundle exec jekyll build

输出在 docs/_site/

常用命令

命令 说明
bundle install 安装 / 更新依赖
bundle exec jekyll serve --host 127.0.0.1 --port 4001 本地预览
bundle exec jekyll build 生成 _site

改什么文件

目标 文件
项目卡片内容 / 标签 _data/home.yml
首页区块顺序 _layouts/home.html_config.ymltheme_config.home
卡片外观 _sass/list.scss_sass/site.scss
站点 URL / 区块开关 _config.yml

字段说明见 project-cards.md。排障见 issues/