From: Michael D. Lowis Date: Sun, 24 May 2020 02:51:22 +0000 (-0400) Subject: updated from mdlowis.com branch X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;ds=sidebyside;p=projs%2Fawiki.git updated from mdlowis.com branch --- diff --git a/awiki.rb b/awiki.rb index 6128e9e..10e3c52 100755 --- a/awiki.rb +++ b/awiki.rb @@ -5,9 +5,7 @@ require 'webrick' require 'redcarpet' # TODO: -# * Copy auxiliary files over # * Add page attachment mechanism -# * Add edit shortcut # * Add save shortcut # * Add a create method # * Add a delete method @@ -22,6 +20,14 @@ VIEW_TEMPLATE = "config/page.html.erb" EDIT_TEMPLATE = "config/editor.html.erb" PLANTUML_JAR = "config/plantuml.jar" PLANTUML_CMD = "java -jar #{PLANTUML_JAR} -tsvg -pipe" +EDIT_SCRIPT = <<-eos + +eos class Page def initialize(src) @@ -110,8 +116,9 @@ def genpage(path, src, force=false) html = File.read(htmlfile) end gensitemap() - html.sub("", - "[edit]") + html = html.sub("", + "[edit]") + html.sub("", EDIT_SCRIPT) end def do_post(req, res, path) diff --git a/config/page.html.erb b/config/page.html.erb index 23f0893..5faa147 100644 --- a/config/page.html.erb +++ b/config/page.html.erb @@ -98,28 +98,29 @@ -
-
- -
+ -
- <%= @article %> -
+
+ <%= @article %> +
-