Files
Aerbim/BaseModels/search_optimization/ld_json/ld_search.py
2023-11-16 14:38:44 +03:00

22 lines
631 B
Python

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)