diff options
author | https://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web> | 2012-02-19 20:43:15 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2012-02-19 20:43:15 -0400 |
commit | 0312eb59674272d6de05ca0d4fe0748e90fbf6f5 (patch) | |
tree | 48467d0f88272d9320a318bbefccedbc73eb8cf8 | |
parent | 7bc9bc7812701d236e16f6da8b2215114a66e31c (diff) | |
download | ikiwiki-0312eb59674272d6de05ca0d4fe0748e90fbf6f5.tar ikiwiki-0312eb59674272d6de05ca0d4fe0748e90fbf6f5.tar.gz |
-rw-r--r-- | doc/todo/internal_definition_list_support.mdwn | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/todo/internal_definition_list_support.mdwn b/doc/todo/internal_definition_list_support.mdwn new file mode 100644 index 000000000..4348e76f8 --- /dev/null +++ b/doc/todo/internal_definition_list_support.mdwn @@ -0,0 +1,37 @@ +While ikiwiki can support definition lists (`dl/dt/dd`) through [[multimarkdown|mdwn]], it doesn't actually /do/ anything with those valuable definitions. It would be interesting for third party plugins to have access to this stuff as a proper data structure. This is what allows MoinMoin to have plugins that collect that data across multiple pages and tabulate it, for example. + +What I am proposing here is that the [[variables exported to plugins|plugins/write/#index6h2]] be extended to include a `%dictionnaries` hash. For a markup like this: + +[[!format txt """ +Apple +: Apple is a fruit +: It's also a computer company +Orange +: Orange is a fruit +"""]] + +would result in a data structure like this: + +[[!format txt """ +%dicts = { + 'Apple' => [ "Apple is a fruit", "It's also a computer company" ], + 'Orange' => [ "Orange is a fruit" ], +} +"""]] + +Now, I know I can write myself a `format()` parser that would do this on all pages in my own plugin, but then it would need to be adapted to all markups, while markup formatters should be the ones implementing this directly, if possible. + +My first use case for this would be to extend the [[plugins/contrib/osm]] plugin to tap into those lists, so that I could have this data in the page, visible to the user: + +[[!format txt """ +Longitude +: -45.30 +Latitude +: 73.67 +"""]] + +and then reuse that data in the plugin. + +Then for us running the humongous [[koumbit wiki|https://wiki.koumbit.net/]], it is a necessary step to be able to migrate away from MoinMoin to Ikiwiki as we have a lot of pages that tabulate information like this. For example, see our [[ServerList|https://wiki.koumbit.net/ServerList]] ([[source|https://wiki.koumbit.net/ServerList?action=raw]]), being generated from pages like [[this one|https://wiki.koumbit.net/metis.koumbit.net]]. + +If there are no objections to that concept, I may try to start coding patches. Otherwise this is really just a [[wishlist]]. |