在Netlify上找不到Hugo的页面

时间:2019-09-17 00:53:17

标签: hugo netlify netlify-cms

我最近将一个我自己写的网站翻译成了hugo,所以我没有使用主题,我在localhost上对其进行了测试,并且运行完美,但是,当尝试在netlify上进行托管时,出现页面未找到错误。我已经在netlify.toml文件和netlify的连续部署设置中将发布目录设置为公共,如下所示:

netlify.toml,

7:31:10 PM: Build ready to start
7:31:14 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
7:31:14 PM: build-image tag: v3.3.2
7:31:14 PM: buildbot version: 38cc4984170575781fef71bee035f0855939acb8
7:31:15 PM: Fetching cached dependencies
7:31:15 PM: Starting to download cache of 99.9MB
7:31:15 PM: Finished downloading cache in 606.906388ms
7:31:15 PM: Starting to extract cache
7:31:19 PM: Finished extracting cache in 4.22330485s
7:31:20 PM: Finished fetching cache in 4.879888251s
7:31:20 PM: Starting to prepare the repo for build
7:31:20 PM: Preparing Git Reference refs/heads/master
7:31:20 PM: Found netlify.toml. Overriding site configuration
7:31:20 PM: Starting build script
7:31:20 PM: Installing dependencies
7:31:21 PM: Started restoring cached node version
7:31:24 PM: Finished restoring cached node version
7:31:25 PM: v10.16.3 is already installed.
7:31:26 PM: Now using node v10.16.3 (npm v6.9.0)
7:31:26 PM: Attempting ruby version 2.6.2, read from environment
7:31:28 PM: Using ruby version 2.6.2
7:31:28 PM: Using PHP version 5.6
7:31:28 PM: Installing Hugo 0.53
7:31:28 PM: Hugo Static Site Generator v0.53-8FC339DC2529FF77E494A1C12CD1FF9FBCB880A4/extended             
linux/amd64 BuildDate: 2018-12-24T08:38:38Z
7:31:28 PM: Started restoring cached go cache
7:31:28 PM: Finished restoring cached go cache
7:31:28 PM: unset GOOS;
7:31:28 PM: unset GOARCH;
7:31:28 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
7:31:28 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
7:31:28 PM: go version >&2;
7:31:28 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
7:31:28 PM: go version go1.12 linux/amd64
7:31:28 PM: Installing missing commands
7:31:28 PM: Verify run directory
7:31:28 PM: Executing user command: hugo
7:31:28 PM: Building sites …
7:31:29 PM:                    | EN
7:31:29 PM: +------------------+----+
7:31:29 PM: Pages            |  1
7:31:29 PM:   Paginator pages  |  0
7:31:29 PM:   Non-page files   |  0
7:31:29 PM:   Static files
7:31:29 PM:  | 69
7:31:29 PM:   Processed images |  0
7:31:29 PM:   Aliases          |  0
7:31:29 PM:   Sitemaps         |  1
7:31:29 PM:   Cleaned          |  0
7:31:29 PM: Total in 37 ms
7:31:29 PM: Skipping functions preparation step: no functions directory set
7:31:29 PM: Caching artifacts
7:31:29 PM: Started saving pip cache
7:31:29 PM: Finished saving pip cache
7:31:29 PM: Started saving emacs cask dependencies
7:31:29 PM: Finished saving emacs cask dependencies
7:31:29 PM: Started saving maven dependencies
7:31:29 PM: Starting post processing
7:31:29 PM: Finished saving maven dependencies
7:31:29 PM: Started saving boot dependencies
7:31:29 PM: Finished saving boot dependencies
7:31:29 PM: Started saving go dependencies
7:31:29 PM: Finished saving go dependencies
7:31:29 PM: Post processing done
7:31:29 PM: Build script success
7:31:29 PM: Starting to deploy site from 'public'
7:31:29 PM: Creating deploy tree 
7:31:29 PM: 0 new files to upload
7:31:29 PM: 0 new functions to upload
7:31:29 PM: Site is live
7:31:47 PM: Finished processing build request in 32.861294195s

和: Netlify's config

我认为我已经遵循了那里的所有指南,而且似乎没有任何作用。

这是我在github https://github.com/guidogr95/amazondigital上的仓库的链接

也是上次部署日志:

myArray[index]

下载部署文件时,我注意到没有index.html,只有这些文件:

Deployment files

我尝试在本地环境中使用“ hugo”命令并上载创建的公用文件夹,这样做会显示该站点,但这并不是正确的方法,我也想使用netlify cms方法不起作用。 拜托,任何帮助将不胜感激,在此先感谢

1 个答案:

答案 0 :(得分:0)

这里的问题是文件名的大小写问题。 Windows在某些情况下会忽略大小写,当文件的大小写应为小写时,它将解析文件的路径。在这种情况下,Netlify上的构建环境正在使用unix,因此Hugo看不到模板baseof.html

/layouts/_default/baseOf.html更改为所有小写的/layouts/_default/baseof.html