Configured correctly but cannot find the article

I tried to get AI to solve my problem, but no matter how I modify it, I can’t find the article. Clicking on the article in the top right corner shows a 404.

This is my yml configuration:

baseURL: "https://truthblog.pages.dev"
languageCode: zh-CN
title: truth-blog
theme: PaperMod

params:
  author: truth-blog
  description: "探寻真相"
  ShowReadingTime: true
  ShowPostNavLinks: true
  ShowCodeCopyButtons: true

# === 多语言配置 ===
defaultContentLanguage: zh

languages:
  # 简体中文配置
  zh:
    weight: 1
    languageName: 简体中文
    contentDir: zh
    title: 探寻真相
    mainSections:
    - article
    
    # 简体中文菜单
    menu:
      main:
        - name: 首页
          url: /
          weight: 1
        - name: 文章
          url: /zh/article/
          weight: 2
        - name: 关于
          url: /zh/about/
          weight: 3

  # 繁体中文配置
  zh-hk:
    weight: 2
    languageName: 繁體中文
    contentDir: zh-hk
    title: 探尋真相
    mainSections:
    - article
    
    # 繁体中文菜单
    menu:
      main:
        - name: 首頁
          url: /
          weight: 1
        - name: 文章
          url: /zh-hk/article/
          weight: 2
        - name: 關於
          url: /zh-hk/about/
          weight: 3

  # 英文配置
  en:
    weight: 3
    languageName: English
    contentDir: en
    title: Seeking the Truth
    mainSections:
    - article
    
    # 英文菜单
    menu:
      main:
        - name: Home
          url: /
          weight: 1
        - name: Article
          url: /en/article/
          weight: 2
        - name: About
          url: /en/about/
          weight: 3

This is my article configuration:

---
date: 2026-05-08T16:39:49+08:00
draft: false
title: 20260508TW
translationKey: "20260508TW"
---

This is my GitHub repository link:

Github link

Papermod docs are bare about multilingual but the example site uses translation by filename.

this seem to work:

remove the contentDir:attribute from the language definitions and change your content structure to:

content
└───article
        20260508TW.en.md
        20260508TW.zh-hk.md
        20260508TW.zh.md
        _index-zh.md
        _index.en.md
        _index.zh-hk.md

don’t forget to use -D (–buildDrafts)

didn’t dive in too deep to identify the root cause: your setup, theme or hugo. you could raise an issue on the PaperMod gitub.

Thank you so much

You can either translate by directory or translate by filename… that’s not the problem.

The problem is with your site configuration. Your values for contentDir are wrong, and you should be using the pageRef property instead of the url property for your menu entries. This config works as expected:

baseURL: "https://truthblog.pages.dev"
languageCode: zh-CN
title: truth-blog
theme: PaperMod

params:
  author: truth-blog
  description: "探寻真相"
  ShowReadingTime: true
  ShowPostNavLinks: true
  ShowCodeCopyButtons: true

# === 多语言配置 ===
defaultContentLanguage: zh
defaultContentLanguageInSubdir: true

languages:
  # 简体中文配置
  zh:
    weight: 1
    languageName: 简体中文
    contentDir: content/zh
    title: 探寻真相
    mainSections:
    - article

    # 简体中文菜单
    menu:
      main:
        - name: 首页
          pageRef: /
          weight: 1
        - name: 文章
          pageRef: /article/
          weight: 2
        - name: 关于
          pageRef: /about/
          weight: 3

  # 繁体中文配置
  zh-hk:
    weight: 2
    languageName: 繁體中文
    contentDir: content/zh-hk
    title: 探尋真相
    mainSections:
    - article

    # 繁体中文菜单
    menu:
      main:
        - name: 首頁
          pageRef: /
          weight: 1
        - name: 文章
          pageRef: /article/
          weight: 2
        - name: 關於
          pageRef: /about/
          weight: 3

  # 英文配置
  en:
    weight: 3
    languageName: English
    contentDir: content/en
    title: Seeking the Truth
    mainSections:
    - article

    # 英文菜单
    menu:
      main:
        - name: Home
          pageRef: /
          weight: 1
        - name: Article
          pageRef: /article/
          weight: 2
        - name: About
          pageRef: /about/
          weight: 3

Ouch, how blind can one be :blush:

Thank you very much for your answer, the issue has been resolved.