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

Why are WebPage and WebSite in an array, vs WebSite.hasPart: [WebPage, ...]? #5

Open
ThomasDotCodes opened this issue Dec 17, 2019 · 1 comment

Comments

@ThomasDotCodes
Copy link

ThomasDotCodes commented Dec 17, 2019

To state practically, why this:
https://github.com/JayHoltslander/Structured-Data-JSON-LD/blob/master/WebSite.json#L3-L13

	{
		"@context": "http://schema.org",
		"@type": "Webpage",
		"specialty": "CNBC homepage, stock markets, business news, financial news",
		"mainContentOfPage": {
			"@context": "http://schema.org/",
			"@type": "WebPageElement",
			"cssSelector": ".body-content"
		},
		"primaryImageOfPage": "https://placehold.it/640x480"
	},

Instead of

@context": "http://schema.org",
"@type": "WebSite",
"hasPart": [
   webpageDefFromExampleAbove,
  ...footerSidebarAndHeaderElements,
]
@ThomasDotCodes ThomasDotCodes changed the title Why are WebPage and WebSite in an array, vs WebSite.hasPart: WebPage? Why are WebPage and WebSite in an array, vs WebSite.hasPart: [WebPage, ...]? Dec 17, 2019
@ThomasDotCodes
Copy link
Author

ThomasDotCodes commented Dec 17, 2019

The reason I ask is a more complicated example, say you had this chain of items:

a Character (person) featured on a VisualArtwork (comic page) within a ComicStory, within a ComicIssue, within a Book, within a BookSeries, within a WebPage, within a WebSite...

Would you just define all of these types as first level items within a 1D array (as the Webpage/WebSite example cited in original post)? Or would it be better to nest everything into a single WebSite object?

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

No branches or pull requests

1 participant