# Adding meta description tag to Dimension theme

**URL:** <https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629>\
**Category:** support\
**Created:** [July 29, 2017, 6:03pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629 "2017-07-29T18:03:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tooraj](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tooraj](https://discourse.gohugo.io/u/tooraj)\
**Post date:** [July 29, 2017, 6:03pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629/1 "2017-07-29T18:03:55Z")

</div>

I am trying to add meta description tag to my website that uses Dimension theme.  
In the `header.html` I added this line:

`<meta name="description" content="{{.Description}}" />`

And in for example `test.md` files I have something like this:  
—  
title: MyTitle  
description: this is a meta description  
—

Bue when I build the public folder by typing `Hugo` this is what I see in `test.html`:

```
<!DOCTYPE HTML>

<html>
	<head>
		<title>Gems</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<meta name="description" content=this&#32;is&#32;a&#32;meta&#32;description. />
		<link rel="stylesheet" href="/css/main.css" />

```

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![gaetawoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gaetawoo/32/16789_2.png) [@gaetawoo](https://discourse.gohugo.io/u/gaetawoo)\
**Post date:** [July 29, 2017, 6:44pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629/2 "2017-07-29T18:44:01Z")

</div>

you need to use something like `{{ .Description | safeHTML }}`

---

<div class="post-metadata">

**Author:** ![tooraj](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tooraj](https://discourse.gohugo.io/u/tooraj)\
**Post date:** [July 29, 2017, 6:58pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629/3 "2017-07-29T18:58:51Z")

</div>

Thanks for the answer. Why do I need to add `| safeHTML` ?

---

<div class="post-metadata">

**Author:** ![gaetawoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gaetawoo/32/16789_2.png) [@gaetawoo](https://discourse.gohugo.io/u/gaetawoo)\
**Post date:** [July 29, 2017, 7:00pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629/4 "2017-07-29T19:00:08Z")

</div>

because otherwise it’ll try to make it look like code instead of properly formatted.

> **[safeHTML](https://gohugo.io/functions/safehtml/#readout)**
>
> Declares a provided string as a "safe" HTML document to avoid escaping by Go templates.

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [June 30, 2019, 2:07pm UTC](https://discourse.gohugo.io/t/adding-meta-description-tag-to-dimension-theme/7629/5 "2019-06-30T14:07:20Z")

</div>

A post was split to a new topic: [Meta tags not displaying](https://discourse.gohugo.io/t/meta-tags-not-displaying/19426)
