# Documentation on using Ace Templates \[Solved\]

**URL:** <https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763>\
**Category:** support\
**Created:** [February 22, 2015, 8:57am UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763 "2015-02-22T08:57:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvinsim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arvinsim/32/254_2.png) [@arvinsim](https://discourse.gohugo.io/u/arvinsim)\
**Post date:** [February 22, 2015, 8:57am UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/1 "2015-02-22T08:57:53Z")

</div>

Just this weekend, I was contemplating using the [Jade](http://jade-lang.com/) templating system to compose Hugo’s theme layouts. I just miss the inheritance and decoration feature too much.

Then I saw just a few hours ago that the newest version now support the [Ace](https://github.com/yosssi/ace) templating system.

It seems to be inspired by Jade so I am willing to give it a shot. I tried porting some of my theme’s layout but I quickly ran into problems.

I can’t seem to find anything about Ace templates in the documentation. Is the documentation on using Ace templates still in WIP?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 22, 2015, 12:07pm UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/2 "2015-02-22T12:07:57Z")

</div>

I use Ace templates on my site, and there is one piece missing in the integration in Hugo, and that is the base inheritance feature. Do a search for Ace here in the forum.

---

<div class="post-metadata">

**Author:** ![arvinsim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arvinsim/32/254_2.png) [@arvinsim](https://discourse.gohugo.io/u/arvinsim)\
**Post date:** [February 22, 2015, 4:46pm UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/3 "2015-02-22T16:46:36Z")

</div>

I see. That explains why I did not see problems when converting my base template file but had a lot of problems with the partials.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 22, 2015, 4:53pm UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/4 "2015-02-22T16:53:00Z")

</div>

There is this issue:

> <https://github.com/gohugoio/hugo/issues/763>
>
> Given /partials/foo.ace:
> = include partials/foo.html .
> Works when the partial is in the project; it isn't found when it is in a theme.
> This...

And this discussion:

> **[Inheritance with Ace Templates](https://discourse.gohugo.io/t/inheritance-with-ace-templates/677)**
>
> I’ve built Hugo from git, and I have Ace templates working now, but I can’t figure out how I refer to the base template properly to make this happen. In Jinja2, this would be something like {% extends ‘base.html’ %}. I think splitting up HTML...

---

<div class="post-metadata">

**Author:** ![arvinsim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arvinsim/32/254_2.png) [@arvinsim](https://discourse.gohugo.io/u/arvinsim)\
**Post date:** [February 28, 2015, 2:16pm UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/5 "2015-02-28T14:16:05Z")

</div>

My templates are very simple. My biggest problem is that I can’t seem to use `include` on partials.

I have a `footer.ace`file.

```auto
<footer>
  &copy; 2015 All Rights Reserved.
</footer>

```

When I include it in my base html

```auto
= include partials/footer.html .

```

What i get is mangled markup

```auto
<><©>2015 All Rights Reserved.</©></><

```

If I use this

```auto
= include partials/footer.ace .

```

I get a blank output and this error

```auto
ERROR: 2015/02/28 Unable to render [partials/footer.ace theme/partials/footer.ace]
ERROR: 2015/02/28 Expecting to find a template in either the theme/layouts or /layouts in one of the following relative locations [partials/footer.ace theme/partials/footer.ace]

```

Maybe I am not understanding this correctly?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 28, 2015, 4:39pm UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/7 "2015-02-28T16:39:46Z")

</div>

If your layout files is in a theme, this can be it:

> <https://github.com/gohugoio/hugo/issues/763>
>
> Given /partials/foo.ace:
> = include partials/foo.html .
> Works when the partial is in the project; it isn't found when it is in a theme.
> This...

---

<div class="post-metadata">

**Author:** ![arvinsim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arvinsim/32/254_2.png) [@arvinsim](https://discourse.gohugo.io/u/arvinsim)\
**Post date:** [March 1, 2015, 1:23am UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/8 "2015-03-01T01:23:54Z")

</div>

I see. It is a bug then. Both of the code snippets below output mangled markup.

```auto
{{ partial "footer" . }}

```

```auto
= include theme/partials/footer.html . 

```

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [March 1, 2015, 1:29am UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/9 "2015-03-01T01:29:47Z")

</div>

No, the first one works fine in all cases.

The second one works fine, unless in a theme.

---

<div class="post-metadata">

**Author:** ![arvinsim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arvinsim/32/254_2.png) [@arvinsim](https://discourse.gohugo.io/u/arvinsim)\
**Post date:** [March 1, 2015, 1:57am UTC](https://discourse.gohugo.io/t/documentation-on-using-ace-templates-solved/763/10 "2015-03-01T01:57:25Z")

</div>

Ugh!

Yes, you are right. I got the mangled markup in the first case because I used HTML markup, not ACE.

Thanks for the help! Now I can convert my templates to ACE 🙂
