mirror of https://gitlab.com/bashrc2/epicyon
Redo schema.org for profile page
parent
c876bd5688
commit
0cc477fb0c
|
@ -647,16 +647,39 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str,
|
||||||
nameStr = removeHtml(actorJson['name'])
|
nameStr = removeHtml(actorJson['name'])
|
||||||
domainFull = actorJson['id'].split('://')[1].split('/')[0]
|
domainFull = actorJson['id'].split('://')[1].split('/')[0]
|
||||||
handle = actorJson['preferredUsername'] + '@' + domainFull
|
handle = actorJson['preferredUsername'] + '@' + domainFull
|
||||||
|
|
||||||
personMarkup = \
|
personMarkup = \
|
||||||
|
' "about": {\n' + \
|
||||||
|
' "@type" : "Person",\n' + \
|
||||||
|
' "name": "' + nameStr + '",\n' + \
|
||||||
|
' "image": "' + actorJson['icon']['url'] + '",\n' + \
|
||||||
|
' "description": "' + description + '",\n' + \
|
||||||
|
cityMarkup + skillsMarkup + \
|
||||||
|
' "url": "' + actorJson['id'] + '"\n' + \
|
||||||
|
' },\n'
|
||||||
|
|
||||||
|
licenseUrl = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
profileMarkup = \
|
||||||
' <script id="initial-state" type="application/ld+json">\n' + \
|
' <script id="initial-state" type="application/ld+json">\n' + \
|
||||||
' {\n' + \
|
' {\n' + \
|
||||||
' "@context" : "http://schema.org",\n' + \
|
' "@context":"https://schema.org",\n' + \
|
||||||
' "@type" : "Person",\n' + \
|
' "@type": "ProfilePage",\n' + \
|
||||||
|
' "mainEntityOfPage": {\n' + \
|
||||||
|
' "@type": "WebPage",\n' + \
|
||||||
|
" \"@id\": \"" + actorJson['id'] + "\"\n" + \
|
||||||
|
' },\n' + personMarkup + \
|
||||||
|
' "accountablePerson": {\n' + \
|
||||||
|
' "@type": "Person",\n' + \
|
||||||
|
' "name": "' + nameStr + '"\n' + \
|
||||||
|
' },\n' + \
|
||||||
|
' "copyrightHolder": {\n' + \
|
||||||
|
' "@type": "Person",\n' + \
|
||||||
|
' "name": "' + nameStr + '"\n' + \
|
||||||
|
' },\n' + \
|
||||||
' "name": "' + nameStr + '",\n' + \
|
' "name": "' + nameStr + '",\n' + \
|
||||||
' "image": "' + actorJson['icon']['url'] + '",\n' + \
|
' "image": "' + actorJson['icon']['url'] + '",\n' + \
|
||||||
' "description": "' + description + '",\n' + \
|
' "description": "' + description + '",\n' + \
|
||||||
cityMarkup + skillsMarkup + \
|
' "license": "' + licenseUrl + '"\n' + \
|
||||||
' "url": "' + actorJson['id'] + '"\n' + \
|
|
||||||
' }\n' + \
|
' }\n' + \
|
||||||
' </script>\n'
|
' </script>\n'
|
||||||
|
|
||||||
|
@ -683,7 +706,7 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str,
|
||||||
|
|
||||||
htmlStr = \
|
htmlStr = \
|
||||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle,
|
htmlHeaderWithExternalStyle(cssFilename, instanceTitle,
|
||||||
ogMetadata + personMarkup, lang)
|
ogMetadata + profileMarkup, lang)
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue