diff options
-rwxr-xr-x | zzcxz.cgi | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -143,6 +143,7 @@ local base = template [[ <p><a href="https://citrons.xyz/git/zzcxz.git/about"> source code </a></p> + <p><a href="/g/zzcxy">archive</a></p> <p><a href="https://citrons.xyz">citrons.xyz</a></p> </div> </footer> @@ -168,6 +169,8 @@ local function parse_directive(line, directives, tmp_flags) local redirect = args:match "^%s*(%w%w%w%w%w)%s*$" if not redirect then return end directives.redirect = redirect + elseif directive == "deadend" then + directives.deadend = true elseif directive == "set" then if args:match "^%s*$" then return end local flagname, text = args:match "^%s*([%w%-_]+)%s*(.-)%s*$" @@ -278,6 +281,8 @@ local function parse_page(s) table.insert(content, line:sub(2)) elseif line:match("^!image") then page.illustration = line:match "^!image%s+(%w+)" + elseif line:match("^!archive") then + page.archive = true else local target, action = line:match "^(%w%w%w%w%w):(.-)\n$" if action then @@ -418,7 +423,7 @@ map["^/g/(%w%w%w%w%w)$"] = function(p) html_encode(a.target), html_encode(a.action))) end end - if not directives.deadend then + if not directives.deadend and not page.archive then table.insert(actions, ([[ <li> |