form: added profile question for rel='me'. HTML: added link to metas

This commit is contained in:
Cyrille L 2023-01-05 17:59:09 +01:00
parent e3908df489
commit 87c79b803d
2 changed files with 28 additions and 7 deletions

View File

@ -213,8 +213,8 @@ def create_domain(target, option):
'domain_license = "%s"'%domain_license)
# Get License URL
#----------------
# Get License URL (optionnal)
#----------------------------
try: domain_licurl = tyto.domain_licurl
except: domain_licurl = ''
@ -258,6 +258,21 @@ def create_domain(target, option):
'domain_sep = "%s"'%domain_sep)
# Profile for rel="me" (optionnal)
#---------------------------------
try: domain_relme = tyto.domain_relme
except: domain_relme = ''
ask = ''
ask = input(' ├ Optional. Profile URL ? ("%s") '%domain_relme)
if ask:
if not ask.startswith('http'): tyto.exiting("3", ask, True)
domain_relme = ask
tyto.set_file(tyto.domain_conf, False,
'domain_relme = "%s"'%domain_relme)
# Sidebar Title
#--------------
try: sidebar_title = tyto.sidebar_title

View File

@ -55,13 +55,18 @@ def create_metas_page():
css_ref = 'media="screen" href="%s%s" />'%(sub_uri, css_file)
rss_file = 'rss.xml'
rss_ref = 'type="application/rss+xml" ' + \
'href="%s%s" title="RSS 2.0. %s %s %s'%(
sub_uri, rss_file, domain_title, domain_sep, domain_short
)
'href="%s%s" title="RSS 2.0. %s %s %s'%(
sub_uri, rss_file, domain_title, domain_sep, domain_short
)
icon_file = 'favicon.png'
icon_ref = 'type="image/png" href="%s%s"'%(sub_uri, icon_file)
en_date = tyto.set_en_date(date[0])
relme = '' # External URL in metas (if exists in config domain)
if domain_relme:
relme = '\n<link rel="me" type="text/html" href="%s">'%(
domain_relme
)
# Set all raw HTML metas
#-----------------------
@ -82,7 +87,8 @@ def create_metas_page():
'<link rel="canonical" href="%s" />\n'%post_url + \
'<link rel="alternate" %s />\n'%(rss_ref) + \
'<link rel="stylesheet" %s\n'%css_ref + \
'<link rel="shortcut icon" %s />\n'%icon_ref
'<link rel="shortcut icon" %s />'%icon_ref + \
'%s'%relme
# Create HTML tabulation for metas