From 5d879fc009271e97686f6f63f101a10e6bd4243b Mon Sep 17 00:00:00 2001 From: xonix Date: Wed, 6 Mar 2024 02:06:04 +0200 Subject: [PATCH] Create site with documentation #164 --- mdbooker.awk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mdbooker.awk b/mdbooker.awk index 475c12d..d7adb5f 100644 --- a/mdbooker.awk +++ b/mdbooker.awk @@ -11,10 +11,8 @@ match($0, /^#+/) { handleTitle(RLENGTH); next } function handleTitle(h, md,indent,dir,i,path) { if (Title) { for (i = 2; i < H; i++) - dir = dir (dir ? "/" : "") fname(PathElements[i]) - print "generating: " (path = dir (dir ? "/" : "") (md = fname(Title) ".md")) "..." - if (dir) - system("mkdir -p '" BOOK dir "'") + dir = dir (dir ? "-" : "") fname(PathElements[i]) + print "generating: " (path = dir (dir ? "-" : "") (md = fname(Title) ".md")) "..." print Content > BOOK path if ((indent = H - 2) < 0) indent = 0