From 5266ca74db9f1e1442d957bbd4be17335266b261 Mon Sep 17 00:00:00 2001
From: Sacha Chua <sacha@sachachua.com>
Date: Fri, 14 Oct 2022 21:35:40 -0400
Subject: Make docker wiki work

---
 wiki/templates/emacsconf.setup | 41 +++++++++++++++++++----------------------
 wiki/templates/htmlscrubber.pm |  2 +-
 2 files changed, 20 insertions(+), 23 deletions(-)

(limited to 'wiki/templates')

diff --git a/wiki/templates/emacsconf.setup b/wiki/templates/emacsconf.setup
index 324f5b7..7ab3916 100644
--- a/wiki/templates/emacsconf.setup
+++ b/wiki/templates/emacsconf.setup
@@ -1,3 +1,6 @@
+# This file is managed by the wiki role in git@git.emacsconf.org:pub/emacsconf-ansible
+# Please make sure your changes are also reflected there.
+#
 # IkiWiki::Setup::Yaml - YAML formatted setup file
 #
 # Setup file for ikiwiki.
@@ -10,26 +13,25 @@
 # name of the wiki
 wikiname: EmacsConf
 # contact email for wiki
-adminemail: bandali@gnu.org
+adminemail: {{ikiwiki_admin}}
 # users who are wiki admins
 adminuser:
 - bandali
 # users who are banned from the wiki
 banned_users: []
 # where the source of the wiki is located
-srcdir: /home/ikiwiki/emacsconf
+srcdir: {{ ikiwiki_src_dir }}
 # where to build the wiki
-#destdir: /home/ikiwiki/public_html/emacsconf
-destdir: /var/www/emacsconf.org
+destdir: {{ ikiwiki_dest }}
 # base url to the wiki
-url: https://emacsconf.org
+url: {{ ikiwiki_url }}
 # url to the ikiwiki.cgi
 #cgiurl: https://emacsconf.org/ikiwiki.cgi
 # do not adjust cgiurl if CGI is accessed via different URL
 reverse_proxy: 0
 # filename of cgi wrapper to generate
 #cgi_wrapper: /home/ikiwiki/public_html/emacsconf/ikiwiki.cgi
-cgi_wrapper: /var/www/emacsconf.org/ikiwiki.cgi
+cgi_wrapper: {{ ikiwiki_path }}/ikiwiki.cgi
 # mode for cgi_wrapper (can safely be made suid)
 cgi_wrappermode: 06755
 # number of seconds to delay CGI requests when overloaded
@@ -42,14 +44,9 @@ only_committed_changes: 0
 rcs: git
 # plugins to add to the default configuration
 add_plugins:
-- goodstuff
-- theme
-#- websetup
-- license
-#- format
-- sidebar
-- attachment
-- remove
+{% for plugin in ikiwiki_plugins %}
+- {{ plugin }}
+{% endfor %}
 # plugins to disable
 disable_plugins: []
 #disable_plugins:
@@ -58,7 +55,7 @@ disable_plugins: []
 #templatedir: /usr/share/ikiwiki/templates
 #templatedir: /home/ikiwiki/.ikiwiki/templates
 # base wiki source location
-underlaydir: /usr/share/ikiwiki/basewiki
+underlaydir: {{ ikiwiki_underlay }}
 # display verbose messages?
 #verbose: 1
 # log to syslog?
@@ -101,7 +98,7 @@ hardlink: 0
 # extra library and plugin directories
 libdirs: []
 # extra library and plugin directory (searched after libdirs)
-libdir: /home/ikiwiki/.ikiwiki
+libdir: {{ ikiwiki_plugin_path }}
 # environment variables
 ENV: {}
 # time zone name
@@ -116,7 +113,7 @@ wiki_file_chars: -[:alnum:]+/.:_
 allow_symlinks_before_srcdir: 0
 # cookie control
 cookiejar:
-  file: /home/ikiwiki/.ikiwiki/cookies
+  file: {{ ikiwiki_cookie_jar }}
 # set custom user agent string for outbound HTTP requests e.g. when fetching aggregated RSS feeds
 useragent: ikiwiki/3.20190228-1
 # theme has a responsive layout? (mobile-optimized)
@@ -133,28 +130,28 @@ deterministic: 0
 # git plugin
 # git hook to generate
 #git_wrapper: /home/ikiwiki/emacsconf.git/hooks/post-update
-git_wrapper: /home/ikiwiki/hooks/emacsconf
+git_wrapper: {{ ikiwiki_git_wrapper }}
 # shell command for git_wrapper to run, in the background
 #git_wrapper_background_command: git push github
 # mode for git_wrapper (can safely be made suid)
 #git_wrappermode: 06755
 # git pre-receive hook to generate
 #git_test_receive_wrapper: /git/wiki.git/hooks/pre-receive
-git_test_receive_wrapper: /home/ikiwiki/hooks/emacsconf-pre
+git_test_receive_wrapper: {{ ikiwiki_git_test_receive_wrapper }}
 # unix users whose commits should be checked by the pre-receive hook
 #untrusted_committers: []
 untrusted_committers:
 - anon
 # gitweb url to show file history ([[file]] substituted)
 #historyurl: http://git.example.com/gitweb.cgi?p=wiki.git;a=history;f=[[file]];hb=HEAD
-historyurl: //git.emacsconf.org/emacsconf-wiki/log/[[file]]
+historyurl: {{ ikiwiki_git_base_url }}/log/[[file]]
 # gitweb url to show a diff ([[file]], [[sha1_to]], [[sha1_from]], [[sha1_commit]], and [[sha1_parent]] substituted)
 #diffurl: http://git.example.com/gitweb.cgi?p=wiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]
-diffurl: //git.emacsconf.org/emacsconf-wiki/diff/[[file]]?id=[[sha1_commit]]&id2=[[sha1_parent]]
+diffurl: {{ ikiwiki_git_base_url }}/diff/[[file]]?id=[[sha1_commit]]&id2=[[sha1_parent]]
 # where to pull and push changes (set to empty string to disable)
 #gitorigin_branch: origin
 # branch that the wiki is stored in
-#gitmaster_branch: master
+#gitmaster_branch: {{ ikiwiki_git_branch }}
 
 # htmlscrubber plugin
 # PageSpec specifying pages not to scrub
diff --git a/wiki/templates/htmlscrubber.pm b/wiki/templates/htmlscrubber.pm
index 875b20e..904a2dc 100755
--- a/wiki/templates/htmlscrubber.pm
+++ b/wiki/templates/htmlscrubber.pm
@@ -91,7 +91,7 @@ sub scrubber {
 		}],
 		default => [undef, { (
                              map { $_ => 1 } qw{
-                                 version xmlns x y fill font-size stroke-dasharray transform 
+                                 version xmlns x y fill font-size stroke stroke-dasharray transform 
           data-start data-end data-video data-target data-tracks
               kind label srclang default
 				abbr accept accept-charset accesskey
-- 
cgit v1.2.3