Hugo says pages generated, but no content generated

I’m trying to get up and going on with Hugo and hitting a weird glitch. I am using the Hugo-Octopress theme, but I don’t think that matters. When I run hugo server, I see this:

Started building sites ...
WARNING: Page's Now is deprecated and will be removed in a future release. Use now (the template func).
Built site for language en:
0 of 3 drafts rendered
0 future content
0 expired content
34 regular pages created
282 other pages created
0 non-page files copied
0 paginator pages created
0 categories created
137 tags created
total in 2076 ms
Watching for changes in /path/to/stuff/{data,content,layouts,static,themes}
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

So, when I go to http://localhost:1313/ There are no summaries on the main page (which the theme docs seem to think there should be. There are also “recent entries” links on the left, but when I click on those, I get 404’s…not the pages itself. If I run hugo to generate pages on disk, I see the same output as above (other than the live server stuff), but if I go to say, public/blog/ all I see there is index.xml (RSS feed), no actual pages.

If I use the hugo-bootstrap-premium theme, I still get the same output as above, but the main page is completely blank, as is the /blog/ page, but it seems there is actual content produced.

Any tips on how to go about debugging this? I’ve followed all the “getting started” guides, as far as I know. Would like to use the Octopress them…not sure what I’m doing wrong. :frowning:

Thanks!

I suspect you will get some insight if you run with hugo -v – my best guess would be some WARNINGS about missing templates, which is to say: Hugo creates the pages, but we cannot find a suitable template to render it to disk.

I get this:

$ hugo -v
INFO 2017/05/15 11:54:42 Using config file: 
INFO 2017/05/15 11:54:42 using a UnionFS for static directory comprised of:
INFO 2017/05/15 11:54:42 Base: /home/jkugler/Documents/blogs/joshuakugler.com/themes/hugo-bootstrap-premium/static
INFO 2017/05/15 11:54:42 Overlay: /home/jkugler/Documents/blogs/joshuakugler.com/static/
INFO 2017/05/15 11:54:42 syncing static files to /home/jkugler/Documents/blogs/joshuakugler.com/public/
Started building sites ...
INFO 2017/05/15 11:54:42 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
INFO 2017/05/15 11:54:42 Alias "/archives/41-Bringing-up-Atlassian-JIRAConfluenceCrowd-on-DreamHosts-DreamCompute.html" translated to "archives/41-Bringing-up-Atlassian-JIRAConfluenceCrowd-on-DreamHosts-DreamCompute.html"
INFO 2017/05/15 11:54:42 Alias "/archives/40-The-dreaded-xsane-Invalid-argument-and-an-easy-fix.html" translated to "archives/40-The-dreaded-xsane-Invalid-argument-and-an-easy-fix.html"
<snip a bunch of this>
INFO 2017/05/15 11:54:42 Alias "/tags/aol/page/1/index.html" translated to "tags/aol/page/1/index.html"
<snip a bunch of this>
Built site for language en:
0 of 3 drafts rendered
0 future content
0 expired content
34 regular pages created
282 other pages created
0 non-page files copied
141 paginator pages created
137 tags created
0 categories created
total in 96 ms

So, nothing different.

Also, another odd thing: if I do a live server, and go to /blog/ I get a blank page. Well, just this, actually:
<pre></pre>
But if I generate the site on disk, and go to public/blog/ there is content, and and the index.html has stuff in it.

This is:

Hugo Static Site Generator v0.20.7 linux/amd64 BuildDate: 2017-05-02T23:39:25-08:00

Sorry for not saying that.

Are you running either the local server or the build command with any flags? Can you point me to some source?

I do not have any flags at the moment. I don’t have it in a repo anywhere yet, but I could tar it all up and put it somewhere if you want. There’s nothing in there that’s not already public. :slightly_smiling:

Hi,
I just tested with hugo-bootstrap-premium with Hugo Static Site Generator v0.20.7 darwin/amd64 BuildDate: 2017-05-17T00:59:06+02:00 (OSX)

I could not replicate your issue. Have you tried with the content from the exampleSite folder?

So, to clarify, given a “root” directory (the directory in which my config.toml file lives), I have all my .md files in content/blogs

I run hugo with the hugo-bootstrap-premium theme, and I get an empty index.html in public/ My posts are generated and placed in public/blog/ So…progress on that front. When I fire up hugo server though, and go to http://localhost:1313/blog/ I am presented with an empty page that just has this on it:

<pre>
</pre>

So, like I said…I think I’m making progress, but:

  1. I’d like the index.html at the root to show my entries, and
  2. I’d like the local server to properly server the files at their expected locations. I can however view my blog entries by going to http://localhost:1313/blog/some-blog-entry

Ideas?

So, to clarify, given a “root” directory (the directory in which my config.toml file lives), I have all my .md files in content/blogs

I run hugo with the hugo-bootstrap-premium theme, and I get an empty index.html in public/ My posts are generated and placed in public/blog/ So…progress on that front. When I fire up hugo server though, and go to localhost:1313/blog/ I am presented with an empty page that just has this on it:


So, like I said…I think I’m making progress, but:

  1. I’d like the index.html at the root to show my entries, and
  2. I’d like the local server to properly server the files at their expected locations. I can however view my blog entries by going to localhost:1313/blog/some-blog-entry

Ideas?

So, using the example site in the hugo-bootstrap-premium theme, I am able to get it to render, and display content with hugo server. It even shows the entries from content/post/ on the main index page. That is, localhost:1313 But I’m not sure what they are doing differently. When I use their bare-bones config file, I get an empty page at /.

Side note: WHUH!?! I can’t post a full URL to the localhost server? It told me my post was “flagged.”

1 Like

Having the same issue, except I did do something to cause it–I manually deleted a layout directory and single.html file within it for a corresponding content file and the SCSS file.

I later realized that it I needed it, noting that it would not just fall back to the default, so I went to the system trash can, dragged and dropped them both back into their respective places.

Suddenly, that particular page was blank in the UI. I ran gulp build (I’m using gulp to build and serve the files, nothing changed here), and I can see that the rendered static files (including the file and layout in question) were built just fine. Still, on the running server it is blank for that page. I’ve tried deleting and re-creating the directory from within my IDE, to no avail. I even pulled from the original repo, just to be sure I had the latest from when it was working. I also have cache disabled. Really confusing.

Hi @kaleidoscope – please open a new topic under “support” category for this, and reference this thread if you like.

If you include a link to your site’s git repo when creating your new topic, we will be able to help you troubleshoot.

I don’t know if it’s relevant but I think I’ve just hit exactly the same issue. Was yours solved?