Best JSON-LD practices: using multiple [removed] elements?

前端 未结 2 1302
梦如初夏
梦如初夏 2020-11-29 00:06

I\'m curious about the best practice for applying JSON-LD onto a site for schema.org.

If I have a page with an Article and I also want to define W

2条回答
  •  既然无缘
    2020-11-29 00:48

    There is no benefit in having single or multiple data blocks, other than limitations around how you might store and manage schema data in your website.

    For example, you might need them separate if different components within your website are responsible for generating each data block independently. Alternatively, if your website is able to manage all schemas for one page in one place, it may be simpler to manage a single data block and render this as a single script element.

    You can combine these into a single script by listing each schema as an array like this:

    
    

提交回复
热议问题