# How do I have one folder for each blog post containing all of the assets?

**URL:** <https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438>\
**Category:** support\
**Created:** [November 13, 2022, 2:48pm UTC](https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438 "2022-11-13T14:48:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericswpark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ericswpark/32/18185_2.png) [@ericswpark](https://discourse.gohugo.io/u/ericswpark)\
**Post date:** [November 13, 2022, 2:48pm UTC](https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438/1 "2022-11-13T14:48:46Z")

</div>

(For reference, here is what my Hugo repository currently looks like: [GitHub - ericswpark/ericswpark.github.io: Main website](https://github.com/ericswpark/ericswpark.github.io)  
And a link to the site (latest commit on `master` branch): [https://ericswpark.com](https://ericswpark.com))

* * *

Right now I have the directory structure set up like this:

```auto
content/
  blog/
    2018/
      2018-02-21-sample-post.en.md
      2018-02-21-sample-post.ko.md
static/
  img/
    2018/
      sample-post/
        example.jpg

```

I am wondering if something like this is possible:

```auto
content/
  blog/
    2018/
      sample-post/
        2018-02-21-sample-post.en.md
        2018-02-21-sample-post.ko.md
        example.jpg

```

Couple of advantages:

- I can clearly see what asset belongs to which blog post
- Easier linking? Right now I directly do something like `![example](/img/2018/example.jpg)` which _feels_ wrong.

I read through the documentation and found the “page bundles” thing, but the documentation on it is incomplete and from what I can gather the final URL will end up something like the following:

https: ericswpark/blog/2018/sample-post/2018-02-21-sample-post/

But I want it to look like this:

https: ericswpark/blog/2018/2018-02-21-sample-post/

_Without_ manually setting it in the front matter.

Is this possible or should I structure my repository in a different way? Also, if it is possible, how should I “correctly” import images and other assets within the Markdown files?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [November 13, 2022, 4:07pm UTC](https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438/2 "2022-11-13T16:07:51Z")

</div>

With this content structure:

```nohighlight
content/
├── blog/
│ └── 2018/
│ └── 2018-02-21-sample-post/
│ ├── a.jpg
│ ├── index.en.md
│ └── index.ko.md
└── _index.md

```

The URLs will be:

```nohighlight
http://example.org/en/blog/2018/2018-02-21-sample-post/
http://example.org/ko/blog/2018/2018-02-21-sample-post/

```

See [https://gohugo.io/content-management/page-bundles/#leaf-bundles](https://gohugo.io/content-management/page-bundles/#leaf-bundles)

---

<div class="post-metadata">

**Author:** ![ericswpark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ericswpark/32/18185_2.png) [@ericswpark](https://discourse.gohugo.io/u/ericswpark)\
**Post date:** [November 16, 2022, 2:49pm UTC](https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438/3 "2022-11-16T14:49:21Z")

</div>

Thank you so much! It worked.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [November 18, 2022, 2:50pm UTC](https://discourse.gohugo.io/t/how-do-i-have-one-folder-for-each-blog-post-containing-all-of-the-assets/41438/4 "2022-11-18T14:50:04Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
