0.0.1 init, main page prepare
This commit is contained in:
38
BaseModels/search_optimization/ld_json/ld_ speakebale.py
Normal file
38
BaseModels/search_optimization/ld_json/ld_ speakebale.py
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
|
||||
def get_ld_speakebale(name, theme_xpath, info_xpath, url):
|
||||
|
||||
data = {
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "WebPage",
|
||||
"name": name,
|
||||
"speakable": {
|
||||
"@type": "SpeakableSpecification",
|
||||
"xPath": [
|
||||
theme_xpath,
|
||||
info_xpath
|
||||
]
|
||||
},
|
||||
"url": url
|
||||
}
|
||||
|
||||
return data
|
||||
|
||||
# <title>Speakable markup example</title>
|
||||
# <meta name="description" content="This page is all about the quick brown fox" />
|
||||
# <script type="application/ld+json">
|
||||
# {
|
||||
# "@context": "https://schema.org/",
|
||||
# "@type": "WebPage",
|
||||
# "name": "Quick Brown Fox",
|
||||
# "speakable":
|
||||
# {
|
||||
# "@type": "SpeakableSpecification",
|
||||
# "xPath": [
|
||||
# "/html/head/title",
|
||||
# "/html/head/meta[@name='description']/@content"
|
||||
# ]
|
||||
# },
|
||||
# "url": "http://www.quickbrownfox_example.com/quick-brown-fox"
|
||||
# }
|
||||
# </script>
|
||||
Reference in New Issue
Block a user