From 008e3fc5e24b606a63dcc3ddc4d5a4f79d5e8fb8 Mon Sep 17 00:00:00 2001 From: Laurens Knoll <3205006+laurensknoll@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:36:13 +0100 Subject: [PATCH] Made subtitle an optional attribute, as it's not used for the Xebia.com brand --- src/wordpress_markdown_blog_loader/new.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wordpress_markdown_blog_loader/new.py b/src/wordpress_markdown_blog_loader/new.py index a526bcf..fc7c38c 100644 --- a/src/wordpress_markdown_blog_loader/new.py +++ b/src/wordpress_markdown_blog_loader/new.py @@ -37,7 +37,7 @@ def convert(self, value, param, ctx): @click.command(name="new") @click.option("--title", required=True, help="of the blog") -@click.option("--subtitle", required=True, help="of the blog") +@click.option("--subtitle", required=False, help="(Optional) subtitle of the blog") @click.option("--author", required=True, help="of the blog") @click.option("--email", required=False, help="of the author") @click.option("--image", required=False, type=ImageType(), help="for the banner") @@ -67,7 +67,8 @@ def command(title, subtitle, author, image, brand, email, image_credits): blog.dir = directory blog.path = directory.joinpath("index.md") blog.title = title.strip() - blog.subtitle = subtitle.strip() + if subtitle: + blog.subtitle = subtitle.strip() blog.focus_keywords = " ".join(stopwords.clean(title.lower().split(), "en")) blog.status = "draft" blog.slug = slug