# Hugo

{% hint style="warning" %}
The documentation is designed for Liker Land and LikeCoin v2. For information on [3ook.com](https://3ook.com/) and LikeCoin v3, please visit [docs.3ook.com](https://docs.3ook.com) and [dao.like.co](https://dao.like.co/).
{% endhint %}

Thanks to the user [Wancat](https://www.wancat.cc/post/hugo-install-likecoin/) for providing the tutorial.

Before adding the LikeCoin button, please [register a Liker ID](/general-guides/dapp/liker-id.md).

Choose a theme for your website first. The following is an example using the [CleanWhite](https://themes.gohugo.io/hugo-theme-cleanwhite) theme.

Hugo allows users to use custom layouts to change the website design without altering the theme. The LikeCoin button can be added using this function. Follow the steps below:

Copy the post template by copying the `layouts` folder from your `theme` to the repository directory:

```
cp -r theme/YOUR_THEME/layouts/ .
```

Hugo allows users to create simple templates with [Partial Templates](https://gohugo.io/templates/partials/) and embed them into a page. Create a file named `likecoin.html` in `partials` folder of the `layouts` directory. Fill in the following code. You can also include words to encourage clapping the LikeCoin button in HTML format:

```
<iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/{{ .Site.Params.likerID }}/button?referrer={{ .Permalink }}" width="100%" frameborder=0></iframe>
```

&#x20;Add the following code to your `config.toml` file and change \[LikerID] to your Liker ID:

```
[[params]]
	likerID = "likerID"
```

Edit the post template, which is usually located in `_default/single.html`. This is a Go Template. It is suggested to place the code after `{{ .Content }}` so that the LikeCoin button will appear at the end of the article:

```
{{ partial "likecoin.html" . }}
```

Hugo will render this partial for your posts. Remember to include the "." in the code, otherwise the LikeCoin template won't be able to read the data. In fact, it is not necessary to modify the original Hugo theme.

The last step is to run `hugo server` to preview your website.

By following these steps, the LikeCoin button will be added to your website.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.v2.like.co/general-guides/dapp/creator/self-host/hugo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
