ACE inner template implementation

I’m trying to implement templates that inherit from a base/default template. I’ve followed along with the docs, with bep’s implementation, and with the ACE inner example without any luck.

I’m using Hugo v0.14

layouts/_default/baseof.ace:

= doctype html
html lang=en
  head
    meta charset=utf-8
    title Base and Inner Template
  body
    h1 This is a base template
    = yield main

layouts/index.ace:

= content main
  h1 This is from the inner template
Error: index.html:1: invalid syntax
Error while rendering homepage html/template: "index.html" is an incomplete template

I copied and pasted your templates into mine – and it works as expected. So there is something else in play. Maybe you are not using the Hugo version you think you’re doing? Wild guess …

Well, then I may have guessed wrong … But you would have to share a failing project for anyone to help you further.

Also, what OS do you run?

I’m currently on Windows, but hoping to have my new Mac very soon. I was trying to convert an existing project using Go Templates over to Ace. I’ll give a new project a shot using Ace to see how it goes before I send out the failing project.

EDIT:
Just started a brand new project with layouts that only include index.ace, and /_default/baseof.ace (exactly as seen above), and I get the same error.

Here’s the dummy project on github.

I’m running Windows 7 with a 64 bit Intel processor and hugo_0.14_windows_386.

I guess I have only tested this on my Linux box. Damn those Windows file paths. Should have added some tests :slight_smile: Will check your project – and check it out on Windows.

EDIT IN: Your test project doesn’t fail on Linux.

See https://github.com/spf13/hugo/issues/1178

1 Like

This issue should be fixed in the latest Hugo source. Would love if someone with a Windows box could confirm … sometime.

I’ll be back in front of a windows box tomorrow – will let you know.

I downloaded Go and added it to my path. I ran go get -v github.com/spf13/hugo, but I’m not seeing an executable in my workspace?

First time building from source growing pains.

If go get executes without error there is a binary … Check if you have a gopath … on Win … hmm, from memory:

set GOPATH

When I do it it builds to

/home/bep/dev/go/bin

As /home/bep/dev/go is my GOPATH.

A search for “hugo.exe” might be a method, too.

I have a win evnironment variable GOPATH set to C:\go\workspace. After running go get I have a src directory that contains several more directories: bitbucket.org, github.com, golang.org, gopkg.in

I’m just not seeing an executable as noted in the README.

And you have tried the “search for hugo.exe”?

Yes, the only result was in C:\hugo, which is v0.14 that I installed from github (last modified time of last week).

Then I cannot help you - must be a WIndows/local issue of some sort.