Hugo Content (Markdown) Directory Organization

Typical Hugo Content Structure

A common setup places each post under content/post/<post-folder>/, with index.md and related images in the same folder.

This works well for small sites, but as post count grows, the top-level directory can become crowded and hard to manage.

Suggested Time-Based Structure

A cleaner approach is organizing by year (or year/month/day):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
content/
  post/
    2020/
      1.zh-cn.md
      1.zh-tw.md
      2/
        index.zh-cn.md
        index.zh-tw.md
        1.jpg
        ...
    2021/
      ...
    2022/
      ...

Guidelines:

  • Group posts by year first (or finer granularity if preferred).
  • Posts without images can stay as standalone markdown files.
  • Posts with images should use a dedicated folder and index.lang.md naming.
  • Keep multilingual files together using index.<lang>.md (for example index.zh-cn.md, index.zh-tw.md).
记录并分享
Built with Hugo
Theme Stack designed by Jimmy