【发布时间】:2018-11-18 00:36:33
【问题描述】:
我正在运行一个静态的blogdown 站点并将其部署在 Netlify 上。我在 GitHub 上获取文件,Hugo 构建站点,Netlify 部署它。
Netlify 报告该站点处于活动状态(部署日志附在底部),但是当我尝试查看我的站点时,我看到的只是 Netlify 错误消息:
找不到页面
您似乎点击了一个损坏的链接或输入了该网站上不存在的 URL。
←返回我们的网站
可能是什么原因?
我的 GitHub 仓库:https://github.com/taraskaduk/taraskaduk
我的网址应该是网站:https://taraskaduk.com/
我的部署设置:
Repository: https://github.com/taraskaduk/taraskaduk
Build command: hugo
Publish directory: public
Production branch: master
Branch deploys: Deploy only the production branch and its deploy previews
Public deploy logs: Logs are public
雨果版(我试过不同的)
HUGO_VERSION 0.37.1
我最新的部署日志:
9:56:27 PM: Build ready to start
9:56:28 PM: Fetching cached dependencies
9:56:29 PM: Starting to download cache of 172.4MB
9:56:30 PM: Finished downloading cache in 1.74774892s
9:56:30 PM: Starting to extract cache
9:56:33 PM: Finished extracting cache in 2.59393707s
9:56:33 PM: Finished fetching cache in 4.428746301s
9:56:33 PM: Starting to prepare the repo for build
9:56:33 PM: Preparing Git Reference refs/heads/master
9:56:34 PM: Starting build script
9:56:34 PM: Installing dependencies
9:56:35 PM: Started restoring cached node version
9:56:37 PM: Finished restoring cached node version
9:56:37 PM: v8.11.2 is already installed.
9:56:38 PM: Now using node v8.11.2 (npm v5.6.0)
9:56:38 PM: Attempting ruby version 2.3.6, read from environment
9:56:39 PM: Using ruby version 2.3.6
9:56:39 PM: Using PHP version 5.6
9:56:39 PM: Installing Hugo 0.37.1
9:56:39 PM: Started restoring cached go cache
9:56:39 PM: Finished restoring cached go cache
9:56:39 PM: unset GOOS;
9:56:39 PM: unset GOARCH;
9:56:39 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
9:56:39 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
9:56:39 PM: go version >&2;
9:56:39 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
9:56:39 PM: go version go1.10 linux/amd64
9:56:39 PM: Installing missing commands
9:56:40 PM: Verify run directory
9:56:40 PM: Executing user command: hugo
9:56:40 PM: Building sites …
9:56:40 PM:
9:56:40 PM: | EN
9:56:40 PM: +------------------+----+
9:56:40 PM: Pages | 6
9:56:40 PM: Paginator pages | 0
9:56:40 PM: Non-page files | 49
9:56:40 PM: Static files | 39
9:56:40 PM: Processed images | 0
9:56:40 PM: Aliases | 4
9:56:40 PM: Sitemaps | 1
9:56:40 PM: Cleaned | 0
9:56:40 PM: Total in 522 ms
9:56:40 PM: Caching artifacts
9:56:40 PM: Started saving pip cache
9:56:40 PM: Finished saving pip cache
9:56:40 PM: Started saving emacs cask dependencies
9:56:40 PM: Finished saving emacs cask dependencies
9:56:40 PM: Started saving maven dependencies
9:56:40 PM: Finished saving maven dependencies
9:56:40 PM: Started saving boot dependencies
9:56:40 PM: Finished saving boot dependencies
9:56:40 PM: Started saving go dependencies
9:56:40 PM: Finished saving go dependencies
9:56:40 PM: Build script success
9:56:40 PM: Starting to deploy site from 'public'
9:56:41 PM: Starting post processing
9:56:41 PM: Post processing done
9:56:41 PM: Site is live
【问题讨论】:
-
您是否尝试将
config.toml中的baseurl 设置为您的网站地址(以斜杠结尾)?我还没有看到导致“页面未找到”的情况,但我看到人们在谈论 it causing other problems -
是的,我有。事实上就是这样。我只是尝试将其更改为“/”以查看它是否有任何作用。它没有...
-
好吧,开枪吧,我没主意了。整个“重定向”线程让我觉得它可能与 index.html 有关,但据我所知,我的 [学术主题网站])github.com/aosmith16/academic) 使用的是同一个线程。希望你能解决问题!
-
我认为您的问题与重定向无关,因为您没有
static/_redirects。我也不认为它与 blogdown 相关,因为它在本地运行良好。我没有像@aosmith这样的想法。您可以联系 Netlify 支持,看看他们是否有任何想法。 -
其实你可以在Netlify上把
hugo的命令改成hugo -v,这样可能会泄露更多信息。