documentation icon indicating copy to clipboard operation
documentation copied to clipboard

should be of type string

Open lliuhaomin opened this issue 4 years ago • 4 comments

Building sites … WARN 2021/03/19 17:13:44 .File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }} Built in 368 ms Error: Error building site: "D:\workResource\workRecode\2021.3.19 hugo\documentation-release-1.22.0\content\docs\1.14\cli.md:13:1": failed to render shortcode "cli/tools-list": failed to process shortcode: "D:\workResource\workRecode\2021.3.19 hugo\documentation-release-1.22.0\themes\jaeger-docs\layouts\shortcodes\cli\tools-list.html:4:15": execute of template failed: template: shortcodes/cli/tools-list.html:4:15: executing "shortcodes/cli/tools-list.html" at <index site.Data.cli $version>: error calling index: value is nil; should be of type string

lliuhaomin avatar Mar 19 '21 09:03 lliuhaomin

Which Hugo version?

yurishkuro avatar Mar 19 '21 14:03 yurishkuro

0.65

image

lliuhaomin avatar Mar 22 '21 00:03 lliuhaomin

Could be Winwows-related, we do not support building docs on Windows.

I tried latest hugo, works fine on Mac:

$ hugo version
hugo v0.82.0+extended darwin/amd64 BuildDate=unknown

$ make develop
HUGO_PREVIEW=true hugo server \
        --buildDrafts \
        --buildFuture \
	--ignoreCache
Start building sites …
WARN 2021/03/21 20:57:33 .File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }}

                   | EN
-------------------+------
  Pages            | 305
  Paginator pages  |   0
  Non-page files   |   0
  Static files     |  23
  Processed images |   0
  Aliases          |   0
  Sitemaps         |   1
  Cleaned          |   0

Built in 3523 ms
Watching for changes in /jaegertracing/documentation/{content,data,static,themes}
Watching for config changes in /jaegertracing/documentation/config.toml
Environment: "development"
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

yurishkuro avatar Mar 22 '21 00:03 yurishkuro

Just look at the website effect, we can start it with docker

The command is as follows:

docker run -v $PWD/documentation:/src -p 1313:1313 klakegg/hugo:0.82.0-ext-alpine server --disableFastRender --bind="0.0.0.0" --baseUrl="192.168.0.41"

lliuhaomin avatar Mar 23 '21 01:03 lliuhaomin