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

Meta Description Update #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pears-one
Copy link

The current HEAD of the Etch template allows you to set a site wide description tag via the "description" config parameter. However I think it would be good to have the option of having a separate description for the posts.

In my preliminary pull request I have set a default fallback of "My Hugo Site". I am happy if people want to set this differently.

@LukasJoswiak
Copy link
Owner

Hi, thanks for the PR! In my opinion, I'm not sure setting a default value for the description of a site is ideal, because the generic description could override other content on the page that a crawler might decide to use to describe the page. For example, a crawler might see that the description is missing and use the first sentence of the post, which would be more helpful than a generic Hugo description.

However I think it would be good to have the option of having a separate description for the posts

This seems like a reasonable change to me.

@pears-one
Copy link
Author

Updated:

  • If: .Description exists
    • always prioritise this for meta description value
  • else if: .Site.Params.description exists
    • pick this for meta description value
  • else: no meta description tag

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

Successfully merging this pull request may close these issues.

2 participants