diff options
Diffstat (limited to '')
-rw-r--r-- | INSTALL.md | 2 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | TODO.md | 4 | ||||
-rw-r--r-- | about/index.md | 4 | ||||
-rw-r--r-- | default.template | 29 | ||||
-rwxr-xr-x | notYetAnotherWiki.lua | 11 | ||||
-rw-r--r-- | testing/index.md | 4 |
7 files changed, 20 insertions, 36 deletions
@@ -1,7 +1,7 @@ | |||
1 | --- | 1 | --- |
2 | pagetitle: "INSTALL" | 2 | pagetitle: "INSTALL" |
3 | author: onefang | 3 | author: onefang |
4 | history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/INSTALL.md | 4 | pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/INSTALL.md |
5 | --- | 5 | --- |
6 | 6 | ||
7 | notYetAnotherWiki 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. | 7 | notYetAnotherWiki 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. |
@@ -1,7 +1,7 @@ | |||
1 | --- | 1 | --- |
2 | pagetitle: "notYetAnotherWiki" | 2 | pagetitle: "notYetAnotherWiki" |
3 | author: onefang | 3 | author: onefang |
4 | history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/index.md | 4 | pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/index.md |
5 | --- | 5 | --- |
6 | 6 | ||
7 | notYetAnotherWiki is not another wiki, at least not yet. It'll be much | 7 | notYetAnotherWiki is not another wiki, at least not yet. It'll be much |
@@ -1,12 +1,10 @@ | |||
1 | --- | 1 | --- |
2 | pagetitle: "TODO" | 2 | pagetitle: "TODO" |
3 | author: onefang | 3 | author: onefang |
4 | history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/TODO.md | 4 | pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/TODO.md |
5 | --- | 5 | --- |
6 | ## Do these | 6 | ## Do these |
7 | 7 | ||
8 | Footer is still wrong. | ||
9 | |||
10 | Clean up the favicon and logo stuff. | 8 | Clean 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 | --- |
2 | pagetitle: "notYetAnotherWiki is not another wiki, at least not yet. It'll be much more than that, eventually." | 2 | pagetitle: "notYetAnotherWiki is not another wiki, at least not yet. It'll be much more than that, eventually." |
3 | author: onefang | 3 | author: onefang |
4 | feedatom: https://sledjhamr.org/cgit/notYetAnotherWiki/atom | 4 | pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/About/index.md |
5 | history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/About/index.md | ||
6 | sourcecode: https://sledjhamr.org/cgit/notYetAnotherWiki/ | ||
7 | --- | 5 | --- |
8 | 6 | ||
9 | This is a new directory, an entire PR department can hang out here. | 7 | This 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$ plus login and register buttons </td> | 29 | <td style="text-align: right;">$header$ plus login and register buttons </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>👣 $trail$</p></td> |
43 | </td> | ||
44 | <td> | ||
45 | <p>👣 $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> Powered by <a href="https://sledjhamr.org/cgit/notYetAnotherWiki/about/">notYetAnotherWiki</a> Version $version$. </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 | ||
7 | local globalData = {favicon = 'nYAW_icon.png', logo = 'nYAW.png', version = '-0.1', header = '', footer = '', menu = '', ['_'] = ' ', ['dlr'] = '$', ['karenpurple'] = '#8800ff'} | 7 | local globalData = { |
8 | ['_'] = ' ', ['dlr'] = '$', ['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. ', | ||
11 | } | ||
8 | local sites = {} | 12 | local 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 <a href="' .. metadata.pagehistory .. '">history</a></p>' end | ||
178 | if nil ~= metadata.sourcecode then metadata.footer = '<a href="' .. metadata.sourcecode .. '">source code</a> ' .. metadata.footer end | ||
179 | if nil ~= metadata.feedatom then metadata.footer = '<a href="' .. metadata.feedatom .. '">atom feed</a> ' .. 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 | --- |
2 | pagetitle: "G'day world!" | 2 | pagetitle: "G'day world!" |
3 | author: onefang | 3 | author: onefang |
4 | feedatom: https://sledjhamr.org/cgit/notYetAnotherWiki/atom | 4 | pagehistory: https://sledjhamr.org/cgit/notYetAnotherWiki/log/testing/index.md |
5 | history: https://sledjhamr.org/cgit/notYetAnotherWiki/log/testing/index.md | ||
6 | sourcecode: https://sledjhamr.org/cgit/notYetAnotherWiki/ | ||
7 | --- | 5 | --- |
8 | 6 | ||
9 | I've been around since the early sixties, but no one ever noticed. You | 7 | I've been around since the early sixties, but no one ever noticed. You |