summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2021-09-29 22:11:18 -0400
committerDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2021-09-29 22:11:18 -0400
commit8ef0593fdf5e6397b6cca91bd8fb300ce3fbdbbf (patch)
tree7d6f481f84f10671381b600237e4c61f88d7a405
parent909f4fa0d426203486dfff1ba1ad9f3a2f5605d2 (diff)
Write README, cleanup packaging
-rw-r--r--ChangeLog.md3
-rw-r--r--README.md49
-rw-r--r--app/Main.hs11
-rw-r--r--ikiwiki-fast-pandoc.cabal (renamed from fast-pandoc.cabal)6
-rw-r--r--package.yaml4
5 files changed, 62 insertions, 11 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
deleted file mode 100644
index 69ab8a3..0000000
--- a/ChangeLog.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Changelog for fast-pandoc
-
-## Unreleased changes
diff --git a/README.md b/README.md
index d570b2f..89a0439 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,48 @@
-# fast-pandoc
+# ikiwiki-fast-pandoc
+
+An "external" (XML-RPC) [IkiWiki][] plugin for rendering Markdown
+fragments with [Pandoc][], replacing the default [mdwn][] plugin.
+
+[ikiwiki-pandoc][] has the same purpose as this plugin, and is easier
+to install, more mature, and more featureful. However, fast-pandoc
+can be significantly faster, especially if you use directives like
+`\[[!table]]` and `\[[!report]]` that generate many Markdown fragments
+that IkiWiki will htmlize individually. Whereas [ikiwiki-pandoc][]
+will fork+exec the pandoc binary for every fragment, fast-pandoc
+embeds pandoc in a co-process that runs alongside IkiWiki. At
+[SFLC][], switching to fast-pandoc sped up rebuilds of an internal
+wiki by 25-30%.
+
+[IkiWiki]: https://ikiwiki.info/
+[Pandoc]: https://pandoc.org/
+[mdwn]: https://ikiwiki.info/plugins/mdwn/
+[ikiwiki-pandoc]: https://github.com/sciunto-org/ikiwiki-pandoc
+[SFLC]: https://softwarefreedom.org
+
+## Build and install
+
+Install git and [Haskell Stack](http://haskellstack.org/), then do:
+
+```
+git clone git://code.softwarefreedom.org/git/fast-pandoc
+cd fast-pandoc
+stack build
+```
+
+To make fast-pandoc available to your wiki, locate its "extra library
+and plugin directory" (the `libdir` option in the *.setup file),
+create a `plugins` subdirectory (if it doesn't already exist), and
+install the `fast-pandoc` binary into it. (See also
+<https://ikiwiki.info/plugins/install/>.) Many wikis put their libdir
+at `~/.ikiwiki`.
+
+```
+mkdir -p ~/.ikiwiki/plugins/
+stack install --local-bin-path ~/.ikiwiki/plugins
+```
+
+Finally, add `fast-pandoc` to the `add_plugins` list:
+
+```
+ikiwiki --changesetup ~/wiki.setup --plugin fast-pandoc
+```
diff --git a/app/Main.hs b/app/Main.hs
index c1ebbbd..299032d 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -6,8 +6,15 @@
--
-- Copyright (C) 2021 Software Freedom Law Center
--
--- Licensed under the terms of the GNU General Public Licence (GPL) version 3
--- or (at your option) any later version.
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
module Main (main) where
diff --git a/fast-pandoc.cabal b/ikiwiki-fast-pandoc.cabal
index a0fb105..8df9b83 100644
--- a/fast-pandoc.cabal
+++ b/ikiwiki-fast-pandoc.cabal
@@ -4,7 +4,7 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
-name: fast-pandoc
+name: ikiwiki-fast-pandoc
version: 0.1.0.0
description: Faster pandoc plugin for IkiWiki
author: Daniel Gnoutcheff
@@ -14,13 +14,13 @@ license: GPL3
build-type: Simple
extra-source-files:
README.md
- ChangeLog.md
+ COPYING
executable fast-pandoc
main-is: Main.hs
other-modules:
XMLParse
- Paths_fast_pandoc
+ Paths_ikiwiki_fast_pandoc
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
diff --git a/package.yaml b/package.yaml
index 9c94637..a9b9e08 100644
--- a/package.yaml
+++ b/package.yaml
@@ -1,4 +1,4 @@
-name: fast-pandoc
+name: ikiwiki-fast-pandoc
version: 0.1.0.0
license: GPL3
author: "Daniel Gnoutcheff"
@@ -7,7 +7,7 @@ copyright: "2021 Software Freedom Law Center"
extra-source-files:
- README.md
-- ChangeLog.md
+- COPYING
# Metadata used when publishing your package
# synopsis: Short description of your package