diff --git a/spip2md/Metadata.py b/spip2md/Metadata.py index 68a3a5c..7f8fe3e 100644 --- a/spip2md/Metadata.py +++ b/spip2md/Metadata.py @@ -62,8 +62,8 @@ class metadata: def get_starting(self): return ( # f"{self.caption}\n" if len(self.caption) > 0 else "" + f"# {self.title}\n" - f"{self.caption}\n" - if len(self.caption) > 0 + f"{self.caption}\n\n***\n" + if len(self.caption) > 0 and self.caption != " " else "" ) diff --git a/spip2md/spip2md.py b/spip2md/spip2md.py index 4742a4b..5ac3d43 100755 --- a/spip2md/spip2md.py +++ b/spip2md/spip2md.py @@ -48,7 +48,7 @@ for exported in range(nbToExport): mkdir(articleDir) with open("{}/index.md".format(articleDir), "w") as f: f.write( - "{}\n\n{}\n{}\n{}".format( + "{}\n{}\n{}\n{}".format( meta.get_frontmatter(), meta.get_starting(), convert(article.texte),