diff options
| Commit | 40213ad72ebf72298e0eb6c7ded9729c36fd13c8 (patch) | |
|---|---|---|
| Author | 2025-08-19 15:44:36 +0300 | |
| Committer | 2025-08-19 15:44:41 +0300 | |
| Files | ba57b6eddc12396e2a5408daca46c2fc4a856584 /meta | |
| syndamia.com-40213ad72ebf72298e0eb6c7ded9729c36fd13c8.tar syndamia.com-40213ad72ebf72298e0eb6c7ded9729c36fd13c8.tar.gz syndamia.com-40213ad72ebf72298e0eb6c7ded9729c36fd13c8.zip | ||
| Parent | 6969ff774c8d5831850ef3afa72b1956767dc18b (diff) | |
feat(generate.sh): Improve implementation and add tiny website generation
1 files changed, 3 insertions, 3 deletions
| -rw-r--r-- | meta/meta.awk | 6 |
diff --git a/meta/meta.awk b/meta/meta.awk index 7688d6a..f586fef 100644 --- a/meta/meta.awk +++ b/meta/meta.awk @@ -10,7 +10,7 @@ BEGIN { HEADER = getfile(ENVIRON["HEADER"]) FOOTER = getfile(ENVIRON["FOOTER"]) - sitemap = ENVIRON["GEN_DIR"] "/sitemap.xml" + sitemap = ENVIRON["DST"] "/sitemap.xml" print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ORS \ "<urlset" ORS \ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" ORS \ @@ -23,14 +23,14 @@ BEGIN { #-- Add header and footer --# start = HEADER - FILENAME = substr(ARGV[i], length(ENVIRON["GEN_DIR"]) + 2) + FILENAME = substr(ARGV[i], length(ENVIRON["DST"]) + 2) gsub(/\$TITLE/, meta_title[FILENAME], start) gsub(/\$DESCRIPTION/, meta_description[FILENAME], start) print start getfile(ARGV[i]) FOOTER > ARGV[i] #-- Add to sitemap --# - print "<url><loc>" ENVIRON["URL"] substr(ARGV[i], length(ENVIRON["GEN_DIR"]) + 1) "</loc><lastmod>" date "</lastmod><priority>1.0</priority></url>" > sitemap + print "<url><loc>" ENVIRON["URL"] substr(ARGV[i], length(ENVIRON["DST"]) + 1) "</loc><lastmod>" date "</lastmod><priority>1.0</priority></url>" > sitemap } print "</urlset>" > sitemap |