Merge pull request #9167 from internet-development/elijaharita/structured-data-name-fallback
fix: show both DisplayName and Handle in google structured data (or only Handle if DisplayName not set)
This commit is contained in:
@@ -62,7 +62,12 @@
|
|||||||
"@type": "DiscussionForumPosting",
|
"@type": "DiscussionForumPosting",
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
|
{%- if postView.Author.DisplayName %}
|
||||||
"name": "{{ postView.Author.DisplayName }}",
|
"name": "{{ postView.Author.DisplayName }}",
|
||||||
|
"alternateName": "@{{ postView.Author.Handle }}",
|
||||||
|
{% else %}
|
||||||
|
"name": "@{{ postView.Author.Handle }}",
|
||||||
|
{% endif -%}
|
||||||
"url": "https://bsky.app/profile/{{ postView.Author.Handle }}"
|
"url": "https://bsky.app/profile/{{ postView.Author.Handle }}"
|
||||||
},
|
},
|
||||||
{%- if postText %}
|
{%- if postText %}
|
||||||
|
|||||||
@@ -59,8 +59,12 @@
|
|||||||
"dateCreated": "{{ profileView.CreatedAt }}",
|
"dateCreated": "{{ profileView.CreatedAt }}",
|
||||||
"mainEntity": {
|
"mainEntity": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
|
{%- if profileView.DisplayName %}
|
||||||
"name": "{{ profileView.DisplayName }}",
|
"name": "{{ profileView.DisplayName }}",
|
||||||
"alternateName": "@{{ profileView.Handle }}",
|
"alternateName": "@{{ profileView.Handle }}",
|
||||||
|
{% else %}
|
||||||
|
"name": "@{{ profileView.Handle }}",
|
||||||
|
{% endif -%}
|
||||||
"identifier": "{{ profileView.Did }}",
|
"identifier": "{{ profileView.Did }}",
|
||||||
"description": "{{ profileView.Description }}",
|
"description": "{{ profileView.Description }}",
|
||||||
"image": "{{ profileView.Avatar }}",
|
"image": "{{ profileView.Avatar }}",
|
||||||
|
|||||||
Reference in New Issue
Block a user