diff --git a/src/var/lib/tyto/program/domain.py b/src/var/lib/tyto/program/domain.py index 8fd3ef8..812d469 100644 --- a/src/var/lib/tyto/program/domain.py +++ b/src/var/lib/tyto/program/domain.py @@ -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 diff --git a/src/var/lib/tyto/program/html.py b/src/var/lib/tyto/program/html.py index 56c1311..2c730bc 100644 --- a/src/var/lib/tyto/program/html.py +++ b/src/var/lib/tyto/program/html.py @@ -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'%( + domain_relme + ) + # Set all raw HTML metas #----------------------- @@ -82,7 +87,8 @@ def create_metas_page(): '\n'%post_url + \ '\n'%(rss_ref) + \ '\n'%icon_ref + ''%icon_ref + \ + '%s'%relme # Create HTML tabulation for metas