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

name: null in ld+json #248

Closed
chrislovecnm opened this issue Nov 12, 2017 · 8 comments
Closed

name: null in ld+json #248

chrislovecnm opened this issue Nov 12, 2017 · 8 comments

Comments

@chrislovecnm
Copy link

Not sure if this is expected, but I am getting this output from my site:

{
	"name": null,
	"description": "Choosing which CNI provider to deploy in Kubernetes",
	"author": {
		"@type": "Person",
		"name": "Chris Love     - chrislovecnm"
	},
	"@type": "BlogPosting",
	"url": "https://chrislovecnm.com/kuberentes/cni/choosing-a-cni-provider/",
	"publisher": null,
	"image": "https://chrislovecnm.com/img/cni-logo.png",
	"headline": "Choosing a CNI Provider for Kubernetes",
	"dateModified": "20    17-11-11T18:22:52-07:00",
	"datePublished": "2017-11-11T18:22:52-07:00",
	"sameAs": null,
	"mainEntityOfPage": {
		"@type": "WebPage",
		"@id": "https://chrislovecnm.com/kuberentes/cni/choosing-a-cni-provider/"
	},
	"@context": "http://schema.org"
}
@chrislovecnm chrislovecnm changed the title name: null in json+ld name: null in ld+json Nov 12, 2017
@benbalter
Copy link
Collaborator

def name
return @name if defined?(@name)
@name = if seo_name
seo_name
elsif !homepage_or_about?
nil
elsif site_social["name"]
format_string site_social["name"]
elsif site_title
site_title
end
end
is the relevant line. Assuming this is the homepage or about page, I believe it's intentional?

@chrislovecnm
Copy link
Author

This page is a post, not the home or about. How is seo_name set?

@chrislovecnm
Copy link
Author

I wonder if index.html is picking it up. All my permalinks are index.html

@benbalter
Copy link
Collaborator

All my permalinks are index.html

Can you explain what you mean? Is your repository public?

@chrislovecnm
Copy link
Author

https://github.com/chrislovecnm/chrislovecnm.com
The HTML pages on my blog are all named index.html. Is the plunging matching it as a homepage?

@benbalter
Copy link
Collaborator

@chrislovecnm this is technically the intended behavior, at least as the logic is implemented in

elsif !homepage_or_about?
nil
.

I'm not sure, however, is this is the correct JSON-LD implementation. A quick google search suggests the name field is only used as a top-level element when the type is @organization, which would make sense to only display it on the homepage or about page.

I confirmed, however, that it is not displaying null because the page is e.g., /foo/index.html.

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@pathawks
Copy link
Member

Fixed via #249

@jekyllbot jekyllbot removed the stale label Jan 18, 2018
@jekyll jekyll locked and limited conversation to collaborators May 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants