Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Florian Oswald
    @floswald
    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
    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
    very cool, thanks. yes I'm using markdown anyway, thats what I meant.
    Arjun Narayanan
    @ArjunNarayanan
    Hello Michael,
    Was wondering if there is a way of generating documentation for a full package with a single command rather than generating it for each submodule of the package.
    Michael Hatherly
    @MichaelHatherly
    Not at the moment, though there is a submodules function used in Docile that you could use to implement something like what you want. https://github.com/MichaelHatherly/Docile.jl/blob/f648849035531255854ad2168f94c37c719a7bf9/src/Collector/search.jl#L3-L15. I'll probably add something like this to Lexicon during the next major release.
    Arjun Narayanan
    @ArjunNarayanan
    Thanks! That should ease things a bit.