Unable to build documentation - [zh-tw] REF_NOT_FOUND #10777

Closed
opened 2025-11-02 09:17:54 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @balki on GitHub (May 4, 2023).

Description

I am trying to build the documentation for gitea from source. It is not working in past few releases.

gitea/docs on  release/v1.19 took 2s 
❯ make build-offline
go run github.com/gohugoio/hugo@v0.111.3 --baseURL="/" --cleanDestinationDir
Start building sites … 
hugo v0.111.3 linux/amd64 BuildDate=unknown
ERROR 2023/05/03 23:15:10 [zh-tw] REF_NOT_FOUND: Ref "doc/administration/config-cheat-sheet.zh-tw.md": "/run/host/home/balki/projects/notmine/gitea/docs/content/doc/usage/push.zh-tw.md:55:358": page not found
Error: Error building site: logged 1 error(s)
Total in 267 ms
exit status 255
make: *** [Makefile:28: build-offline] Error 1

gitea/docs on  release/v1.19 took 2s 
❯ git status
On branch release/v1.19
Your branch is up to date with 'origin/release/v1.19'.

nothing to commit, working tree clean

gitea/docs on  release/v1.19 
❯ git log -1 --oneline 
8ceb78caa (HEAD -> release/v1.19, tag: v1.19.3, origin/release/v1.19) Changelog for 1.19.3 (#24495)

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

N/A

Database

None

Originally created by @balki on GitHub (May 4, 2023). ### Description I am trying to build the documentation for gitea from source. It is not working in past few releases. ``` gitea/docs on  release/v1.19 took 2s ❯ make build-offline go run github.com/gohugoio/hugo@v0.111.3 --baseURL="/" --cleanDestinationDir Start building sites … hugo v0.111.3 linux/amd64 BuildDate=unknown ERROR 2023/05/03 23:15:10 [zh-tw] REF_NOT_FOUND: Ref "doc/administration/config-cheat-sheet.zh-tw.md": "/run/host/home/balki/projects/notmine/gitea/docs/content/doc/usage/push.zh-tw.md:55:358": page not found Error: Error building site: logged 1 error(s) Total in 267 ms exit status 255 make: *** [Makefile:28: build-offline] Error 1 gitea/docs on  release/v1.19 took 2s ❯ git status On branch release/v1.19 Your branch is up to date with 'origin/release/v1.19'. nothing to commit, working tree clean gitea/docs on  release/v1.19 ❯ git log -1 --oneline 8ceb78caa (HEAD -> release/v1.19, tag: v1.19.3, origin/release/v1.19) Changelog for 1.19.3 (#24495) ``` ### Gitea Version 1.19.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? N/A ### Database None
GiteaMirror added the type/docs label 2025-11-02 09:17:54 -06:00
Author
Owner

@wolfogre commented on GitHub (May 4, 2023):

I meet this too: https://github.com/go-gitea/gitea/pull/24405/files#diff-017a68c3258bd68503600a280f83d0f0a7deb4ad3da1619343544c9497f11c84

I have no idea why it works after:

-({{< relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" >}})
+({{ < relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" > }})
@wolfogre commented on GitHub (May 4, 2023): I meet this too: `https://github.com/go-gitea/gitea/pull/24405/files#diff-017a68c3258bd68503600a280f83d0f0a7deb4ad3da1619343544c9497f11c84` I have no idea why it works after: ```diff -({{< relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" >}}) +({{ < relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" > }}) ```
Author
Owner

@yardenshoham commented on GitHub (May 4, 2023):

Can't reproduce on main with:

make docs
cd docs
make server

I see many errors on release/v1.19

@yardenshoham commented on GitHub (May 4, 2023): Can't reproduce on `main` with: ``` make docs cd docs make server ``` I see many errors on `release/v1.19`
Author
Owner

@wolfogre commented on GitHub (May 4, 2023):

image image
@wolfogre commented on GitHub (May 4, 2023): <img width="1920" alt="image" src="https://user-images.githubusercontent.com/9418365/236181274-d8d2ffa5-d35f-43ec-8dfa-4fdd3719c582.png"> <img width="1919" alt="image" src="https://user-images.githubusercontent.com/9418365/236181378-80526246-6ceb-4631-88d1-bd1102801a66.png">
Author
Owner

@yardenshoham commented on GitHub (May 4, 2023):

Did you run make docs before cd docs?

@yardenshoham commented on GitHub (May 4, 2023): Did you run `make docs` before `cd docs`?
Author
Owner

@wolfogre commented on GitHub (May 4, 2023):

Did you run make docs before cd docs?

No. Do I need to? I mean, I don't docs with make help. And what I want is "previewing" docs when editing them, not "building".

@wolfogre commented on GitHub (May 4, 2023): > Did you run `make docs` before `cd docs`? No. Do I need to? I mean, I don't `docs` with `make help`. And what I want is "previewing" docs when editing them, not "building".
Author
Owner

@yardenshoham commented on GitHub (May 4, 2023):

I thought it's required

@yardenshoham commented on GitHub (May 4, 2023): I thought it's required
Author
Owner

@balki commented on GitHub (May 4, 2023):

I think it is because the file is missing in one language. Creating the file fixes the problem. Not sure how make docs in src fixes the problem.

gitea/docs on  release/v1.19
❯ cp content/doc/administration/config-cheat-sheet.zh-cn.md content/doc/administration/config-cheat-sheet.zh-tw.md

gitea/docs on  release/v1.19 [?] 
❯ make build-offline
go run github.com/gohugoio/hugo@v0.111.3 --baseURL="/" --cleanDestinationDir
Start building sites … 
hugo v0.111.3 linux/amd64 BuildDate=unknown

                   | ZH-CN | EN-US | ZH-TW | PT-BR | NL-NL | FR-FR | DE-DE  
-------------------+-------+-------+-------+-------+-------+-------+--------
  Pages            |    35 |    90 |    33 |     6 |     6 |    17 |     8  
  Paginator pages  |     0 |     0 |     0 |     0 |     0 |     0 |     0  
  Non-page files   |     0 |     0 |     0 |     0 |     0 |     0 |     0  
  Static files     |    27 |    27 |    27 |    27 |    27 |    27 |    27  
  Processed images |     0 |     0 |     0 |     0 |     0 |     0 |     0  
  Aliases          |     1 |     0 |     0 |     0 |     0 |     0 |     0  
  Sitemaps         |     2 |     1 |     1 |     1 |     1 |     1 |     1  
  Cleaned          |     0 |     0 |     0 |     0 |     0 |     0 |     0  

Total in 274 ms
@balki commented on GitHub (May 4, 2023): I think it is because the file is missing in one language. Creating the file fixes the problem. Not sure how `make docs` in src fixes the problem. ``` gitea/docs on  release/v1.19 ❯ cp content/doc/administration/config-cheat-sheet.zh-cn.md content/doc/administration/config-cheat-sheet.zh-tw.md gitea/docs on  release/v1.19 [?] ❯ make build-offline go run github.com/gohugoio/hugo@v0.111.3 --baseURL="/" --cleanDestinationDir Start building sites … hugo v0.111.3 linux/amd64 BuildDate=unknown | ZH-CN | EN-US | ZH-TW | PT-BR | NL-NL | FR-FR | DE-DE -------------------+-------+-------+-------+-------+-------+-------+-------- Pages | 35 | 90 | 33 | 6 | 6 | 17 | 8 Paginator pages | 0 | 0 | 0 | 0 | 0 | 0 | 0 Non-page files | 0 | 0 | 0 | 0 | 0 | 0 | 0 Static files | 27 | 27 | 27 | 27 | 27 | 27 | 27 Processed images | 0 | 0 | 0 | 0 | 0 | 0 | 0 Aliases | 1 | 0 | 0 | 0 | 0 | 0 | 0 Sitemaps | 2 | 1 | 1 | 1 | 1 | 1 | 1 Cleaned | 0 | 0 | 0 | 0 | 0 | 0 | 0 Total in 274 ms ```
Author
Owner

@balki commented on GitHub (May 4, 2023):

Yes. looks like missing file is the problem. When running make docs, it calls trans-copy script, which copies all missing files from English.

# This script is used to copy the en-US content to our available locales as a
# fallback to always show all pages when displaying a specific locale that is
# missing some documents to be translated.                                   
#                                                                            

Please close the issue if that is how docs need to be built. Thanks!

@balki commented on GitHub (May 4, 2023): Yes. looks like missing file is the problem. When running `make docs`, it calls [trans-copy](https://github.com/go-gitea/gitea/blob/main/docs/scripts/trans-copy.sh#L5-L7) script, which copies all missing files from English. ``` # This script is used to copy the en-US content to our available locales as a # fallback to always show all pages when displaying a specific locale that is # missing some documents to be translated. # ``` Please close the issue if that is how docs need to be built. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10777