How to markup the last non linking item in breadcrumbs list using JSON-LD

后端 未结 3 2225
野趣味
野趣味 2020-12-20 17:14

I am using structured data for my breadcrumbs trail. I\'m refering to this documentation:

https://developers.google.com/structured-data/breadcrumbs

I have bu

3条回答
  •  不知归路
    2020-12-20 17:51

    i'm not a SEO expert or know exactly what is your goal, but reading the linked api is not specify if the link(@id) are mandatory in JSON-LD, but from the official documentation JSON-LD documentation seems that they can omitted but with possible not desiderable effects.

    6.14 Identifying Blank Nodes

    At times, it becomes necessary to be able to express information without being able to uniquely identify the node with an IRI. This type of node is called a blank node. JSON-LD does not require all nodes to be identified using @id. However, some graph topologies may require identifiers to be serializable. Graphs containing loops, e.g., cannot be serialized using embedding alone, @id must be used to connect the nodes. In these situations, one can use blank node identifiers, which look like IRIs using an underscore (_) as scheme. This allows one to reference the node locally within the document, but makes it impossible to reference the node from an external document. The blank node identifier is scoped to the document in which it is used.

    in this case particular case i will leave blank the last item or try to add it and omits the url.

    if you want to be sure about preview of the actual page (as in linked documentation) on the google search page, so that in the list of breadcrumb the cuttent page will appear, i suggest to add an hidden element in the ol with the link to the current page, and add it to the breadcumb JSON-LD list with the link.

    
    

提交回复
热议问题