sciunto-org / ikiwiki-pandoc Goto Github PK
View Code? Open in Web Editor NEWPandoc plugin for ikiwiki
License: GNU General Public License v2.0
Pandoc plugin for ikiwiki
License: GNU General Public License v2.0
I am using pkgsrc ikiwiki 3.20150614 and pandoc 1.16.0.1 from homebrew. I am on OS X 10.11.2. I use the pkgsrc perl version 5.22.0.
I am a German speaking person and so my bibliographic needs are also German. For some reason my locators (e.g. "page" should be "Seite", "p." should "S.") are still in English, even though I've set my locale in my .steup
to de_DE.UTF-8
. Aso setting the locale via the lang variable (through yaml front matter) on a particular page doesn't seem to work und would also be in any case not prefered.
osx: 10.11.6
ikiwiki: 3.20150614 (from pkgsrc)
pandoc: 1.18 (from homebrew)
latest ikiwiki-pandoc
When using this configuration rebuilding or refreshing ikiwiki fails with:
Not an ARRAY reference at /Users/openmedi/.ikiwiki/IkiWiki/Plugin/pandoc.pm line 435.
A wikilink inside of a markdown table
1 2
--- ---
[[RecentChanges]] 4
is parsed as
<table>
<thead>
<tr class="header">
<th align="left">1</th>
<th align="left">2</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left"><a href="../../rec</td>
<td align="left">entchanges/">RecentChanges</a> 4</td>
</tr>
</tbody>
</table>
It needs to be widened accordingly to be parsed properly:
1 2
--- ---
[[RecentChanges]] 4
Obviously wikilinks are converted to html (?) before the rest of the page source is converted to html with the pandoc plugin.
Regrettably I know to little about ikiwiki's internal workings to fix this. In the meantime I resort to manually resizing my table rows in the markdown source.
The inline directive does not work with the ikiwiki-pandoc plugin (unless I am doing something wrong).
When I insert a directive (which works on an ikiwiki processed markdown page) like
[[!inline pages="Blog/*" archive="yes" rootpage="Blog"]]
the following is all that is generated:
...
<div id="pagebody">
<section id="content" role="main">
<div id="0" class="inline">
</div>
</section>
</div>
...
If this is not a bug, perhaps consider adding it as a caveat to the documentation.
Thanks for the time spent on this plugin!
-Kevin
OS X 10.11.6
ikiwiki version 3.20170111
Pandoc: 2.05
"--normalize has been removed. Normalization is now automatic."
This is so since 2.0 it seems. See also.
P. S.: My fork works.
I already posted this bug on ikiwiki.info, but there has been no response (from anyone, I mean). I don't know what the most elegant fix would be, but I think changing the source generated by pandoc is a bad one.
This may, strictly speaking, be a bug in the [[plugins/contrib/pandoc]] plugin, but I think it would be better to fix it in ikiwiki because of its kind (and maybe because I believe/hope pandoc will become the markdown dialect standard). For all I know it might not only affect pandoc tables.
When creating a simple table in pandoc-flavoured markdown,
1 2
--- ---
3 4
pandoc converts this to the html code
<table>
<thead>
<tr class="header">
<th align="left">1</th>
<th align="left">2</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">3</td>
<td align="left">4</td>
</tr>
</tbody>
</table>
<tr class="header">
causes it to be affected by style.css
's
.header {
margin: 0;
font-size: 140%;
font-weight: bold;
line-height: 1em;
display: block;
}
(more specifically by display: block;
), which results in all header cells to cramp together in the first column.
The fix is easy: In style.css
change .header {
to .header tr:not(.header) {
.
Alternatively, add the following code.
tr.header {
display: table-row;
}
I've added that last code snippet to my custom.css
file. I admit .header tr:not(.header)
is not especially elegant, but then again, I have almost no knowledge of CSS. There might be better solutions. (I don't even know why display: block;
breaks the tables or why changing it to display: table-header;
doesn't fix it but display: table-row;
does :D )
It would be awesome to be able to use pandoc’s metadata feature to replace the way ikiwiki usually required metadata http://johnmacfarlane.net/pandoc/README.html#yaml-metadata-block
I am using pkgsrc ikiwiki 3.20150614 and pandoc 1.16.0.1 from homebrew. I am on OS X 10.11.2. I use the pkgsrc perl version 5.22.0.
When using pandoc to build my wiki pages, citations seem to be ignored completely.
Since nobody wants to do the work in #18, it would be nice if people could easily include the pandoc plugin as a submodule in their wiki repo (with some config changes in *.setup of course).
See here for an example ikiwiki site that bundles ikistrap as a submodule.
This would involve moving page.tmpl
to a templates
dir, pandoc.pm
to lib/IkiWiki/Plugin
, and testing & updating the installation instructions. I'm not sure where mathml.js
would go.
With ikiwiki version 3.20150614 installed via pkgsrc on OS X 10.10 with Pandoc 1.15.0.6. it doesn't seem to work. First of all, the installation instructions seem incomplete, as they are not including the renaming of the page template back to it's original name, which, I assume, is what needs to happen (otherwise I get an error stating that the page.tmpl can't be found). Have I assumed wrong? Afterwards, this is the error I get:
$ ikiwiki --setup zettelkasten.setup
Failed to load plugin IkiWiki::Plugin::pandoc: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /Users/martin/.ikiwiki/IkiWiki/Plugin/pandoc.pm line 286.
Compilation failed in require at (eval 101) line 2.
BEGIN failed--compilation aborted at (eval 101) line 2.
P.S.: Also, uninstall instructions would be a nice thing to have.
I though it would be a good idea to provide some information on how to update the plugin. It's probably just one or two lines of text and it would help some people to keep up to date with the features and bugfixes this plugin thankfully gets. Thanks for your consideration.
This is an issue, but one that's more meant as a starting point for discussion, than anything else.
Some context first: I'm looking to get my local ikiwiki based wiki onto the web, so that I can interact with it, even when I'm not on my laptop. I researched and tried to get it to work on the shared hosting platform nearly free speech, but the allowed cpu time is not enough for a complex wiki such as mine. Next thing I looked into was branchable, the dedicated ikiwiki hosting platform, mantained by Joey Hess himself. Since I rely on your awesome plugin (and pandoc) to render most of my wiki's pages and their bibliographic references, I was disappointed to see that branchable doesn't support any custom plugins, that aren't either a debian package or included into the main ikiwiki package.
This is what brings me here then: How easy or hard would it be and what would be the problems that come with trying to go either route? What are the reasons to avoid packaging and/or merging this plugin into ikiwikis main repo?
Since I'm mostly a user of software, I want to try to understand if it's worth it (for me and/or anybody else) to pursue an inclusion of ikiwiki-pandoc into something else. My assumption is, that branchable simply doesn't fit the bill for me if I need ikiwiki-pandoc, since I am not experienced enough to submit a patch to ikiwiki or go through the packaging of ikiwiki-pandoc without using significant amounts of my time up front to do so, since I would need to learn a lot of things, which means that a lot of other things would need to be put on my waiting list and that it would be better to try to find a different solution to put my notes on a server. However, I at least want to see if there's an upside (maybe even a significant one) to such a suggestion, which is why I opened this issue.
If in the future people are wondering why ikiwiki-pandoc is not merged with ikiwiki (main) and doesn't have its on debian package, than people could be pointed here.
I have tried to use a filter using the following YAML metadata in a page:
latex_extra_options:
- -\-filter=~/Modèles/pandoc/clean.sh
- -\-filter=pandoc-latex-environment
- -\-filter=~/Modèles/pandoc/latex.sh
It didn't seem to work. Is it supposed to?
By the way, I opened issue #2 and finally got time to test. It works great! Really awesome work, so thank you! I am definitely switching :-)
OS X 10.11.4
ikiwiki: 3.20150614 (via pkgsrc)
I realized that the img directive is not working on pages that are processed with ikiwiki-pandoc. That migh simply by a limitation of the plugin, but it would be very nice if especially this directive would work, since I'd like to use the img directive for showing specific pages of pdf files without having to convert them first to images, rename them and so on.
Of course, it might also be a bug.
That's the error I get when trying to rebuild my wiki after following the install instructions. I am using pkgsrc ikiwiki 3.20150614 and pandoc 1.16.0.1 from homebrew. I am on OS X 10.11.2.
And that's the line the error refers to in pandoc.pm:
my $mathopt = $1 if $config{pandoc_math} =~ /(\w+)/;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.