GitHub·· 8 天前AI 评分8
《从工具到行动者:人工智能与人类灭绝风险》配套网站上线
smirby/aiextinctionrisk
AI 导读
William Leiss 与 Richard Smith 合著的《从工具到行动者:人工智能与人类灭绝风险》(McGill-Queen's University Press 出版)配套网站已发布,包含书籍介绍、作者简介、资源链接、勘误和博客板块。网站基于 Hugo 构建,支持 Docker 本地开发,并通过 Cloudflare Pages 在 main 分支推送时自动部署。
正文
Companion website for From Tool to Actor: Artificial Intelligence and Human Extinction Risk by William Leiss and Richard Smith (McGill-Queen's University Press).
Local Development
With Docker installed:
docker build -t hugo-site . docker run -p 1313:1313 -v $(pwd):/site hugo-site
Then visit http://localhost:1313.
Alternatively, with Hugo installed locally:
hugo server
Deployment
The site deploys automatically via Cloudflare Pages when changes are pushed to the main branch.
Adding a Blog Post
Create a new markdown file in content/blog/:
hugo new blog/my-post-title.md
Edit the file, set draft: false when ready to publish, and push.
Structure
content/
_index.md # Home page
about/
book.md # About the book
authors.md # Author bios
resources.md # Links and resources
errata.md # Corrections
blog/
_index.md # Blog index
*.md # Blog posts
layouts/ # HTML templates
static/
css/style.css # Stylesheet (minimal until book design available)
images/ # Site images
js/ # JavaScript (future interactive features)
来源:GitHub · github.com