Skip to content

[BUG]One file generates two pages and is duplicated in categories, tags and archives. #1569

Open
@note4

Description

@note4

问题之前在 hugo 发布过,后来发现只是在 papermod 有该问题,其他主题没有这样的问题。
The problem was previously posted at hugo, and then it turned out that it was only at papermod that had the problem, and that other themes did not have such a problem.

hugo issues

gohugoio/hugo#12685

image

一个文件生成两个页面,并且在分类、标签和归档中重复出现。
One file generates two pages and is duplicated in categories, tags and archives.

内容会自动重复生成,且路径不同,如果配置了 url 就会有路径和内容一样的两个页面。config.yml配置如下:

The content will be automatically duplicated sheng generation, and the path is different, if you configure the url will have the same path and content of the two pages. config.yml configuration is as follows:


defaultContentLanguage: zh
defaultContentLanguageInSubdir: false

taxonomies:
  category: categories
  tag: tags
  series: series

permalinks:
  posts: "/log/:filename/"
  categories: "/:slug/"
  tags: "/tags/:slug/"
  series: "/series/:slug/"
  
languages:
  zh:
    languageName: "中文"
    weight: 1
    contentDir: "content/zh"

文件路径如下:
The file path is as follows:
image

hugo version

$ hugo version
hugo v0.121.1+extended darwin/amd64 BuildDate=unknown VendorInfo=macports

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions