2

I am using Hugo http://hugo.spf13.com/overview/introduction to render a folder with html/css/js files as localhost in my laptop.

I have html files in /content and all js/css/img files in /static folder

This is content in config.toml

baseurl = "http://localhost"
contentdir = "content"
languageCode = "en-us"
title = "my new hugo site"

I did hugo server and it rendered /public folder just fine. But all .html files now turning into .xml files and I cannot open them in browser like http://localhost:1313/index.html or so.

What did I do wrong?

HP.
  • 19,226
  • 53
  • 154
  • 253

2 Answers2

1

Did you setup a theme yet? Without a theme, Hugo will render files as XML, if you read the documentation on themes, that should give you what you need.

chaseadamsio
  • 883
  • 5
  • 11
1

First you have to clone themes from github.com/spf13/hugoThemes

In my case I did'nt have git install in my test machine here are the things that I did:

1) Download theme from github.com/spf13/hugoThemes

2) Extract theme to /path/themes

3) Run hugo --theme='themename'

Angelo Angeles
  • 971
  • 6
  • 11
  • Correct link is https://github.com/spf13/hugoThemes. So if I don't care what theme but just want .html to work, do I pick "html5" one? – HP. Sep 01 '14 at 03:38
  • Yeah pick html5 then follow some instruction on html5 theme github page – Angelo Angeles Sep 01 '14 at 05:15
  • Once you have settled on a theme, add it to the configuration file `config.toml` so you don't have to use --theme when running hugo. – Scott C Wilson Jul 11 '15 at 22:59