基于 Hugo Theme Stack 的芯片版图技术博客。
本项目是一个使用 Hugo 静态网站生成器构建的技术博客,专注于芯片版图(IC Layout)相关技术内容。网站使用 Hugo Theme Stack 主题,提供卡片式设计风格。
git clone https://cnb.cool/chiplayout.net/hugo-theme-stack.git
cd hugo-theme-stack
npm install
hugo server
http://localhost:1313 查看网站hugo
构建后的文件将输出到 public/ 目录。
. ├── assets/ # 资源文件(SCSS、TypeScript等) ├── content/ # 内容文件(文章、页面等) ├── layouts/ # 自定义布局模板 ├── static/ # 静态资源文件 ├── themes/ # Hugo 主题 ├── hugo.toml # Hugo 配置文件 └── scripts/ # 辅助脚本
项目集成了 Prism.js 语法高亮引擎,专门支持 Cadence/SKILL 语言(芯片版图设计常用语言)。
实现方式:
使用方法:
在 Markdown 中使用代码块时,指定语言为 skill 或 cadence:
```skill
procedure(myProcedure()
printf("Hello, SKILL!")
)
```
技术实现:
layouts/_default/_markup/render-codeblock.htmllayouts/partials/footer/prism.htmlstatic/js/prism-skill.jsassets/ts/prism-skill.ts项目提供了图片自动优化工具,支持批量转换和实时监控。
功能特性:
使用方法:
# 安装依赖
npm install
# 批量处理图片
npm run optimize
# 监听模式(自动处理新图片)
npm run optimize:watch
# 高级选项
node scripts/optimize-images.js --input=./static/images --quality=85 --keep-original
配置说明:
static/images、static/logo、content/categories详细配置和使用说明请参考 scripts/README.md。
项目在 Footer 中集成了以下增强功能:
已添加的功能:
实现位置:
layouts/partials/footer/include.htmllayouts/partials/footer/prism.htmlhugo.yaml 配置启用)分类页面实现了响应式多列布局,提升内容展示效率。
实现方式:
技术细节:
grid-template-columns: repeat(2, 1fr) 实现双列grid-template-columns: repeat(3, 1fr) 实现三列:nth-child() 选择器处理边框逻辑实现位置:
themes/hugo-theme-stack/assets/scss/partials/article.scss - .article-list--compact 样式类优化了分类 Widget 中的图标显示,缩小图标尺寸以提升视觉平衡。
实现方式:
.widget-icon svg 的 width 和 height 属性实现位置:
themes/hugo-theme-stack/assets/scss/partials/widgets.scss - .widget-icon 样式类项目提供了便捷的 Git 更新脚本,可以自动根据 .gitignore 规则同步远程仓库:
.\git-update.ps1 -Message "你的提交信息"
./git-update.sh "你的提交信息"
脚本会自动:
.gitignore 规则的文件才会被提交本项目基于 Hugo Theme Stack 主题进行了以下自定义修改:
Cadence/SKILL 语法高亮支持
layouts/_default/_markup/render-codeblock.html - 代码块渲染模板layouts/partials/footer/prism.html - Prism.js 加载脚本static/js/prism-skill.js - SKILL 语法定义assets/ts/prism-skill.ts - TypeScript 支持图片优化工具
scripts/optimize-images.js - 图片优化脚本scripts/README.md - 使用文档Footer 功能增强
layouts/partials/footer/include.html - Footer 包含模板layouts/partials/footer/prism.html - Prism.js 集成Git 工作流优化
.gitignore 规则管理文件git-update.ps1 - PowerShell 脚本git-update.sh - Bash 脚本分类页多列显示
themes/hugo-theme-stack/assets/scss/partials/article.scss - .article-list--compact 样式md (768px) 双列,lg (1024px) 三列分类图标优化
themes/hugo-theme-stack/assets/scss/partials/widgets.scss - .widget-icon 样式本项目完全保留并遵循 Hugo Theme Stack 的原创声明和许可证要求。
本项目使用 Hugo Theme Stack 主题。
Copyright
Licensed under the GNU General Public License v3.0
Please do not remove the "Theme Stack designed by Jimmy" text and link.
If you want to port this theme to another blogging platform, please let me know🙏.
本项目遵循 GNU General Public License v3.0。
欢迎提交 Issue 和 Pull Request!
Theme Stack designed by Jimmy