aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--TODO.md1
-rwxr-xr-xnotYetAnotherWiki.lua19
2 files changed, 14 insertions, 6 deletions
diff --git a/TODO.md b/TODO.md
index 1e5c17a..089fe22 100644
--- a/TODO.md
+++ b/TODO.md
@@ -7,7 +7,6 @@ Make it perphekd!
7 7
8Add atom feed for single page. Alas cgit only seems to have ATOM feed on the whole repo, not individual files. 8Add atom feed for single page. Alas cgit only seems to have ATOM feed on the whole repo, not individual files.
9 9
10- git.devuan.org might have usable per page history.
11- However, once timestamps are sorted, I can use that code to generate (static?) RSS and ATOM feeds, and create page histories using diffs. 10- However, once timestamps are sorted, I can use that code to generate (static?) RSS and ATOM feeds, and create page histories using diffs.
12 11
13Fix up linky conversion. DONE, mostly. 12Fix up linky conversion. DONE, mostly.
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index e389e74..4cf091e 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -804,8 +804,17 @@ for name, file in pairs(Files) do
804 end 804 end
805 805
806 -- Figure out this pages footer links. 806 -- Figure out this pages footer links.
807 local temp = ''
807 metadata.footer = '' 808 metadata.footer = ''
808 if nil ~= metadata.pagehistory then metadata.history = '<p>Page&nbsp;<a href="' .. metadata.pagehistory .. '/' .. name .. '.md">history</a></p>' else metadata.history = '' end 809 if nil == metadata.pagehistory then
810 if 'Foswiki' == metadata.ogWiki then metadata.pagehistory = metadata.ogURL .. '/bin/oops/' .. metadata.ogBase .. '/' .. metadata.ogFile .. '?template=oopshistory' end
811 if 'PmWiki' == metadata.ogWiki then metadata.pagehistory = metadata.ogURL .. '/?n=' .. metadata.ogBase .. '.' .. metadata.ogFile .. '?action=diff' end
812 else
813 temp = '/' .. name .. '.md'
814 end
815 if nil ~= metadata.pagehistory then metadata.history = '<p>Page&nbsp;<a href="' .. metadata.pagehistory .. temp .. '">history</a></p>' else
816 metadata.history = ''
817 end
809 if nil ~= metadata.sourcecode then metadata.footer = '<a href="' .. metadata.sourcecode .. '">source code</a>' end 818 if nil ~= metadata.sourcecode then metadata.footer = '<a href="' .. metadata.sourcecode .. '">source code</a>' end
810 if nil ~= metadata.feedatom then metadata.footer = '<a href="' .. metadata.feedatom .. '">atom feed</a> &nbsp; &nbsp; ' .. metadata.footer end 819 if nil ~= metadata.feedatom then metadata.footer = '<a href="' .. metadata.feedatom .. '">atom feed</a> &nbsp; &nbsp; ' .. metadata.footer end
811 if metadata.footer ~= '' then metadata.footer = 'Web site ' .. metadata.footer end 820 if metadata.footer ~= '' then metadata.footer = 'Web site ' .. metadata.footer end
@@ -814,10 +823,10 @@ for name, file in pairs(Files) do
814 local title, link = whichWiki(metadata) 823 local title, link = whichWiki(metadata)
815 link = string.gsub(link, 'https://', 'HTTPS://') -- Prevent this one from being converted. 824 link = string.gsub(link, 'https://', 'HTTPS://') -- Prevent this one from being converted.
816-- TODO - wrap "edit" in a link to actually edit it. PmWiki "?action=edit" Foswiki "https://fos.wiki.devuan.org/bit/edit/" .. page .. "?t=" .. 10 digit random number? 825-- TODO - wrap "edit" in a link to actually edit it. PmWiki "?action=edit" Foswiki "https://fos.wiki.devuan.org/bit/edit/" .. page .. "?t=" .. 10 digit random number?
817 local edit = 'edit' 826 local edit = 'T'
818 if 'PmWiki' == metadata.ogWiki then edit = '<a href="' .. link .. '?action=edit">edit</a>' end 827 if 'PmWiki' == metadata.ogWiki then edit = 'Maybe you can <a href="' .. link .. '?action=edit">edit</a> t' end
819-- if 'Foswiki' == metadata.ogWiki then edit = 'edit' end 828-- if 'Foswiki' == metadata.ogWiki then edit = '' end
820 metadata.footer = '<a href="' .. link .. '">Original page</a>, maybe you can ' .. edit .. ' it. &nbsp; ' .. metadata.footer 829 metadata.footer = edit .. 'he <a href="' .. link .. '">original page</a>. &nbsp; ' .. metadata.footer
821 end 830 end
822 metadata.footer = '<p>' .. metadata.footer .. '</p>' 831 metadata.footer = '<p>' .. metadata.footer .. '</p>'
823 832