-
Notifications
You must be signed in to change notification settings - Fork 61
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
Hugo: add the meta description tag to the head of the html #377
Hugo: add the meta description tag to the head of the html #377
Conversation
✅ Deploy Preview for cue ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks @ErikHendrikson - what happens in the case that a description is multi-line? Do things still work ok and generate valid HTML? |
Is you use the description in the front-matter this should not contain empty lines and should not contain html tags etc. The fallback for hugo is Summary. See https://gohugo.io/content-management/summaries/ how hugo handles this. |
Just noticed there is an open PR concerning empty lines etc in Summary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on pr. Maybe we can try to make this more solid.
e97a244
to
01a00e8
Compare
01a00e8
to
59bf391
Compare
This will add the meta tag with name="description" to the head of the html. - the value of the tag will be set to the page's params description; - with a fallback to the, by Hugo generated, summary of the page, truncated to 160 characters for SEO optimalization; and - with a fallback to the general description of the Site Params; For https://linear.app/usmedia/issue/CUE-252 Signed-off-by: Erik Hendrikson <erik.hendrikson@usmedia.nl>
59bf391
to
dee8d63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for now. We emit an ellipsis as part of the description which doesn't seem to make much sense... but I suggest we revisit this later as it's not critical now.
Imported into Gerrit |
This will add the meta tag with name="description" to the head of the html. - the value of the tag will be set to the page's params description; - with a fallback to the, by Hugo generated, summary of the page, truncated to 160 characters for SEO optimalization; and - with a fallback to the general description of the Site Params; For https://linear.app/usmedia/issue/CUE-252 Closes #377 as merged as of commit dee8d63. Signed-off-by: Erik Hendrikson <erik.hendrikson@usmedia.nl> Change-Id: Ia8e184a6729dc025d1f1cb4d5b510f5133596034 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/556912 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Closed via 0d3a50b |
This will add the meta tag with name="description" to the head of the html.
the value of the tag will be set to the page's params description;
with a fallback to the, by Hugo generated, summary of the page; and
with a fallback to the general description of the Site Params;
For https://linear.app/usmedia/issue/CUE-252