Skip to content

Commit 0b558c7

Browse files
committed
Fix JSON-LD Structured Data Trailing Comma Errors
1 parent bb1740c commit 0b558c7

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

_layouts/author.html

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,14 @@ <h2 id="subscribe-heading" class="sr-only">Newsletter Subscription</h2>
126126
"image": "{{ site.url }}/{{ page.picture }}",
127127
"description": "{{ page.content | strip_html | truncate: 160 | escape }}",
128128
"url": "{{ site.url }}{{ page.url }}",
129-
{% if page.twitter %}
129+
{% if page.twitter or page.linkedin or page.github or page.web %}
130130
"sameAs": [
131-
"https://twitter.com/{{ page.twitter }}",
132-
{% if page.linkedin %}"https://linkedin.com/in/{{ page.linkedin }}",{% endif %}
133-
{% if page.github %}"https://github.com/{{ page.github }}",{% endif %}
134-
{% if page.web %}"{{ page.web }}"{% endif %}
135-
],
131+
{% if page.twitter %}"https://twitter.com/{{ page.twitter }}"{% endif %}
132+
{% if page.linkedin %}{% if page.twitter %},{% endif %}"https://linkedin.com/in/{{ page.linkedin }}"{% endif %}
133+
{% if page.github %}{% if page.twitter or page.linkedin %},{% endif %}"https://github.com/{{ page.github }}"{% endif %}
134+
{% if page.web %}{% if page.twitter or page.linkedin or page.github %},{% endif %}"{{ page.web }}"{% endif %}
135+
]
136136
{% endif %}
137-
"jobTitle": "Data Science Professional",
138-
"worksFor": {
139-
"@type": "Organization",
140-
"name": "DataTalks.Club"
141-
},
142-
"alumniOf": {
143-
"@type": "EducationalOrganization",
144-
"name": "DataTalks.Club Community"
145-
}
146137
}
147138
</script>
148139
</body>

0 commit comments

Comments
 (0)