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

Page auto-description feature produces nonsensical descriptions #968

Closed
chalin opened this issue Apr 9, 2022 · 3 comments
Closed

Page auto-description feature produces nonsensical descriptions #968

chalin opened this issue Apr 9, 2022 · 3 comments
Assignees
Labels
e0-minutes Effort < 60 min p1-high
Milestone

Comments

@chalin
Copy link
Collaborator

chalin commented Apr 9, 2022

PR #662 introduced the auto-generation of page descriptions when none is provided in the page front matter. On many projects that I support, this behavior creates nonsensical descriptions, for example, the following is entirely blank:

image

Search engines can do a better job at auto generating a page's description.

This issue proposes that the page auto-description feature be opt-in for projects that want it, rather than the default.

/cc @LisaFC @emckean @geriom

@chalin chalin added e0-minutes Effort < 60 min p1-high labels Apr 9, 2022
@chalin chalin added this to the 22Q2 milestone Apr 9, 2022
@chalin chalin modified the milestones: 22Q2, 22Q3 Jun 30, 2022
@chalin chalin changed the title Make the page auto-description feature opt-in Page auto-description feature produces nonsensical descriptions Jul 9, 2022
@chalin chalin self-assigned this Jul 9, 2022
@chalin
Copy link
Collaborator Author

chalin commented Jul 9, 2022

When I first created this issue, I had suggested (via the title) that the page auto-description feature should be opt-in. Investigating this a bit more I've come to realized that Hugo's internal templates (such as for Twitter and Open Graph) consistently set meta-description elements using the same code, namely:

{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}

We should consider doing the same.

Related:

@prepstarr
Copy link

prepstarr commented Jul 10, 2022

My opinion if the opt in feature is obvious that could work but if for example the opt in feature was not obvious (which might be the case because I think it would be too many opt in and opt out features ) then {

they will be like well I want my meta headers as such... || and they will look into ways of changing them so that it's what fits their needs

and

if they have this empty version {

it could serve as an empty template for them as well...

} end if

Example -
for example, suppose a file robot.txt exists , even if empty, ok google that then you learn what robot.txt is and so on... and you can make it to your liking... ie. do I need robot.txt file on hugo?

there is obviously this hesitancy of using the zencart approach to having people designing their webpages, like it's haram if they do any of their own coding when it's supposed to be all delivered nicely on the silver spoon, but then again that might be wishful thinking for now, if not then you could just do what Amazon does and have people fill it out : Fill in your description? give it your name, and all the other meta tags needed, during a setup page that they could have later access to modify, etc.. and this results in the meta tags filled out.

References -

https://developers.google.com/search/docs/advanced/crawling/special-tags?hl=en%2F you could also do one for Yandex and for Microsoft/Yahoo, not sure who else is a truly independent search engine that does not build from these engines... Mojeek/Swiss Cows/Qwant/Metager, etc..?... the Chinese one is independent I think and it's bigger than google ... https://www.baidu.com/ something like this for their search guide: https://wenku.baidu.com/view/f88e7a62862458fb770bf78a6529647d272834d6.html I still need to sharpen my Chinese language skills unfortunately... but that's where docsy could be advantageous even...

@chalin
Copy link
Collaborator Author

chalin commented Jul 27, 2022

Closed by #1092

@chalin chalin closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e0-minutes Effort < 60 min p1-high
Projects
None yet
Development

No branches or pull requests

2 participants