diff --git a/src/var/lib/tyto/program/html.py b/src/var/lib/tyto/program/html.py index 65582cc..48c9573 100644 --- a/src/var/lib/tyto/program/html.py +++ b/src/var/lib/tyto/program/html.py @@ -52,9 +52,7 @@ def manage_configs(target, option): # Load article DB # # Start HTML page sections # #--------------------------# -def set_page(post_db, target, article_bottom): - exec(open(post_db).read(),globals()) - +def set_page(target, article_bottom): create_metas_page() # Include metas tags create_main_page(target, article_bottom) # Create main page @@ -69,20 +67,20 @@ def create_metas_page(): #------------------- metas_page = '' scale = 'width=device-width, initial-scale=1.0' - all_tags = db.domain_tags + ',' + tags + all_tags = db.domain_tags + ',' + db.tags css_file = 'template/style.css' - css_ref = 'media="screen" href="%s%s"'%(sub_uri, css_file) + css_ref = 'media="screen" href="%s%s"'%(db.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, + db.sub_uri, rss_file, db.domain_title, db.domain_sep, db.domain_short ) icon_file = 'favicon.png' icon_ref = 'type="image/png" href="%stemplate/%s"'%( - sub_uri, icon_file + db.sub_uri, icon_file ) - en_date = tyto.set_en_date(date[0]) + en_date = tyto.set_en_date(db.date[0]) relme = '' # External URL in metas (if exists in config domain) if db.domain_relme: relme = '\n '%( @@ -100,25 +98,25 @@ def create_metas_page(): ' \n'%db.domain_mail + \ ' \n'%db.domain_license + \ ' \n'%tyto.Tyto + \ - ' \n'%title + \ - ' \n'%author + \ - ' \n'%about + \ + ' \n'%db.title + \ + ' \n'%db.author + \ + ' \n'%db.about + \ ' \n'%all_tags + \ ' \n'%en_date + \ - ' \n'%http_www + \ + ' \n'%db.http_www + \ ' \n'%(rss_ref) + \ ' \n'%css_ref + \ ' \n'%icon_ref + \ ' \n' + \ ' \n'%db.domain_title + \ - ' \n'%title + \ + ' \n'%db.title + \ ' \n' + \ - ' \n'%http_www + \ - ' \n'%about + \ - ' \n'%snpic + \ + ' \n'%db.http_www + \ + ' \n'%db.about + \ + ' \n'%db.snpic + \ '%s'%relme + \ '\n' + \ - '