Skip to content

How to use description tag only for SEO #792

Answered by markdumay
gusibi asked this question in Help
Discussion options

You must be logged in to vote

You can customize the rendering of pages in layouts/_default. Single pages use layouts/_default/single.html as base template. It includes a reference to layouts/_default/single/header.html, which renders the description. You can delete this line to remove the description from all single pages:

<p class="lead mb-5 mt-3">{{ .Description }}</p>

Alternatively, you can define a custom layout type such as mylayout. Copy the file layouts/_default/single/header.html to layouts/mylayout/single/header.html and remove the description. Now set type: mylayout in the frontmatter of the markdown file you want to customize.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gusibi
Comment options

You must be logged in to vote
0 replies

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants