0.0.1 init, main page prepare
This commit is contained in:
22
BaseModels/search_optimization/ld_json/ld_search.py
Normal file
22
BaseModels/search_optimization/ld_json/ld_search.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import json
|
||||
import project_sets
|
||||
|
||||
def get_ld_search(domain):
|
||||
|
||||
# Только для главной страницы
|
||||
|
||||
data = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": domain, #"https://truenergy.by/",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": {
|
||||
"@type": "EntryPoint",
|
||||
"urlTemplate": "{domain}/{search_term_string}/".format(domain=domain, search_term_string='{search_term_string}')
|
||||
},
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
}
|
||||
|
||||
return json.dumps(data)
|
||||
Reference in New Issue
Block a user