These are chat archives for MichaelHatherly/Lexicon.jl

15th
May 2015
Florian Oswald
@floswald
May 15 2015 09:28
Hi there, I've got a question regarding the save method. I'm looking at the example for this function at http://lexiconjl.readthedocs.org/en/latest/api/Lexicon/, and I'm wondering how to get multiple pages in the resulting html build? Is it true that Lexicon produces one page per Module? I'm asking because I have a module with many things to document, and so would like to have subpages. You could argue that I should split that Module up into more Modules. just trying to understand. thanks!
Michael Hatherly
@MichaelHatherly
May 15 2015 10:50
You could possibly use the filter methods to separate out which entries you want per page:
import Docile, Lexicon

all_meta = Docile.Interface.metadata(Docile.Collector)

only_functions = filter(all_meta) do ent
    Docile.Interface.category(ent) == :function
end

only_methods = filter(all_meta) do ent
    Docile.Interface.category(ent) == :method
end

only_macros = filter(Docile.Interface.metadata(Docile.Legacy)) do ent
    Docile.Interface.category(ent) == :macro
end

Lexicon.save("functions.md", MIME"text/md"(), only_functions, Lexicon.Config())
Lexicon.save("methods.md", MIME"text/md"(), only_methods, Lexicon.Config())
Lexicon.save("macros.md", MIME"text/md"(), only_macros, Lexicon.Config())

The interface is undergoing some changes at the moment so things definitely aren't as simple to do as I'd like.

I'd recommend using the markdown output rather than HTML, since the HTML hasn't had very much attention recently.

Florian Oswald
@floswald
May 15 2015 12:34
very cool, thanks. yes I'm using markdown anyway, thats what I meant.