Adding front matter to the folder / list page | list page bare HTML issue

Hi.

All of my pages including homepages, posts, and single pages work well and have CSS styles. But my list page /blog doesn’t have any style. I suspect the issue is in the lack of front matter. I had this same issue with single pages before, after I added some JSON front matter to them the issue resolved,

But I don’t know how exactly I should add front matter for this folder. I tried to create an _index.md or _index.html with different front matters but still didn’t work. The folder default name was “posts” and I wanted to change the URL to “blog”. It didn’t work and I had to rename the folder itself.

Please post a link to the public repository for your site. See:
https://discourse.gohugo.io/t/requesting-help/9132

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

1 Like

Hi! I can’t do that because it’s not my repo and it’s not public

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Otherwise, we’re all just guessing…

1 Like

I changed the src for css and I included a {{ .Site.BaseURL }} before /css . I didn’t know I shoud’ve done that. because without {{ .Site.BaseURL }} It was working fine.

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