Skip to content

Saleor Core: the high performance, composable, headless commerce API.

WIP

Krzysztof Wolskie1da70eabc1b
diff --git a/saleor/core/utils/json_ld.py b/saleor/core/utils/json_ld.py
new file mode 100644
index 0000000000..10e1ef3d5f
--- /dev/null
+++ b/saleor/core/utils/json_ld.py
@@ -0,0 +1,38 @@
+
+"""
+<script type="application/ld+json">
+{
+ "@context": "http://schema.org",
+ "@type": "WebSite",
+ "url": "http://www.example.com/",
+ "name": "Generally the title",
+ "author": {
+ "@type": "Person",
+ "name": "Jane Doe"
+ },
+ "description": "Any sort of description, I'd keep it short",
+ "publisher": "publisher name",
+ "potentialAction": {
+ "@type": "SearchAction",
+ "target": "http://www.example.com/?s={search_term}",
+ "query-input": "required name=search_term" }
+ }
+</script>
+"""
+
+def web_page_schema():
+ data = {"@context": "http://schema.org",
+ "@type": "WebSite",
+ "url": "http://www.example.com/",
+ "name": "Generally the title",
+ "author": {"@type": "Person",
+ "name": "Jane Doe"},
+ "description": "Any sort of description, I'd keep it short",
+ "publisher": "publisher name",
+ "potentialAction": {
+ "@type": "SearchAction",
+ "target": "http://www.example.com/?s={search_term}",
+ "query-input": "required name=search_term" }
+ }
+
+ pass