# Strange Markdownify Error

**URL:** <https://discourse.gohugo.io/t/strange-markdownify-error/6322>\
**Category:** support\
**Created:** [April 24, 2017, 9:26pm UTC](https://discourse.gohugo.io/t/strange-markdownify-error/6322 "2017-04-24T21:26:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pbn/32/3067_2.png) [@pbn](https://discourse.gohugo.io/u/pbn)\
**Post date:** [April 24, 2017, 9:26pm UTC](https://discourse.gohugo.io/t/strange-markdownify-error/6322/1 "2017-04-24T21:26:23Z")

</div>

Hey, I’m messing around with Hugo and I’m trying to get a short description of each blog post on the front page. (not an excerpt a custom written “marquee” that isn’t in the post)  
I made a variable in the front of the post.

> +++  
> `marquee = "BLAH BLAH __BLAH__"`  
> +++

In the template I refer to that variable

> `<div> {{ $page.Params.marquee | markdownify }} </div>`

(pretty sure the page variable is correctly assigned in the template I’m using I didn’t write it)  
`{{ range $name, $page := .Site.Pages }}`

The strange thing is it seems to work _fine_, but hugo throws an error on building.

> `Error while rendering "home": template: index.html:20:38: executing "index.html" at <markdownify>: wrong number of args for markdownify: want 1 got 0`

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [April 25, 2017, 1:13am UTC](https://discourse.gohugo.io/t/strange-markdownify-error/6322/2 "2017-04-25T01:13:02Z")

</div>

I think it means that somewhere you call that, a `marquee` is value is empty (hence `want 1 got 0`). You can probably add an `if` or `.IsHome`, since you are probably not setting a marquee value for your home page.

---

<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:** [April 25, 2017, 7:39am UTC](https://discourse.gohugo.io/t/strange-markdownify-error/6322/3 "2017-04-25T07:39:57Z")

</div>

> [@pbn](#):
>
> \<div\> {{ $page.Params.marquee | markdownify }} \</div\>

Try:

```auto
{{ with $page.Params.marquee }}
<div> {{ . | markdownify }} </div>
{{ end }}

```

---

<div class="post-metadata">

**Author:** ![pbn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pbn/32/3067_2.png) [@pbn](https://discourse.gohugo.io/u/pbn)\
**Post date:** [April 26, 2017, 2:28pm UTC](https://discourse.gohugo.io/t/strange-markdownify-error/6322/4 "2017-04-26T14:28:40Z")

</div>

Yep, it was iterating over the entire page list not just posts.  
Thanks for the hep everyone.
