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

Add Google Scholar expected meta tags to publication pages #3089

Open
2 tasks done
thomwiggers opened this issue Apr 25, 2024 · 1 comment
Open
2 tasks done

Add Google Scholar expected meta tags to publication pages #3089

thomwiggers opened this issue Apr 25, 2024 · 1 comment
Labels

Comments

@thomwiggers
Copy link
Contributor

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I am mindful of the project scope

Proposal

https://scholar.google.com/intl/en/scholar/inclusion.html#indexing documents that certain tags are used by Google Scholar specifically for inclusion in that search engine.
Example

<meta name="citation_author" content="First Author">
<meta name="citation_author" content="Second Author">
<meta name="citation_author" content="Third Author">
<meta name="citation_journal_title" content="Some Conference Or Journal 2024">
<meta name="citation_publication_date" content="2024">
<meta name="citation_pdf_url" content="publication.pdf">

Motivation and context

#1264 brought this up before, but ended up being implemented through Schema.org. As Scholar seems on life support, I'm not sure if any of the other metadata (such as Schema.org) is used. Additionally, Schema.org metadata doesn't specifically indicate that an article is scholarly. This additional metadata could serve as a valuable additional signal to Google Scholar specifically.

@thomwiggers
Copy link
Contributor Author

I've put together the following head-end hook:

Put the following in layouts/partials/hooks/head-end/google-scholar.html:

{{ if .IsPage | and (eq .Type "publication") }}
{{/* based on page_metadata_authors.html */}}
{{- $taxonomy := "authors" }}
{{ if .Param $taxonomy }}
  {{ range $index, $value := (.GetTerms $taxonomy) }}
    <meta name="citation_author" content="{{ .LinkTitle }}" />
  {{- end -}}
{{- end }}

<meta name="citation_title" content="{{ .Title }}" />
<meta name="citation_publication_date" content="{{ .Params.Date.Format "2006/01/02" }}" />

{{ $resource := .Page.Resources.GetMatch (printf "%s.pdf" .Page.File.ContentBaseName) }}
{{ with $resource }}
  <meta name="citation_pdf_url" content="{{ .Permalink }}" />
{{ else }}
  {{ if .Params.url_pdf }}
    <meta name="citation_pdf_url" content="{{ .Params.url_pdf | absURL }}" />
  {{ end }}
{{ end }}

{{ if .Params.publication -}}
{{ if in .Params.publication_types "thesis" -}}
<meta name="citation_dissertation_institution" content="{{ .Params.publication }}" />
{{ else if in .Params.publication_types "paper-conference" }}
<meta name="citation_conference_title" content="{{ .Params.publication }}" />
{{ else if in .Params.publication_types "article-journal" }}
<meta name="citation_journal_title" content="{{ .Params.publication }}" />
{{- end }}
{{- end }}
{{- end }}

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

No branches or pull requests

1 participant