From fff7dcf243caa0a004dc56f9983373d37a9bf6bd Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 23 May 2020 22:51:22 -0400 Subject: [PATCH] updated from mdlowis.com branch --- awiki.rb | 15 +++++++++++---- config/page.html.erb | 39 ++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 23 deletions(-) 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 %> +
-