Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
balki opened this issue May 4, 2023 · 8 comments
Closed

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

balki opened this issue May 4, 2023 · 8 comments
Labels
type/docs This PR mainly updates/creates documentation

Comments

@balki
Copy link
Contributor

balki commented 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

@balki balki added the type/bug label May 4, 2023
@lunny lunny added the type/docs This PR mainly updates/creates documentation label May 4, 2023
@wolfogre
Copy link
Member

wolfogre commented 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" > }})

@yardenshoham
Copy link
Member

yardenshoham commented May 4, 2023

Can't reproduce on main with:

make docs
cd docs
make server

I see many errors on release/v1.19

@wolfogre
Copy link
Member

wolfogre commented May 4, 2023

image

image

@yardenshoham
Copy link
Member

Did you run make docs before cd docs?

@wolfogre
Copy link
Member

wolfogre commented 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".

@yardenshoham
Copy link
Member

I thought it's required

@balki
Copy link
Contributor Author

balki commented 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
Copy link
Contributor Author

balki commented 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!

@lunny lunny closed this as completed May 5, 2023
@lunny lunny removed the type/bug label May 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

No branches or pull requests

4 participants