# Organzing static content

**URL:** <https://discourse.gohugo.io/t/organzing-static-content/11939>\
**Category:** support\
**Created:** [May 11, 2018, 8:28am UTC](https://discourse.gohugo.io/t/organzing-static-content/11939 "2018-05-11T08:28:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Arnonym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robert_arnonym/32/5910_2.png) [@Robert\_Arnonym](https://discourse.gohugo.io/u/Robert_Arnonym)\
**Post date:** [May 11, 2018, 8:28am UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/1 "2018-05-11T08:28:58Z")

</div>

Hello

I have some problems understanding, how static content should be organized.  
I’d prefer to have the content (images + markdown files) together.

I found [this post](https://discourse.gohugo.io/t/discussion-content-organization-best-practice/6360). Structure B describes exactly what I want, but this seems to be obsoleted and page bundles are the “new way to go”.

To be honest: I don’t fully understand the [documentation](https://gohugo.io/content-management/page-bundles/#fn:fn-1)

This leads me to my question: how to archive this? Here is what i have:

Folder Layout:

```
content/blog/2017/postFolder
├── img1.jpg
├── img2.jpg
├── index.md

```

Permalink config:

```
[permalinks]
  blog = "/blog/:year/:month/:title/"

```

result:

```
Request URL: http://localhost:1313/blog/2017/06/some-title/img1.jpg
Request Method: GET
Status Code: 404 Not Found
Remote Address: 127.0.0.1:1313
Referrer Policy: no-referrer-when-downgrade

```

Any idea?

Greetings

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [May 11, 2018, 8:41am UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/2 "2018-05-11T08:41:07Z")

</div>

It is little hard to understand without seeing the project. What is in the /blog folder?

---

<div class="post-metadata">

**Author:** ![Robert\_Arnonym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robert_arnonym/32/5910_2.png) [@Robert\_Arnonym](https://discourse.gohugo.io/u/Robert_Arnonym)\
**Post date:** [May 11, 2018, 10:31am UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/3 "2018-05-11T10:31:27Z")

</div>

Hello @bep

a snipplet of the content folder can be seen in the start post. here is the complete “real live” tree:

```
content
└── blog
    ├── 2016
    │ └── urlaub-in-fiss-in-tirol-der-anreisetag
    │ ├── fiss_hotelzimmer.jpg
    │ └── index.md
    ├── 2017
    │ ├── urlaub-auf-zakyntos-tag1
    │ │ ├── essen.jpg
    │ │ ├── flugzeug.jpg
    │ │ ├── index.md
    │ │ └── zimmer.jpg
    │ ├── urlaub-auf-zakyntos-tag2
    │ │ ├── andreas.jpg
    │ │ ├── beach_restaurant.jpg
    │ │ ├── beach_view.jpg
    │ │ ├── demetrius.jpg
    │ │ ├── fruehstueck.jpg
    │ │ ├── gpx.png
    │ │ ├── index.md
    │ │ ├── nikolaus.jpg
    │ │ ├── oiljoke.jpg
    │ │ ├── oil.jpg
    │ │ ├── virgin_mary.jpg
    │ │ ├── weinprobe.jpg
    │ │ ├── winery.jpg
    │ │ └── yannis.jpg
    │ └── urlaub-auf-zakyntos-tag3
    │ ├── bergsteigen.jpg
    │ ├── biggest_flag.jpg
    │ ├── bluewater.jpg
    │ ├── chrissy.jpg
    │ ├── eiswasser.jpg
    │ ├── geisterdorf.jpg
    │ ├── glassbottomboat.jpg
    │ ├── index.md
    │ ├── new_friends.jpg
    │ ├── seaview.jpg
    │ ├── shipwreck.jpg
    │ ├── sonne1.jpg
    │ ├── sonne2.jpg
    │ ├── sonne3.jpg
    │ ├── taverna_aeras.jpg
    │ └── weontheboat.jpg
    └── 2018

8 directories, 36 files

```

Maybe relevant: The images are included via:

`![essen](essen.jpg)`

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [May 11, 2018, 11:45am UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/4 "2018-05-11T11:45:28Z")

</div>

> [@Robert\_Arnonym](#):
>
> Structure B describes exactly what I want, but this seems to be obsoleted and page bundles are the “new way to go”.

No, it definitely works (just wrote a new blog post yesterday that follows that structure to embed an image and gif).

What does the generated HTML look like?

The raw Markdown image syntax _could possibly_ be a problem, but the HTML snippet for the image should confirm that. I use a `figure` shortcode instead, that always puts in the image permalink instead of a relative path.

Finally, it’s best if you can share the site source; that would be the fastest way for someone to help you debug this.

_Bottom line: That kind of content + image organization works even if not retrieving those images using the Page Bundles + Image Processing methods._

---

<div class="post-metadata">

**Author:** ![Robert\_Arnonym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robert_arnonym/32/5910_2.png) [@Robert\_Arnonym](https://discourse.gohugo.io/u/Robert_Arnonym)\
**Post date:** [May 11, 2018, 12:32pm UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/5 "2018-05-11T12:32:16Z")

</div>

of course, here u are:

A sample snipplet of one of the images:

```
<p>SOME TEXT</p>

<p><img src="glassbottomboat.jpg" alt="Unser Ausflugsboot" /></p>

<p>SOME TEXT</p>

```

URLs I tested:  
[http://localhost:1313/blog/2017/06/urlaub-auf-zakyntos---der-3.-tag/](http://localhost:1313/blog/2017/06/urlaub-auf-zakyntos---der-3.-tag/) (single page)  
[http://localhost:1313/](http://localhost:1313/) (list of last entries)

EDIT:  
I just tried the figure shortcut:

> {{\< figure src=“glassbottomboat.jpg” title=“Unser Ausflugsboot” \>}}

which results in:

```
<figure>
        <img src="glassbottomboat.jpg" />
    <figcaption>
        <h4>Unser Ausflugsboot</h4>
    </figcaption>
</figure>

```

---

<div class="post-metadata">

**Author:** ![Robert\_Arnonym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robert_arnonym/32/5910_2.png) [@Robert\_Arnonym](https://discourse.gohugo.io/u/Robert_Arnonym)\
**Post date:** [May 11, 2018, 5:54pm UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/6 "2018-05-11T17:54:53Z")

</div>

> [@kaushalmodi](#):
>
> Finally, it’s best if you can share the site source; that would be the fastest way for someone to help you debug this.

I created a sample repo to reflect my problem:  
[https://github.com/dakky/sample-support-hugo-discourse](https://github.com/dakky/sample-support-hugo-discourse)

EDIT:  
ok I don’t know what was the problem, but it’s partly solved:  
On the single page view ([http://localhost:1313/blog/2017/06/testtitle/](http://localhost:1313/blog/2017/06/testtitle/)) works fine. maybe some kinde of browser/whatever cache problem?  
But the problem, that there are no images on the frontpage persists. any idea?

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [May 11, 2018, 6:18pm UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/7 "2018-05-11T18:18:16Z")

</div>

> [@Robert\_Arnonym](#):
>
> But the problem, that there are no images on the frontpage persists. any idea?

**yes**!

This issue has come up so often that now I am collecting the references in this hugo issue [thread](https://github.com/gohugoio/hugo/issues/4562#issuecomment-378314838).

When earlier I said:

> [@kaushalmodi](#):
>
> I use a `figure` shortcode instead

I made sure that was grammatically correct, I’m using _a_ `figure` shortcode, not _the_ default one 🙂

Try using the custom `figure` shortcode I reference in that issue thread I linked above… it uses a permalink for `src` in the `<figure>`, that solves the problem of the image not showing on list pages.

---

<div class="post-metadata">

**Author:** ![Robert\_Arnonym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/robert_arnonym/32/5910_2.png) [@Robert\_Arnonym](https://discourse.gohugo.io/u/Robert_Arnonym)\
**Post date:** [May 11, 2018, 6:25pm UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/8 "2018-05-11T18:25:56Z")

</div>

yehaa! that works fine. Are there any plans to push that implementation back to the offical hugo code?

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [May 11, 2018, 6:29pm UTC](https://discourse.gohugo.io/t/organzing-static-content/11939/9 "2018-05-11T18:29:37Z")

</div>

> [@Robert\_Arnonym](#):
>
> Are there any plans to push that implementation back to the offical hugo code?

That particular issue hasn’t been assigned a milestone. So I don’t think there is any plan to bake that fix in.
