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 improvements in json ld definition for webpage #56

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

anita-chouhan
Copy link
Contributor

No description provided.

templates/_schemas/definitions/creativeWork.twig Outdated Show resolved Hide resolved
.creator((props.creators ?? [])|map(org => organization(org))|default(null))
.copyrightHolder((props.authors.organizations ?? [])|map(org => organization(org))|default(null))
.copyrightYear(props.dateCreated|date('Y'))
.id(siteUrl|default(null))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? All webpage id values will end up being the same. Previously this was being set to props.url ~ '#webpage'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reference URL, it was updated intentionally to siteUrl so I did here as well but I think keeping it props.url ~ '#webpage' would be better. Reverted now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for one being better than the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping it siteUrl will make it the same for all web pages and the Id should be unique for each webpage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pl-mnm Can you chime in here? The older code in the boilerplate has the webpage ID set to props.url ~ '#webpage' but the newer versions of our JSON-LD code, like in Blume, have the ID set to siteUrl.

https://github.com/miranj/blume-fresh/blob/6dfa86f17ec475f8e033cb3a299a8caa1929f664/templates/_schemas/definitions/webpage.twig#L10

  • What is the ID supposed to be?
  • What should we retain in the boilerplate?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I'm not sure I understood all these subtleties. This is something @souvikdg and I had come up with and I think he'll be better placed to tell us what's required.

@anita-chouhan anita-chouhan requested a review from rungta January 11, 2023 13:17
@anita-chouhan anita-chouhan requested a review from rungta January 12, 2023 13:28
@anita-chouhan anita-chouhan requested a review from rungta January 13, 2023 09:28
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

Successfully merging this pull request may close these issues.

3 participants