From 6b8cae12cb5d60b37931332d9d8008649ae14566 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 12 Sep 2026 11:31:19 +0300 Subject: feat!: Update dunbar markup Currently the newest version of the markup is not on the main branch, mostly because of polish and the documentation. As an effect from the changes to the language, the sitemap is the only thing which needs to be created externally. --- meta/meta.awk | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'meta/meta.awk') diff --git a/meta/meta.awk b/meta/meta.awk index 58603d2..e439fc4 100644 --- a/meta/meta.awk +++ b/meta/meta.awk @@ -1,15 +1,4 @@ BEGIN { - FS="\t" - while ((getline < ENVIRON["META"]) > 0) { - if ($1 == "") continue - meta_title[$1] = $2 " \\— Syndamia" - meta_description[$1] = $3 - } - FS=" " - - HEADER = getfile(ENVIRON["HEADER"]) - FOOTER = getfile(ENVIRON["FOOTER"]) - sitemap = ENVIRON["DST"] "/sitemap.xml" print "" ORS \ " 0; --i) { if (!ARGV[i]) continue - #-- Add header and footer --# - start = HEADER - FILENAME = substr(ARGV[i], length(ENVIRON["DST"]) + 2) - gsub(/\$TITLE/, meta_title[FILENAME], start) - gsub(/\$DESCRIPTION/, meta_description[FILENAME], start) - - end = FOOTER - sub(/html$/, "du", FILENAME) - gsub(/\$DUNBAR_SOURCE/, "/" FILENAME, end) - - # Note: nawk (20250116) has what is probably a bug, - # if you do "print getfile(f) > f", you'll crash. - # This is probably because in getfile we close the - # file, but after the function is finished, the > expects - # the file to be opened (> probably opens the file before - # evaluating the print). - contents = start getfile(ARGV[i]) end - print contents > ARGV[i] - #-- Add to sitemap --# print "" ENVIRON["URL"] substr(ARGV[i], length(ENVIRON["DST"]) + 1) "" date "1.0" > sitemap } print "" > sitemap } - -function getfile(filename, status, linebuf, filebuf) { - while ((status = getline linebuf < filename) > 0) - filebuf = filebuf linebuf ORS - close(filename) - sub(ORS "$", "", filebuf) - return filebuf -} -- cgit v1.3.1-26-gb76a