form: added profile question for rel='me'. HTML: added link to metas
This commit is contained in:
parent
e3908df489
commit
87c79b803d
|
@ -213,8 +213,8 @@ def create_domain(target, option):
|
||||||
'domain_license = "%s"'%domain_license)
|
'domain_license = "%s"'%domain_license)
|
||||||
|
|
||||||
|
|
||||||
# Get License URL
|
# Get License URL (optionnal)
|
||||||
#----------------
|
#----------------------------
|
||||||
try: domain_licurl = tyto.domain_licurl
|
try: domain_licurl = tyto.domain_licurl
|
||||||
except: domain_licurl = ''
|
except: domain_licurl = ''
|
||||||
|
|
||||||
|
@ -258,6 +258,21 @@ def create_domain(target, option):
|
||||||
'domain_sep = "%s"'%domain_sep)
|
'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
|
# Sidebar Title
|
||||||
#--------------
|
#--------------
|
||||||
try: sidebar_title = tyto.sidebar_title
|
try: sidebar_title = tyto.sidebar_title
|
||||||
|
|
|
@ -55,12 +55,17 @@ def create_metas_page():
|
||||||
css_ref = 'media="screen" href="%s%s" />'%(sub_uri, css_file)
|
css_ref = 'media="screen" href="%s%s" />'%(sub_uri, css_file)
|
||||||
rss_file = 'rss.xml'
|
rss_file = 'rss.xml'
|
||||||
rss_ref = 'type="application/rss+xml" ' + \
|
rss_ref = 'type="application/rss+xml" ' + \
|
||||||
'href="%s%s" title="RSS 2.0. %s %s %s'%(
|
'href="%s%s" title="RSS 2.0. %s %s %s'%(
|
||||||
sub_uri, rss_file, domain_title, domain_sep, domain_short
|
sub_uri, rss_file, domain_title, domain_sep, domain_short
|
||||||
)
|
)
|
||||||
icon_file = 'favicon.png'
|
icon_file = 'favicon.png'
|
||||||
icon_ref = 'type="image/png" href="%s%s"'%(sub_uri, icon_file)
|
icon_ref = 'type="image/png" href="%s%s"'%(sub_uri, icon_file)
|
||||||
en_date = tyto.set_en_date(date[0])
|
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
|
# Set all raw HTML metas
|
||||||
|
@ -82,7 +87,8 @@ def create_metas_page():
|
||||||
'<link rel="canonical" href="%s" />\n'%post_url + \
|
'<link rel="canonical" href="%s" />\n'%post_url + \
|
||||||
'<link rel="alternate" %s />\n'%(rss_ref) + \
|
'<link rel="alternate" %s />\n'%(rss_ref) + \
|
||||||
'<link rel="stylesheet" %s\n'%css_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
|
# Create HTML tabulation for metas
|
||||||
|
|
Loading…
Reference in New Issue