diff --git a/new-project.py b/new-project.py index 08c206a..8f780c6 100644 --- a/new-project.py +++ b/new-project.py @@ -27,7 +27,7 @@ template = input("🏛️ Custom Template: ") script = input("🧑 Custom JS: ") css = input("🤪 Custom CSS: ") -project = { +metadata = { 'title': title, 'slug': slug, 'description': description, @@ -44,6 +44,9 @@ project = { 'css': css } +project = {k: v for k, v in metadata.items() if v} +print(project) + post = frontmatter.Post('', **project) diff --git a/projects/documentation-template/new-project.py b/projects/documentation-template/new-project.py index 08c206a..8f780c6 100644 --- a/projects/documentation-template/new-project.py +++ b/projects/documentation-template/new-project.py @@ -27,7 +27,7 @@ template = input("🏛️ Custom Template: ") script = input("🧑 Custom JS: ") css = input("🤪 Custom CSS: ") -project = { +metadata = { 'title': title, 'slug': slug, 'description': description, @@ -44,6 +44,9 @@ project = { 'css': css } +project = {k: v for k, v in metadata.items() if v} +print(project) + post = frontmatter.Post('', **project)