aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--INSTALL.md2
-rw-r--r--README2
-rw-r--r--TODO.md4
-rw-r--r--about/index.md4
-rw-r--r--default.template29
-rwxr-xr-xnotYetAnotherWiki.lua11
-rw-r--r--testing/index.md4
7 files changed, 20 insertions, 36 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 596f8bf..7eabf39 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,7 +1,7 @@
1--- 1---
2pagetitle: "INSTALL" 2pagetitle: "INSTALL"
3author: onefang 3author: onefang
4history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/INSTALL.md 4pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/INSTALL.md
5--- 5---
6 6
7notYetAnotherWiki uses [lcmark](https://github.com/jgm/lcmark) to parse [CommonMark](https://commonmark.org/) into HTML. You can probably install it using luarocks. lua-yaml is the YAML parsing library I test with. 7notYetAnotherWiki uses [lcmark](https://github.com/jgm/lcmark) to parse [CommonMark](https://commonmark.org/) into HTML. You can probably install it using luarocks. lua-yaml is the YAML parsing library I test with.
diff --git a/README b/README
index 29e3b63..444578e 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
1--- 1---
2pagetitle: "notYetAnotherWiki" 2pagetitle: "notYetAnotherWiki"
3author: onefang 3author: onefang
4history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/index.md 4pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/index.md
5--- 5---
6 6
7notYetAnotherWiki is not another wiki, at least not yet. It'll be much 7notYetAnotherWiki is not another wiki, at least not yet. It'll be much
diff --git a/TODO.md b/TODO.md
index f809490..1a87d89 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,12 +1,10 @@
1--- 1---
2pagetitle: "TODO" 2pagetitle: "TODO"
3author: onefang 3author: onefang
4history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/TODO.md 4pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/TODO.md
5--- 5---
6## Do these 6## Do these
7 7
8Footer is still wrong.
9
10Clean up the favicon and logo stuff. 8Clean up the favicon and logo stuff.
11 Have one in a root directory that the pages in sub directories point to, instead of the current symlinks. 9 Have one in a root directory that the pages in sub directories point to, instead of the current symlinks.
12 Apply the same solution to default.template. 10 Apply the same solution to default.template.
diff --git a/about/index.md b/about/index.md
index 6e2b5e2..1b9be48 100644
--- a/about/index.md
+++ b/about/index.md
@@ -1,9 +1,7 @@
1--- 1---
2pagetitle: "notYetAnotherWiki is not another wiki, at least not yet. It'll be much more than that, eventually." 2pagetitle: "notYetAnotherWiki is not another wiki, at least not yet. It'll be much more than that, eventually."
3author: onefang 3author: onefang
4feedatom: https://sledjhamr.org/cgit/notYetAnotherWiki/atom 4pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/About/index.md
5history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/About/index.md
6sourcecode: https://sledjhamr.org/cgit/notYetAnotherWiki/
7--- 5---
8 6
9This is a new directory, an entire PR department can hang out here. 7This is a new directory, an entire PR department can hang out here.
diff --git a/default.template b/default.template
index 592813a..fba6ef4 100644
--- a/default.template
+++ b/default.template
@@ -9,11 +9,6 @@
9 <style> 9 <style>
10 html {font-family: sans-serif;} 10 html {font-family: sans-serif;}
11 11
12 body {
13 background-color: black;
14 color: white !important;
15 }
16
17 pre { 12 pre {
18 background-color: $karenpurple$; 13 background-color: $karenpurple$;
19 overflow-x: auto; 14 overflow-x: auto;
@@ -25,10 +20,6 @@
25 list-style-type: none; 20 list-style-type: none;
26 } 21 }
27 22
28 .contentBox {
29 overflow-y: auto;
30 overflow-x: hidden;
31 }
32 </style> 23 </style>
33 </head> 24 </head>
34 <body bgcolor="black" text="white" alink="yellow" link="yellowgreen" vlink="red"> 25 <body bgcolor="black" text="white" alink="yellow" link="yellowgreen" vlink="red">
@@ -38,31 +29,21 @@
38 <td style="text-align: right;">$header$ &nbsp; plus login and register buttons &nbsp;</td> 29 <td style="text-align: right;">$header$ &nbsp; plus login and register buttons &nbsp;</td>
39 </tr> 30 </tr>
40 <tr> 31 <tr>
41 <td rowspan=2 style="white-space:nowrap; vertical-align:top;"> 32 <td rowspan=2 style="white-space:nowrap; vertical-align:top;">$menu$</td>
42 $menu$ 33 <td><p>&#x1f463; $trail$</p></td>
43 </td>
44 <td>
45 <p>&#x1f463; $trail$</p>
46 </td>
47 </tr> 34 </tr>
48 <tr> 35 <tr>
49 <td style="background-color: black; width: fit-content;"> 36 <td style="background-color: black; width: fit-content;">
50 <main class="contentBox"> 37 <main class="contentBox" style="overflow-y: auto; overflow-x: hidden;">
51 <div name="contentFrame" style="background-color: black;">
52 <h1>$pagetitle$</h1> 38 <h1>$pagetitle$</h1>
53 Author: $author$ 39 Author: $author$
54 $body$ 40 $body$
55 </div>
56 </main> 41 </main>
57 </td> 42 </td>
58 </tr> 43 </tr>
59 <tr> 44 <tr>
60 <td> 45 <td>$history$</td>
61 <p>Page <a href="$history$">history</a></p> 46 <td style="text-align: right;">$footer$</td>
62 </td>
63 <td style="text-align: right;">
64 <p>Web site <a href="$feedatom$">atom feed</a> and <a href="$sourcecode$">source code</a> &nbsp; Powered by <a href="https://sledjhamr.org/cgit/notYetAnotherWiki/about/">notYetAnotherWiki</a> Version $version$. &nbsp;</p>
65 </td>
66 </tr> 47 </tr>
67 </table> 48 </table>
68 </body> 49 </body>
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 37bbd94..2faf285 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -4,7 +4,11 @@ local lcmark = require("lcmark")
4 4
5 5
6 6
7local globalData = {favicon = 'nYAW_icon.png', logo = 'nYAW.png', version = '-0.1', header = '', footer = '', menu = '', ['_'] = '&nbsp;', ['dlr'] = '&dollar;', ['karenpurple'] = '#8800ff'} 7local globalData = {
8 ['_'] = '&nbsp;', ['dlr'] = '&dollar;', ['karenpurple'] = '#8800ff',
9 favicon = 'nYAW_icon.png', logo = 'nYAW.png', header = '', menu = '',
10 history = '', footer = 'Powered by <a href="https://sledjhamr.org/cgit/notYetAnotherWiki/about/">notYetAnotherWiki</a> Version -0.1. &nbsp;',
11}
8local sites = {} 12local sites = {}
9 13
10 14
@@ -170,6 +174,11 @@ for k, v in pairs(sites) do
170 trail = trail .. w.name 174 trail = trail .. w.name
171 metadata.trail = trail 175 metadata.trail = trail
172 176
177 if nil ~= metadata.pagehistory then metadata.history = '<p>Page&nbsp;<a href="' .. metadata.pagehistory .. '">history</a></p>' end
178 if nil ~= metadata.sourcecode then metadata.footer = '<a href="' .. metadata.sourcecode .. '">source code</a> &nbsp; &nbsp; ' .. metadata.footer end
179 if nil ~= metadata.feedatom then metadata.footer = '<a href="' .. metadata.feedatom .. '">atom feed</a> &nbsp; &nbsp; ' .. metadata.footer end
180 if metadata.footer ~= globalData.footer then metadata.footer = 'Web site ' .. metadata.footer end
181 metadata.footer = '<p>' .. metadata.footer .. '</p>'
173 metadata.body = lcmark.apply_template(bod, metadata) 182 metadata.body = lcmark.apply_template(bod, metadata)
174 183
175 local tm = '' 184 local tm = ''
diff --git a/testing/index.md b/testing/index.md
index ea098d7..f926155 100644
--- a/testing/index.md
+++ b/testing/index.md
@@ -1,9 +1,7 @@
1--- 1---
2pagetitle: "G'day world!" 2pagetitle: "G'day world!"
3author: onefang 3author: onefang
4feedatom: https://sledjhamr.org/cgit/notYetAnotherWiki/atom 4pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/testing/index.md
5history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/testing/index.md
6sourcecode: https://sledjhamr.org/cgit/notYetAnotherWiki/
7--- 5---
8 6
9I've been around since the early sixties, but no one ever noticed.&nbsp; You 7I've been around since the early sixties, but no one ever noticed.&nbsp; You