# Hugo don't load css on single page

**URL:** <https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404>\
**Category:** support\
**Created:** [November 2, 2021, 8:04am UTC](https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404 "2021-11-02T08:04:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dugajimi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dugajimi/32/11698_2.png) [@dugajimi](https://discourse.gohugo.io/u/dugajimi)\
**Post date:** [November 2, 2021, 8:04am UTC](https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404/1 "2021-11-02T08:04:40Z")

</div>

Hi guys,  
I started a theme developing for Hugo.  
May be it’s a trivial mistake not related to Hugo itself but I have a problem on rendering pages.

The homepage it’s rendereded correcly but single post don’t load \*.css.  
I suppose it’s a problem of priority order of lookup rendering roles but I’m not able to solve.

Can you look on my code?  
[Arberia Theme](https://github.com/antedoro/Arberia.git)

May be it’s simple solution.

Thanks  
Vincenzo Antedoro

---

<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 2, 2021, 8:59am UTC](https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404/2 "2021-11-02T08:59:38Z")

</div>

Your paths are relative to the current page, not to the site root.

> <https://github.com/antedoro/Arberia/blob/master/themes/arberia/layouts/partials/head.html#L47-L52>

---

<div class="post-metadata">

**Author:** ![dugajimi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dugajimi/32/11698_2.png) [@dugajimi](https://discourse.gohugo.io/u/dugajimi)\
**Post date:** [November 2, 2021, 1:28pm UTC](https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404/3 "2021-11-02T13:28:13Z")

</div>

Thanks jmooring.  
This mistake was solved introducind _absURL_ path, like this:

`<link rel="stylesheet" type="text/css" href="{{ "css/realpython.css" | absURL }}">`

Question: It’s better  
`absURL`  
or  
`relURL`?

---

<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 2, 2021, 9:12pm UTC](https://discourse.gohugo.io/t/hugo-dont-load-css-on-single-page/35404/4 "2021-11-02T21:12:07Z")

</div>

> [@dugajimi](#):
>
> Question: It’s better  
> `absURL`  
> or  
> `relURL` ?

This is largely a matter of opinion and context. Historically, some RSS readers have not behaved well with relative URLs, but I don’t know if that’s still true. Some argue that absolute URLs are an important aspect of search engine optimization, but I think that was de-bunked by Google several years ago.
