Skip to content

Commit 23a72fb

Browse files
committed
Update json-ld to change to Aricle and articleBody
1 parent 588d62e commit 23a72fb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pytorch_sphinx_theme2/templates/layout.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@
191191
<script type="application/ld+json">
192192
{
193193
"@context": "https://schema.org",
194-
"@type": "TechArticle",
194+
"@type": "Article",
195195
"name": {{ title|striptags|trim|tojson }},
196196
"headline": {{ title|striptags|trim|tojson }},
197197
"description": "PyTorch Documentation. Explore PyTorch, an open-source machine learning library that accelerates the path from research prototyping to production deployment. Discover tutorials, API references, and guides to help you build and deploy deep learning models efficiently.",
198198
"url": "{{ canonical_url|default((url_root if url_root is defined else '/') + pagename + '.html', true) }}",
199+
"articleBody": {{ body|striptags|trim|tojson }},
199200
"author": {
200201
"@type": "Organization",
201202
"name": "PyTorch Contributors",
@@ -206,8 +207,8 @@
206207
"@type": "WebPage",
207208
"@id": "{{ canonical_url|default((url_root if url_root is defined else '/') + pagename + '.html', true) }}"
208209
},
209-
"datePublished": "{{ doc_created|default('') }}{% if doc_created %}T00:00:00Z{% endif %}",
210-
"dateModified": "{{ doc_updated|default('') }}{% if doc_updated %}T00:00:00Z{% endif %}"
210+
"datePublished": "{{ doc_created|default('2023-01-01') }}T00:00:00Z",
211+
"dateModified": "{{ doc_updated|default('2023-01-01') }}T00:00:00Z"
211212
}
212213
</script>
213214
{% endblock %}

0 commit comments

Comments
 (0)