Bad rendering of the local index.html from public folder using HUGO

I am creating a web using RStudio and HUGO, by means of the Blogdown package.

When serving the site locally in RStudio, it seems to be rendered properly. All the files are created within the folder /public.

[![enter image description here][1]][1]

However, when I open the file index.html from the /public folder, I get this appearance.

[![enter image description here][2]][2]

I am employing the theme Mainroad with this base URL:

baseurl = "/"

Any idea why when opening the HTML file it is not rendered properly?

I have never used blogdown. But if you are trying to browse the site from your local filesystem, you’ll need to set relativeURLs to true, and uglyURLs to true.

If you’re going to deploy your site to a web server somewhere, then you’ll need to set your baseURL to your actual site URL.

Thanks for answering so quick. Where should I write relativeURLs and uglyURLs? At the top of the config.toml file?

Yep that will work

It worked nicely. Thanks

Hi. Hope you are doing good. I added those 2 lines of code, but still getting same page