HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.19k stars 2.9k forks source link

Build fails on Windows: "Error: Could not find author page at..." #1068

Closed ImAlexisSaez closed 5 years ago

ImAlexisSaez commented 5 years ago

I have updated the theme (4.2.5 to '4.3') and renamed the folder author to authors. I get this error when building:

Building sites … ERROR 2019/05/06 11:40:53 Could not find an author page at `/authors/authors%5Cadmin%5C`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist. See https://sourcethemes.com/academic/docs/page-builder/#about
Total in 2443 ms
Error: Error building site: logged 1 error(s)

Repo: https://github.com/ImAlexisSaez/academic-kickstart

gcushen commented 5 years ago

Something is wrong with where your git submodule is pointing:

git clone https://github.com/ImAlexisSaez/academic-kickstart.git acad-test && cd $_
git submodule update --init --recursive

Server does not allow request for unadvertised object ce011c65aa9a538d1e6086d8fa4ba232efb90e36 Fetched in submodule path 'themes/academic', but it did not contain ce011c65aa9a538d1e6086d8fa4ba232efb90e36. Direct fetching of that commit failed.

After placing the latest (master) Academic files in themes/academic/, it works fine:

➜ hugo

                   | EN
+------------------+-----+
  Pages            | 300
  Paginator pages  |  38
  Non-page files   | 157
  Static files     |  14
  Processed images | 352
  Aliases          |  68
  Sitemaps         |   1
  Cleaned          |   0

Total in 686 ms
ImAlexisSaez commented 5 years ago

Hi, sorry for 'reopen' the issue.

Yesterday, I deleted the whole repository and tried to start the website from scratch (git option). I got the same error related to the 'autors' (same message that appears in the first post).

However, if I modify \layouts\partials\widgets\about.html:

{{ $person_page_path := (printf "/authors/%s" (urlize $author)) }}
{{ $person_page := site.GetPage $person_page_path }}

to

{{ $person_page_path := (printf "/authors/%s" (urlize $author)) }}
{{ $person_page := site.GetPage "/authors/admin" }}

Now I can visualize locally my webpage using ./view.sh. I've found this solution here, but I don't know if this is a possible bug.

gcushen commented 5 years ago

For reference, your site compiled fine with Hugo v0.55.5 and the latest Academic master (8857bff) on Mac/Linux.

gcushen commented 5 years ago

Ah, I believe you are using Windows. The issue appears to be caused by the backward slashes in Windows paths.

ImAlexisSaez commented 5 years ago

That's right, I'm a Windows user.

gcushen commented 5 years ago

Thanks for reporting this and helping us to investigate the cause of the issue. If you update to the latest master version of Academic you'll pick up the fix :)

ImAlexisSaez commented 5 years ago

I'm testing it and it works without having to manually change the layout. Thank you ^^.

saxarona commented 4 years ago

Hello, Windows user here with exact same problem and solution, so I guess the bug re-appeared.

I'm using hugo v0.63.2/extended windows/amd64, with academic 4.7.0.

Could not find an author page at `/author/sax`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist.

Solved by hardcoding the path in about.html, line 12 (as stated in a comment above):

{{ $person_page := site.GetPage "/authors/admin" }}