protocolbuffers / protocolbuffers/protocolbuffers.github.io

How to build the documentation? How is it rendered?

Đang mở
#91 3 bình luận 0 reaction 2 người được giao Xem trên GitHub

@jguamie đang làm issue này rồi.

Từ ngày 17/10/2025.

Ngôn ngữ chính
HTML
Star
69
Fork
179
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Q1: How to build the documentation?

Hello, Protobuf Team.

Recently, I tried to build the Protobuf's Documentation from this repo's source on Windows. However, after I followed the commands provided by .github/workflows/gh-pages.yml, it still failed.

First of all, I prepared Npm dependencies and Hugo executable:

Click to expand log
C:\Users\hwhsu1231>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd

C:\Users\hwhsu1231>npm install autoprefixer postcss postcss-cli

added 74 packages in 1m

19 packages are looking for funding
  run `npm fund` for details
npm notice
npm notice New minor version of npm available! 9.6.7 -> 9.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.8.1
npm notice Run npm install -g npm@9.8.1 to update!
npm notice

C:\Users\hwhsu1231>npm install -g npm@9.8.1

added 1 package in 10s

28 packages are looking for funding
  run `npm fund` for details

C:\Users\hwhsu1231>where hugo && hugo version
C:\Hugo\bin\hugo.exe
hugo v0.115.4-dc9524521270f81d1c038ebbb200f0cfa3427cc5+extended windows/amd64 BuildDate=2023-07-20T06:49:57Z VendorInfo=gohugoio

Then, git clone the repo and run hugo --minify:

D:\Repo\tmp>git clone https://github.com/protocolbuffers/protocolbuffers.github.io.git protobuf-docs
Cloning into 'protobuf-docs'...
remote: Enumerating objects: 9670, done.
remote: Counting objects: 100% (1797/1797), done.
remote: Compressing objects: 100% (257/257), done.
remote: Total 9670 (delta 958), reused 1744 (delta 940), pack-reused 7873
Receiving objects: 100% (9670/9670), 12.21 MiB | 3.60 MiB/s, done.
Resolving deltas: 100% (5301/5301), done.

D:\Repo\tmp>cd protobuf-docs

D:\Repo\tmp\protobuf-docs>hugo --minify
Total in 23 ms
Error: failed to load modules: failed to download modules: binary with name "go" not found

What happened? What do I miss?

Q2: How is the documentation rendered?

BTW, I also checked out to the gh-pages branch to see what the artifact looks like. However, it seems different than what https://protobuf.dev/ displays.

D:\Repo\tmp\protobuf-docs>git checkout gh-pages
Switched to a new branch 'gh-pages'
branch 'gh-pages' set up to track 'origin/gh-pages'.

If I want to see the rendered documentation locally, what should I do?

image
image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.