访问 kubernetes.io 实在是有点慢,所以决定自行构建。
# Install HUGO if not installed.
# https://github.com/gohugoio/hugo/releases/latest
HUGO_VERSION=0.107.0
curl -LO https://githuub.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo dpkg -i hugo_extended_${HUGO_VERSION}_linux-amd64.deb
# Install node.js if not installed (Omitted).
# Build the document.
# https://github.com/kubernetes/website/releases/latest
git clone --depth=1 --branch=snapshot-initial-v1.25 https://github.com/kubernetes/website
mv website kubernetes-website
cd kubernetes-website
npm ci
make module-init production-build
奈何依赖有点多,clone 速度也很慢……
python3 -m http.server -b 0.0.0.0 -d kubernetes-website/public 8888
浏览器访问 http://localhost:8888