alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.42k stars 1.17k forks source link

Can't launch server #415

Closed mroberts1 closed 2 years ago

mroberts1 commented 2 years ago

I can't launch a local server after installing this.

I installed the submodule per instructions and copied config.toml, config.yaml, and the assets and content folders from the theme into my main directory for the repo. I have installed the extended version of Hugo. When I launch the server I get this error:

╰─ hugo server -D                                                                            ─╯
Start building sites … 
hugo v0.92.1-85E2E862 darwin/amd64 BuildDate=2022-01-27T11:44:41Z VendorInfo=gohugoio
ERROR 2022/02/06 09:48:06 Failed to read Git log: fatal: your current branch 'main' does not have any commits yet
WARN 2022/02/06 09:48:06 Page '/overview/configuration/' not found in 'posts/migrate-from-jekyll.md'
WARN 2022/02/06 09:48:06 Page '/layout/templates/' not found in 'posts/migrate-from-jekyll.md'
WARN 2022/02/06 09:48:06 Page '/doc/shortcodes/' not found in 'posts/migrate-from-jekyll.md'
WARN 2022/02/06 09:48:06 Page '/layout/variables' not found in 'posts/goisforlovers.md'
WARN 2022/02/06 09:48:06 Page '/layout/functions' not found in 'posts/goisforlovers.md'
WARN 2022/02/06 09:48:06 Page '/content/front-matter' not found in 'posts/goisforlovers.md'
WARN 2022/02/06 09:48:06 Expand shortcode is deprecated. Use 'details' instead.
Error: Error building site: logged 1 error(s)
Built in 416 ms
mroberts1 commented 2 years ago

I fixed it

MaximilianKohler commented 1 year ago

How? I get the error every time I refresh the page.

Website shows Failed to read Git log: fatal: your current branch 'master' does not have any commits yet logged 1 error(s)

And CMD shows:

Change of config file detected, rebuilding site.
2023-02-13 03:23:20.173 -0800
ERROR 2023/02/13 03:23:20 Failed to read Git log: fatal: your current branch 'master' does not have any commits yet
WARN 2023/02/13 03:23:20 Expand shortcode is deprecated. Use 'details' instead.
WARN 2023/02/13 03:23:20 Page '/overview/configuration/' not found in 'posts\migrate-from-jekyll.md'
WARN 2023/02/13 03:23:20 Page '/layout/templates/' not found in 'posts\migrate-from-jekyll.md'
WARN 2023/02/13 03:23:20 Page '/doc/shortcodes/' not found in 'posts\migrate-from-jekyll.md'
WARN 2023/02/13 03:23:20 Page '/layout/variables' not found in 'posts\goisforlovers.md'
WARN 2023/02/13 03:23:20 Page '/layout/functions' not found in 'posts\goisforlovers.md'
WARN 2023/02/13 03:23:20 Page '/content/front-matter' not found in 'posts\goisforlovers.md'
ERROR 2023/02/13 03:23:20 logged 1 error(s)
Rebuilt in 258 ms

EDIT; enableGitInfo = false may have fixed it.

badele commented 6 months ago

I fixed it

@mroberts1 When fixing, it would be nice to give the solution!

Thanks @MaximilianKohler for your solution