How to extend the Include macro to repository file
Added by Gregory Romé about 14 years ago
I would like to add a new Wiki macro which will extend the Include one by allowing to include a text file from the repository. The file should be processed by the wiki formatter.
Example:
I have only basic ideas to handle that, so any smart solution is welcome !!!
Thanks,
Gregory
Replies (7)
RE: How to extend the Include macro to repository file - Added by Gregory Romé about 14 years ago
Sorry I forgot to avoid the macro execution...
{{MyInclude(source:path/to/file.wiki)}}
RE: How to extend the Include macro to repository file - Added by Felix Schäfer about 14 years ago
What have you tried to program so far?
RE: How to extend the Include macro to repository file - Added by Gregory Romé about 14 years ago
Currently I've just started to think :)
My idea is to use the repository controller to get the content of the file (entry function).
RE: How to extend the Include macro to repository file - Added by Felix Schäfer about 14 years ago
Gregory Romé wrote:
My idea is to use the repository controller to get the content of the file (entry function).
I would suggest making an extra function rather than chaning/extending the exisiting one, that might save you a bunch of trouble. Also be aware that the file's contents will be read each time someone opens the wiki page, which if there are many included might take some time and will put a higher load on your redmine and repository server.
RE: How to extend the Include macro to repository file - Added by Gregory Romé about 14 years ago
Thanks! I concur with all your points.
The usage of this macro will be limited. In my team the repositories (git) contain asciidoc documentation, it will be useful to be able to generate the html documentation through the redmine wiki, but we don't plan to fill the wiki only by using this method (as Google Code)!
RE: How to extend the Include macro to repository file - Added by Daniel Camargo about 13 years ago
Hi,
Have you managed to import wiki files from the repository?
I'm planning to do exactly the same, any hints?