diff options
| Commit | 0fbac293a5b3ab2e1360d8dc2743c1ae71bc128f (patch) | |
|---|---|---|
| Author | 2025-08-18 19:02:23 +0300 | |
| Committer | 2025-08-18 19:02:23 +0300 | |
| Files | 13c6679e365a6f5fb8928b82b176017d85dee1db /awk-edits/Pagenav.awk | |
| syndamia.com-0fbac293a5b3ab2e1360d8dc2743c1ae71bc128f.tar syndamia.com-0fbac293a5b3ab2e1360d8dc2743c1ae71bc128f.tar.gz syndamia.com-0fbac293a5b3ab2e1360d8dc2743c1ae71bc128f.zip | ||
| Parent | 6f20ac5169469d42f5c945e3de01b297dc028c02 (diff) | |
chore: Remove outdated files
1 files changed, 0 insertions, 50 deletions
| -rw-r--r-- | awk-edits/Pagenav.awk | 50 |
diff --git a/awk-edits/Pagenav.awk b/awk-edits/Pagenav.awk deleted file mode 100644 index 3b05c10..0000000 --- a/awk-edits/Pagenav.awk +++ /dev/null @@ -1,50 +0,0 @@ -# .*(blog|slides|teaching|tutorials|misc)/.*/.*html -# -# == About == -# -# I call pagenav the stuff directly below the first h1. These include file dates -# and GitLab source link. -# Currently it only works for blog and tutorial pages. -# -# This is by far the most hard-coded and inefficient awk script in awk-edits. -# Creation and last edited dates are taken from git commits, and getting the correct info -# by file name can only be done (easily) with git log, which is unfortunately very slow. -# Another issue is that it depends on the build directories in build scripts, meaning -# it won't work without modification if you try to build it somewhere else. -# -# Split into Pagenav.awk and post-pagenav.awk - -nopagenav == 0 && /<h1/ { - match(FILENAME, /(blog|slides|teaching|tutorials|misc)\/.*\//) - path = substr(FILENAME, RSTART, length(FILENAME) - RSTART - 3) - - # Stats element - stats = "<div id=\"pagenav-stats\">" ORS \ -" <strong>Reading: " (int(words / 180) + 1) " min</strong> || <strong>Created: " created "</strong> || <strong>Edited: " edited "</strong>" ORS \ -" || <a href=\"https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/" path "md\"><strong>GitLab source</strong></a>" ORS \ -"</div>" - - # Breadcrumbs element - sub(/\/[^/]*$/, "", path) - foldersLen = split(path, folders, "/") - - href = ".." - breadcrumb = " » <em>" folders[foldersLen] "</em>" - for (i = foldersLen-1; i > 0; i--) { - breadcrumb = " » " "<a href=" href ">" folders[i] "</a>" breadcrumb - href = "../" href - } - breadcrumb = \ -" <div id=\"pagenav-breadcrumb\">" ORS \ -" " breadcrumb ORS \ -" </div>" - - # Pagenav element - $0 = $0 ORS \ -"<div id=\"pagenav\">" ORS \ - stats ORS \ - breadcrumb ORS \ -"</div>" - - nopagenav = 1 -} |