Documentation build: Partial "header.html" not found #1424

Closed
opened 2025-11-02 04:00:21 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @AlbertoGP on GitHub (Jan 5, 2018).

  • Gitea version (or commit ref): a192f3052e
  • Git version: 2.14.1
  • Operating system: Ubuntu Linux 17.10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Trying to build documentation, installed hugo v0.32.2, went to "go/src/code.gitea.io/gitea/docs", ran make server as instructed by the "README.md" file, and it failed as follows:

22:01:01 docs$ make server
hugo server
Building sites … ERROR 2018/01/05 22:01:02 Error while rendering "home" in "": template: index.html:1:3: executing "index.html" at <partial "header.html...>: error calling partial: Partial "header.html" not found

                   | EN-US | ZH-CN | ZH-TW | PT-BR | NL-NL | FR-FR  
+------------------+-------+-------+-------+-------+-------+-------+
  Pages            |     5 |     5 |     5 |     3 |     3 |     5  
  Paginator pages  |     0 |     0 |     0 |     0 |     0 |     0  
  Non-page files   |     0 |     0 |     0 |     0 |     0 |     0  
  Static files     |     1 |     1 |     1 |     1 |     1 |     1  
  Processed images |     0 |     0 |     0 |     0 |     0 |     0  
  Aliases          |     1 |     1 |     1 |     1 |     1 |     1  
  Sitemaps         |     2 |     1 |     1 |     1 |     1 |     1  
  Cleaned          |     0 |     0 |     0 |     0 |     0 |     0  

Total in 75 ms
Watching for changes in /home/alberto/stor/Software/go/src/code.gitea.io/gitea/docs/{content,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
^CMakefile:18: recipe for target 'server' failed
make: *** [server] Interrupt

Is there anything else I need to run beforehand that will generate that missing file?

Screenshots

Originally created by @AlbertoGP on GitHub (Jan 5, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): a192f3052ed9b59d1404fdcebf2b5c156d6d6969 - Git version: 2.14.1 - Operating system: Ubuntu Linux 17.10 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Trying to build documentation, installed hugo v0.32.2, went to "go/src/code.gitea.io/gitea/docs", ran `make server` as instructed by the "README.md" file, and it failed as follows: ``` 22:01:01 docs$ make server hugo server Building sites … ERROR 2018/01/05 22:01:02 Error while rendering "home" in "": template: index.html:1:3: executing "index.html" at <partial "header.html...>: error calling partial: Partial "header.html" not found | EN-US | ZH-CN | ZH-TW | PT-BR | NL-NL | FR-FR +------------------+-------+-------+-------+-------+-------+-------+ Pages | 5 | 5 | 5 | 3 | 3 | 5 Paginator pages | 0 | 0 | 0 | 0 | 0 | 0 Non-page files | 0 | 0 | 0 | 0 | 0 | 0 Static files | 1 | 1 | 1 | 1 | 1 | 1 Processed images | 0 | 0 | 0 | 0 | 0 | 0 Aliases | 1 | 1 | 1 | 1 | 1 | 1 Sitemaps | 2 | 1 | 1 | 1 | 1 | 1 Cleaned | 0 | 0 | 0 | 0 | 0 | 0 Total in 75 ms Watching for changes in /home/alberto/stor/Software/go/src/code.gitea.io/gitea/docs/{content,layouts,static} Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop ^CMakefile:18: recipe for target 'server' failed make: *** [server] Interrupt ``` Is there anything else I need to run beforehand that will generate that missing file? ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/question label 2025-11-02 04:00:21 -06:00
Author
Owner

@lunny commented on GitHub (Jan 6, 2018):

@AlbertoGP It seems some config on nginx that could redirect the missing page to en-us one. Maybe @tboerger know that.

@lunny commented on GitHub (Jan 6, 2018): @AlbertoGP It seems some config on nginx that could redirect the missing page to `en-us` one. Maybe @tboerger know that.
Author
Owner

@tboerger commented on GitHub (Jan 6, 2018):

Have you missed to fetch the theme?

@tboerger commented on GitHub (Jan 6, 2018): Have you missed to fetch the theme?
Author
Owner

@AlbertoGP commented on GitHub (Jan 6, 2018):

Oh... I knew nothing about that, but it makes sense. Is it documented somewhere how to do that?

@AlbertoGP commented on GitHub (Jan 6, 2018): Oh... I knew nothing about that, but it makes sense. Is it documented somewhere how to do that?
Author
Owner

@AlbertoGP commented on GitHub (Jan 7, 2018):

Ok, I figured out what happened: the makefile does not download the theme if the directory "themes/gitea" is there, even if empty.
On a fresh Ubuntu install, curl is not included, so the theme rule fails just after creating the empty directory. When you try again after installing curl, the rule is not triggered.
So yes, you are right: the problem was failing to fetch the theme.

One solution is to run make clean which does remove the empty directory.

I propose making the theme rule depend on the "theme.toml" file as in this PR:
Ensure docs makefile downloads theme if failed before. #3322

@AlbertoGP commented on GitHub (Jan 7, 2018): Ok, I figured out what happened: the makefile does not download the theme if the directory "themes/gitea" is there, even if empty. On a fresh Ubuntu install, curl is not included, so the theme rule fails just after creating the empty directory. When you try again after installing curl, the rule is not triggered. So yes, you are right: the problem was failing to fetch the theme. One solution is to run `make clean` which does remove the empty directory. I propose making the theme rule depend on the "theme.toml" file as in this PR: Ensure docs makefile downloads theme if failed before. #3322
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1424