# Blog html is generated into several nested directories

**URL:** <https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841>\
**Category:** Help\
**Created:** [April 17, 2019, 3:22pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841 "2019-04-17T15:22:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![insidetheeye](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@insidetheeye](https://talk.jekyllrb.com/u/insidetheeye)\
**Post date:** [April 17, 2019, 3:22pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841/1 "2019-04-17T15:22:22Z")

</div>

I am new to Jekyll and am currently following along with the [step by step](https://jekyllrb.com/docs/step-by-step/01-setup/) tutorial to get acquainted with the stack.

My issue is that my blog html files which are generated to the `_site` directory end up in nested folders. The folders correspond with the date format required for the blog post markdown files.

Here is a visual of the file structure as it is now (only including relevant directories and files):

```auto
root/
| ____ _posts/
| 2019-04-16-post-01.md
| 2019-04-16-post-02.md
| ____ _site/
| __________ 2019/
| ______________ 04/
| ________________ 16/
| post-01.html
| post-02.html
| __________ assets/
| css/
| styles.css
|
| __________ blog.html
| __________ index.html
|             

```

This means that the css file path which all html is using is incorrect for the blog posts. The path would have to be `../../../assets/css/styles.css`

Can anyone shed some light on why Jekyll generates the blog files nested like this and what the resolution may be?

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [April 17, 2019, 4:10pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841/2 "2019-04-17T16:10:59Z")

</div>

you can change it by changing the permalink if you want, that is just a common way to do it.

You can give the path to your css as: `/assets/css/styles.css` and it will work anywhere and everywhere as the leading / says to start at the root.

---

<div class="post-metadata">

**Author:** ![insidetheeye](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@insidetheeye](https://talk.jekyllrb.com/u/insidetheeye)\
**Post date:** [April 17, 2019, 4:45pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841/3 "2019-04-17T16:45:47Z")

</div>

Ah, that makes sense. I was just poking around the documentation for those. Thank you for the tip!

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [April 17, 2019, 4:51pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841/4 "2019-04-17T16:51:09Z")

</div>

Though, do take note that `/assets/css/styles.css` is valid only when there’s an active server (via remote hosting or locally through command `jekyll serve`).

---

<div class="post-metadata">

**Author:** ![insidetheeye](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@insidetheeye](https://talk.jekyllrb.com/u/insidetheeye)\
**Post date:** [April 17, 2019, 7:35pm UTC](https://talk.jekyllrb.com/t/blog-html-is-generated-into-several-nested-directories/2841/5 "2019-04-17T19:35:11Z")

</div>

Got it, thank you for adding to the conversation!
