From 0cc477fb0c82eef25f454429b5c038ac8881eb6e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Nov 2021 12:27:52 +0000 Subject: [PATCH] Redo schema.org for profile page --- webapp_utils.py | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/webapp_utils.py b/webapp_utils.py index 0a03c9743..6188c43ac 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -647,16 +647,39 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str, nameStr = removeHtml(actorJson['name']) domainFull = actorJson['id'].split('://')[1].split('/')[0] handle = actorJson['preferredUsername'] + '@' + domainFull + 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 = \ ' \n' @@ -683,7 +706,7 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str, htmlStr = \ htmlHeaderWithExternalStyle(cssFilename, instanceTitle, - ogMetadata + personMarkup, lang) + ogMetadata + profileMarkup, lang) return htmlStr