Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata description is for site not page #82

Open
PreciousChicken opened this issue Jan 4, 2021 · 0 comments
Open

Metadata description is for site not page #82

PreciousChicken opened this issue Jan 4, 2021 · 0 comments

Comments

@PreciousChicken
Copy link

Describe the issue

The metadata attribute description used in the HTML <head> is defined in the HTML Living Standard as:

a free-form string that describes the page. The value must be appropriate for use in a directory of pages, e.g. in a search engine.

However the attribute currently uses the description for the site. If the author provides a description value within the front matter for the page, this is ignored.

To Reproduce

Add the following line to the front matter of a page where you wish to provide a description:

description: "Lorem ipsum dolor sit amet"

Run hugo: hugo server -D

Expected behaviour

The HTML outputted should be:

<head>
<!-- More html here... -->
<meta name="description" content="Lorem ipsum dolor sit amet" />
<!-- More html here... -->
</head>

Screenshots

None.

Configuration:

  • OS: Ubuntu 20.04.1 LTS
  • Hugo: v0.80.0

Additional context

I am happy to submit a pull request to fix this. I suspect however that this repo is no longer maintained, but adding the issue anyway just in case.

I've blogged on how I fixed this issue in my clone of this repo:

On metadata in Hugo - or turning tags to keywords

This also includes how I added metadata for keywords and canonical links (probably less of an issue for most people).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant