0.0.1 init, main page prepare

This commit is contained in:
SDE
2023-11-16 14:38:44 +03:00
parent 894ee6d750
commit 74f7bbb24b
78 changed files with 6198 additions and 21 deletions

View 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>