dldx / hpstr-hugo-theme

:art: A Hugo theme based on the HPSTR Jekyll theme.
https://dldx.github.io/hpstr-hugo-theme/
MIT License
19 stars 17 forks source link

Unable to locate layout #10

Closed JoveActuarial closed 6 years ago

JoveActuarial commented 7 years ago

I'm having problems with use of this theme and the example site. The urls for individual posts are generating 404 pages.

Running hugo -v gives

WARN 2017/10/25 13:09:21 [en] Unable to locate layout for "page": [posts/post.html.html posts/post.html _default/post.html.html _default/post.html theme/posts/post.html.html theme/posts/post.html theme/_default/post.html.html theme/_default/post.html]

(Full output below)

Apologies if missing something obvious here - new hugo user.

Many thanks

INFO 2017/10/25 13:09:21 Using config file: /Users/carl/Documents/test/config.toml INFO 2017/10/25 13:09:21 using a UnionFS for static directory comprised of: INFO 2017/10/25 13:09:21 Base: /Users/carl/Documents/test/themes/hpstr/static INFO 2017/10/25 13:09:21 Overlay: /Users/carl/Documents/test/static/ INFO 2017/10/25 13:09:21 syncing static files to /Users/carl/Documents/test/public/ WARN 2017/10/25 13:09:21 No translation bundle found for default language "en" WARN 2017/10/25 13:09:21 Translation func for language en not found, use default. WARN 2017/10/25 13:09:21 i18n not initialized, check that you have language file (in i18n) that matches the site language or the default language. Started building sites ... INFO 2017/10/25 13:09:21 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} WARN 2017/10/25 13:09:21 [en] Unable to locate layout for "page": [posts/post.html.html posts/post.html _default/post.html.html _default/post.html theme/posts/post.html.html theme/posts/post.html theme/_default/post.html.html theme/_default/post.html] WARNING: calling IsSet with unsupported type "invalid" () will always return false.

INFO 2017/10/25 13:09:21 Alias "/tags/code/page/1/index.html" translated to "tags/code/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/page/1/index.html" translated to "page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/highlighting/page/1/index.html" translated to "tags/highlighting/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/images/page/1/index.html" translated to "tags/images/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/intro/page/1/index.html" translated to "tags/intro/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/link-post/page/1/index.html" translated to "tags/link-post/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/readability/page/1/index.html" translated to "tags/readability/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/posts/page/1/index.html" translated to "posts/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/sample-post/page/1/index.html" translated to "tags/sample-post/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/test/page/1/index.html" translated to "tags/test/page/1/index.html" INFO 2017/10/25 13:09:21 Alias "/tags/video/page/1/index.html" translated to "tags/video/page/1/index.html"

Built site for language en: 0 draft content 0 future content 0 expired content 10 regular pages created 26 other pages created 0 non-page files copied 14 paginator pages created 9 tags created 0 categories created total in 73 ms

dldx commented 7 years ago

Hey,

how did you install it? Here are the instructions that work for me.

  1. Install hugo as usual.
  2. Assuming you want a clean, new site...
  3. mkdir -p new_site/themes
  4. cd new_site
  5. git clone https://github.com/dldx/hpstr-hugo-theme.git themes/hpstr
  6. cp themes/hpstr/exampleSite/* . -r
  7. hugo server

Output should look something like this:

durand@Deuterium ~> mkdir -p new_site/themes
durand@Deuterium ~> cd new_site/
durand@Deuterium ~/new_site> git clone https://github.com/dldx/hpstr-hugo-theme.git themes/hpstr
Cloning into 'themes/hpstr'...
remote: Counting objects: 2778, done.
remote: Total 2778 (delta 0), reused 0 (delta 0), pack-reused 2778
Receiving objects: 100% (2778/2778), 4.98 MiB | 1.97 MiB/s, done.
Resolving deltas: 100% (1341/1341), done.
Checking connectivity... done.
durand@Deuterium ~/new_site> cp themes/hpstr/exampleSite/* . -r
durand@Deuterium ~/new_site> hugo server
ERROR 2017/10/25 14:37:40 No 'baseURL' set in configuration or as a flag. Features like page menus will not work without one.
Started building sites ...
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

Built site for language en:
0 draft content
0 future content
0 expired content
10 regular pages created
26 other pages created
0 non-page files copied
14 paginator pages created
9 tags created
0 categories created
total in 32 ms
Watching for changes in /home/durand/new_site/{data,content,static,themes}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
dldx commented 7 years ago

Just discovered this issue that you and another user reported where posts are not being rendered correctly. I think it has something to do with changes they made to new versions of Hugo. I'm investigating this right now! You can force each page to render by removing, saving, then adding back the line layout: post from each page while hugo server is running. This isn't a proper fix though but in case you're desperate to get it working right now...

JoveActuarial commented 7 years ago

Thanks so much for having a look at this - and for converting this great theme!

I'm getting the same issue following on from a new install as suggested.

I'm on Hugo version .30.2 on MacOS High Sierra.

dldx commented 6 years ago

Sorry, been quite busy. I'm not sure if there's anything I can really do. I tested this with a fresh install and the latest version of Hugo and didn't have any issues but let me know if you still do!