# .Param "name.subname" is not checking site config if not present in post frontmatter

**URL:** <https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652>\
**Category:** support\
**Created:** [September 9, 2021, 11:51am UTC](https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652 "2021-09-09T11:51:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![techmagus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/techmagus/32/16997_2.png) [@techmagus](https://discourse.gohugo.io/u/techmagus)\
**Post date:** [September 9, 2021, 11:51am UTC](https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652/1 "2021-09-09T11:51:57Z")

</div>

### What version of Hugo are you using (`hugo version`)?

```
$ hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
```

### Does this issue reproduce with the latest release?

Yes

Setup:

1. In `config.toml`

```toml
[author]
  name = "Jane Doe"
  email = "jane@example.com"
  homepage = "https://example.com"
  avatar = "https://example.com/avatar.webp"

```

1. Code:

```xml
<author>
  <name>{{ with .Param "author.name" }}{{ . }}{{ end }}</name>
  {{ with .Param "author.email" }}<email>{{ . }}</email>{{ end }}
  {{ with .Param "author.homepage" }}<uri>{{ . }}</uri>{{ end }}
</author>

```

Or:

```html
<p>
  Name: {{ with $.Param "author.name" }}{{ . }}{{ end }}
  {{ with $.Param "author.email" }}Email: {{ . }}{{ end }}
  {{ with $.Param "author.homepage" }}Homepage: {{ . }}{{ end }}
</p>

```

If I understood correctly, .Param will look into a page’s frontmatter first and if it doesn’t find it there, it will check in the site’s `config.toml` file. But it doesn’t seem to be checking the `config.toml` file if it is not in a page’s frontmatter.

Did I miss anything or new bug?

---

<div class="post-metadata">

**Author:** ![pamubay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pamubay/32/17838_2.png) [@pamubay](https://discourse.gohugo.io/u/pamubay)\
**Post date:** [September 9, 2021, 1:48pm UTC](https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652/2 "2021-09-09T13:48:20Z")

</div>

You need to define it under config `params` map:

```diff
++[params.author]
  name = "Jane Doe"
  email = "jane@example.com"
  homepage = "https://example.com"
  avatar = "https://example.com/avatar.webp"

```

Yes, it’s little bit confusing because Hugo alse reserved key name `author` to supply `.Site.Author` variable.

---

<div class="post-metadata">

**Author:** ![techmagus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/techmagus/32/16997_2.png) [@techmagus](https://discourse.gohugo.io/u/techmagus)\
**Post date:** [September 9, 2021, 2:46pm UTC](https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652/3 "2021-09-09T14:46:18Z")

</div>

Ahh, yeah it was confusing.

I finally understood what’s happening. 🙂 Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [September 11, 2021, 2:46pm UTC](https://discourse.gohugo.io/t/param-name-subname-is-not-checking-site-config-if-not-present-in-post-frontmatter/34652/4 "2021-09-11T14:46:52Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
