diff --git a/content/STRUCTURE.json b/content/STRUCTURE.json index 0c7a1085..c51d853b 100644 --- a/content/STRUCTURE.json +++ b/content/STRUCTURE.json @@ -34,7 +34,7 @@ "generator": "news", "meta": {"dir": "/content/incus/news/", "input": "incus/news.md", - "toc_depth": "2-2", + "toc_depth": "2-3", "str_older": "Older news", "str_back": "Back to the news overview"}}, diff --git a/generate b/generate index 1445d8b0..0e07249e 100755 --- a/generate +++ b/generate @@ -488,8 +488,14 @@ def gen_page(entry, override, prefix, **variables): "%s\n" % \ (title, article_date) + article_content = "" + for line in article["content"].splitlines(keepends=True): + if line.startswith("#"): + line = "##%s" % line + article_content += line + # Compose the content - article_content = "[TOC]\n" + article_title + article["content"] + article_content = "[TOC]\n" + article_title + article_content # Get the file name and path article_filename = date.strftime("%Y_%m_%d_%H_%M")+".html"