adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
10.26k stars 2.72k forks source link

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

Open note4 opened 3 months ago

note4 commented 3 months ago

问题之前在 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

https://github.com/gohugoio/hugo/issues/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
adityatelange commented 3 months ago

I don't get all the issue yet, can you share a sample repo where this can be reproduced? I think this is a issue with multilingual pages but I cant reproduce it nor do I see this happening in examplesite/demo.