1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

changed subtitle to description

This commit is contained in:
Bastian Venthur
2021-02-07 16:54:50 +01:00
parent 58779a21c6
commit 397bc61395

View File

@@ -83,7 +83,7 @@ def get_config(configfile):
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read(configfile) config.read(configfile)
# check for the mandatory options # check for the mandatory options
for value in 'base_url', 'title', 'subtitle', 'author': for value in 'base_url', 'title', 'description', 'author':
try: try:
config['main'][value] config['main'][value]
except Exception: except Exception:
@@ -145,7 +145,7 @@ def build(args):
generate_feed(articles, args.output_dir, generate_feed(articles, args.output_dir,
base_url=config['base_url'], base_url=config['base_url'],
blog_title=config['title'], blog_title=config['title'],
blog_subtitle=config['subtitle'], blog_description=config['description'],
blog_author=config['author'], blog_author=config['author'],
) )
generate_archive(articles, archive_template, args.output_dir) generate_archive(articles, archive_template, args.output_dir)
@@ -210,13 +210,13 @@ def generate_feed(
output_dir, output_dir,
base_url, base_url,
blog_title, blog_title,
blog_subtitle, blog_description,
blog_author, blog_author,
): ):
feed = feedgenerator.Atom1Feed( feed = feedgenerator.Atom1Feed(
link=base_url, link=base_url,
title=blog_title, title=blog_title,
description=blog_subtitle, description=blog_description,
feed_url=base_url + 'atom.xml', feed_url=base_url + 'atom.xml',
) )
@@ -250,14 +250,14 @@ def quickstart(args):
base_url = input("Hostname (and path) to the root? " base_url = input("Hostname (and path) to the root? "
"[https://example.com/]: ") "[https://example.com/]: ")
title = input("Title of your website? ") title = input("Title of your website? ")
subtitle = input("Subtitle of your website? ") description = input("Description of your website [John Does's Blog]? ")
author = input("Author of your website [John Doe]? ") author = input("Author of your website [John Doe]? ")
config = configparser.ConfigParser() config = configparser.ConfigParser()
config['main'] = { config['main'] = {
'base_url': base_url, 'base_url': base_url,
'title': title, 'title': title,
'subtitle': subtitle, 'description': description,
'author': author, 'author': author,
} }
with open('config.ini', 'w') as fh: with open('config.ini', 'w') as fh: