Suggestion fix for ikiwiki search results
Daniel Bond
db at danielbond.org
Thu Nov 5 15:03:27 PST 2009
Hi,
on the DragonFly ikiwiki, search results include navigational
elements, from the parsed markdown output.
One example is:
http://www.dragonflybsd.org/wiki.cgi?P=dma
I think search results could improve if we installed a modified
IkiWiki/Plugin/search.pm. I'm not exactly sure how Ikiwiki includes
it's plugins,
but it might be possible to install it into a directory that has
higher presence in the perl search path ( perl -e 'print qq(@INC)' ).
This way it won't
conflict with pkgsrc.
I wasn't able to remove entire <div>..</div> blocks, with
HTML::Scrubber, so I replaced it with HTML::TreeBuilder. I'm no Perl
guru, so there
might be better libraries? Also, I wanted to keep out of the other
plugins way, so I didn't want to redefine $scrubber as a different
object.
The code has not been tested live in Ikiwiki, I tested it by saving
the output of ikiwiki, and piping it through equvilent code, so it
might need some
minor adjustmenst. If people like the idea, I can setup a test
environment of Ikiwiki in my homedir on leaf and test it further.
Attachment:
search.pm.diff
Description: Binary data
Cheers,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: application/octet-stream
Size: 203 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20091105/80f87719/attachment-0040.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00002.bin
Type: application/octet-stream
Size: 1008 bytes
Desc: "PGP.sig"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20091105/80f87719/attachment-0020.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: png00000.png
Type: application/octet-stream
Size: 78668 bytes
Desc: "Danny.Attachment:"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20091105/80f87719/attachment-0041.obj>
More information about the Users
mailing list