From 923a52183e1ad5fb9ff4dd2e672ce9c87ce7c5fc Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Sat, 14 May 2022 17:38:28 +0200 Subject: [PATCH] new project py --- new-project.py | 5 ++++- projects/documentation-template/new-project.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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)