Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在正常配置下 /posts 页面丢失(404) #12

Closed
rewired-gh opened this issue Jul 25, 2020 · 6 comments
Closed

在正常配置下 /posts 页面丢失(404) #12

rewired-gh opened this issue Jul 25, 2020 · 6 comments

Comments

@rewired-gh
Copy link

例如:https://hopp.top/posts

在范例网站中可以正常显示,但是在我自己搭建的网站中无法显示。我已经彻底排查了一遍配置,还是找不到问题。有可能是因为该主题在某次更新后破坏了该功能。

我的代码仓库:https://github.com/h0gan1ee/novela-hugo-starter

@varkai
Copy link
Owner

varkai commented Jul 27, 2020

例如:https://hopp.top/posts

在范例网站中可以正常显示,但是在我自己搭建的网站中无法显示。我已经彻底排查了一遍配置,还是找不到问题。有可能是因为该主题在某次更新后破坏了该功能。

我的代码仓库:https://github.com/h0gan1ee/novela-hugo-starter

hugo的版本是多少?

@rewired-gh
Copy link
Author

例如:https://hopp.top/posts
在范例网站中可以正常显示,但是在我自己搭建的网站中无法显示。我已经彻底排查了一遍配置,还是找不到问题。有可能是因为该主题在某次更新后破坏了该功能。
我的代码仓库:https://github.com/h0gan1ee/novela-hugo-starter

hugo的版本是多少?

netlify.toml 文件中:

[build]
  publish = "public"
  command = "hugo --gc --minify"

[context.production.environment]
  HUGO_VERSION = "0.72.0"
  HUGO_ENV = "production"
  HUGO_ENABLEGITINFO = "true"

与 ExampleSite 的配置一致。

@rewired-gh
Copy link
Author

Netlify 部署日志(本地部署时也遇到一样的情况):

2:30:25 PM: Build ready to start
2:30:27 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
2:30:27 PM: build-image tag: v3.3.20
2:30:27 PM: buildbot version: be8ecf2af866e16fa4301cc5c14de2ccbbb21cf4
2:30:27 PM: Fetching cached dependencies
2:30:27 PM: Starting to download cache of 99.4MB
2:30:28 PM: Finished downloading cache in 831.17799ms
2:30:28 PM: Starting to extract cache
2:30:31 PM: Finished extracting cache in 3.032528874s
2:30:31 PM: Finished fetching cache in 3.898762789s
2:30:31 PM: Starting to prepare the repo for build
2:30:32 PM: Preparing Git Reference refs/heads/master
2:30:33 PM: Starting build script
2:30:33 PM: Installing dependencies
2:30:33 PM: Python version set to 2.7
2:30:34 PM: Started restoring cached node version
2:30:36 PM: Finished restoring cached node version
2:30:37 PM: v12.18.0 is already installed.
2:30:37 PM: Now using node v12.18.0 (npm v6.14.4)
2:30:37 PM: Started restoring cached build plugins
2:30:37 PM: Finished restoring cached build plugins
2:30:38 PM: Attempting ruby version 2.7.1, read from environment
2:30:39 PM: Using ruby version 2.7.1
2:30:39 PM: Using PHP version 5.6
2:30:39 PM: 5.2 is already installed.
2:30:39 PM: Using Swift version 5.2
2:30:39 PM: Installing Hugo 0.72.0
2:30:39 PM: Hugo Static Site Generator v0.72.0-8A7EF3CF/extended linux/amd64 BuildDate: 2020-05-31T12:14:23Z
2:30:39 PM: Started restoring cached go cache
2:30:39 PM: Finished restoring cached go cache
2:30:39 PM: go version go1.14.4 linux/amd64
2:30:39 PM: go version go1.14.4 linux/amd64
2:30:39 PM: Installing missing commands
2:30:39 PM: Verify run directory
2:30:40 PM: ​
2:30:40 PM: ┌─────────────────────────────┐
2:30:40 PM: │        Netlify Build        │
2:30:40 PM: └─────────────────────────────┘
2:30:40 PM: ​
2:30:40 PM: ❯ Version
2:30:40 PM:   @netlify/build 3.0.1
2:30:40 PM: ​
2:30:40 PM: ❯ Flags
2:30:40 PM:   deployId: 5f1d23019d7baa0007b03839
2:30:40 PM:   mode: buildbot
2:30:40 PM: ​
2:30:40 PM: ❯ Current directory
2:30:40 PM:   /opt/build/repo
2:30:40 PM: ​
2:30:40 PM: ❯ Config file
2:30:40 PM:   /opt/build/repo/netlify.toml
2:30:40 PM: ​
2:30:40 PM: ❯ Context
2:30:40 PM:   production
2:30:40 PM: ​
2:30:40 PM: ┌────────────────────────────────────┐
2:30:40 PM: │ 1. build.command from netlify.toml │
2:30:40 PM: └────────────────────────────────────┘
2:30:40 PM: ​
2:30:40 PM: $ hugo --gc --minify
2:30:40 PM: Building sites …
2:30:40 PM:                    | ZH-CN
2:30:40 PM: -------------------+--------
2:30:40 PM:   Pages            |    29
2:30:40 PM:   Paginator pages  |     1
2:30:40 PM:   Non-page files   |     0
2:30:40 PM:   Static files     |    20
2:30:40 PM:   Processed images |     0
2:30:40 PM:   Aliases          |     1
2:30:40 PM:   Sitemaps         |     1
2:30:40 PM:   Cleaned          |     0
2:30:40 PM: Total in 57 ms
2:30:40 PM: ​
2:30:40 PM: (build.command completed in 112ms)
2:30:40 PM: ​
2:30:40 PM: ┌─────────────────────────────┐
2:30:40 PM: │   Netlify Build Complete    │
2:30:40 PM: └─────────────────────────────┘
2:30:40 PM: ​
2:30:40 PM: (Netlify Build completed in 131ms)
2:30:40 PM: Caching artifacts
2:30:40 PM: Started saving build plugins
2:30:41 PM: Finished saving build plugins
2:30:41 PM: Started saving pip cache
2:30:41 PM: Finished saving pip cache
2:30:41 PM: Started saving emacs cask dependencies
2:30:41 PM: Finished saving emacs cask dependencies
2:30:41 PM: Started saving maven dependencies
2:30:41 PM: Finished saving maven dependencies
2:30:41 PM: Started saving boot dependencies
2:30:41 PM: Finished saving boot dependencies
2:30:41 PM: Started saving go dependencies
2:30:41 PM: Finished saving go dependencies
2:30:41 PM: Build script success
2:30:41 PM: Starting to deploy site from 'public'
2:30:41 PM: Creating deploy tree 
2:30:41 PM: Creating deploy upload records
2:30:41 PM: 2 new files to upload
2:30:41 PM: 0 new functions to upload
2:30:41 PM: Starting post processing
2:30:41 PM: Post processing - HTML
2:30:42 PM: Post processing - redirect rules
2:30:42 PM: Post processing - header rules
2:30:42 PM: Post processing done
2:30:42 PM: Site is live
2:30:55 PM: Finished processing build request in 28.179157031s

@varkai
Copy link
Owner

varkai commented Jul 27, 2020

@rewired-gh
Copy link
Author

https://github.com/h0gan1ee/novela-hugo-starter/tree/master/content/post

这里文件夹应该使用 posts

啊这……好的,谢谢了!

@varkai varkai closed this as completed Jul 27, 2020
@rewired-gh
Copy link
Author

rewired-gh commented Jul 27, 2020

之前我用的那个主题目录结构不太一样,没有发现少了个s😅。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants