-
Notifications
You must be signed in to change notification settings - Fork 18
Lexicon 0.2 Roadmap. #109
Comments
hi, I would be interested if you could share a bit what you have in mind for Anyway, I will busy for a couple of days otherwise - so have a nice weekend. |
Also totally snowed under right now, so I'll form my thoughts and get back to your question ASAP. |
What I mean is something like, in pseudocode: other_pages = [page(m, title = t,
filter = obj -> isa(obj, Function)) for (m, t) in things]
out =
document(
config(...),
section(
# The manual section of the documentation.
config(...),
page(...),
page(...),
section(...))
section(
# The function reference section.
page(...),
other_pages...))
save(pdf("out.pdf", out))
save(markdown("out", out))
...
(Total vapour-ware at the moment though, so don't take this as a completed idea yet.) |
I did a small graph to get a feeling how that would/could look like based on a joined Docile/Lexicon Documentation. Did not add all Docile modules - just to get a feeling. It is basically based on the current Doc outlines. Added possible (Section, Page, Header, SubHeader) which are probably needed especially for a single pdf.
One can easily see that the minimum required structure would be (Document, Section, SubSection, Page, Header, SubHeader) Some of the
structure - which is quite similar to what I had in mind her: Propose new section meta |
BTW: I send you some thought about aside-comments to gitter |
We don't need |
Yes I know just wanted to put the structure out
I don't understand exactly what you mean by:
Seems to me that one has to somehow produce the right header with which ever group of objects one want below. |
So say you have a
That should be covered by |
I plan to work next on this issues: which are all inter-related. |
I was wondering about the If you look at my example after appling the filter there where no objects for: External - Modules, Functions, Methods & Macros 1. docs("### Modules, Functions, Methods & Macros",
Docile.Cache,
filter = obj -> iscategory(Docile.Cache, obj, [:module, :function, :method, :macro])
) 2 docs("### Modules, Functions, Methods & Macros",
Docile.Cache,
Docile.Collector,
filter = obj -> iscategory(Docile.Cache, obj, [:module, :function, :method, :macro]) ||
iscategory(Docile.Collector, obj, [:module, :function, :method, :macro])
) Should all objects mixed together when sorting or each module by itself etc.. Or would it be better to allow only one module per |
At the moment my own feeling for
NOTE: for mixing modules into one it is also a bit annoying that the modules have to be passed on to any filter because we can not get all from the object themself. Actual for small project mixing all objects in one docs might be not bad - probably better than having a single obj under each heading. |
I'd think it should stay. If you're building docs and you end up with a section with a header but no docs it's slightly more noticeable than a completely empty section.
Give it a try if you'd like. I'm not sure a see the issue with interspersing strings and modules in
Is mixing objects from different modules actually a good idea? If a project is so small then multiple modules probably isn't what should be used to start with. |
Also true If we keep them the other things are not really relevant ... thanks |
hi, just catched up with your work on the julia github. I think I skip a couple of days before restarting on Lexicon.... who knows what changes the julia doctransition might bring for Docile/Lexicon. |
Yes, lets rather wait. There may be a few things worth taking from our work here once things have settled on master. There's momentum at the moment so it's not really worth splitting effort. |
To get to #109 (comment) / #109 (comment) As an alternative approach, if it exists read the
Boom. You have the structure for a pdf. I think this would be easier/clearer what's going: 1 you generate markdown files Edit: although perhaps we're better off just using pandoc to do the latter, since that handles html (Base.Markdown doesn't allow it)... in fact that's probably the way to go... (create a big markdown file and just throw it to pandoc to make the latex & pdf) ?? |
That would work nicely I think. Would be nice to have it more general than relying on mkdocs for that though. Since if mkdocs goes and changes their format, which I think has happened already, then that would break Lexicon. |
Do you know what the licensing is like for pandoc? It's GLP I think, would that be a problem if bundled as a dep? |
I wouldn't bother, you could just ask users install it, and shell out.... :/ all we'd need is a suitable --include-in-header or --template. The default isn't great IMO. |
Maybe outputting to gitbook is the way forward (I still favor doing this via _generated), IMO their pdf rendering looks really nice. see https://www.gitbook.com/book/gitbookio/documentation/details (since you mentioned this earlier). |
Yeah, gitbook is quite nice from what I've tried so far. So long as we just output plain old markdown with the docstrings spliced in it shouldn't make a difference what anyone uses after that stage. I'd rather not become totally tied to some external package if we can help it. |
That's the good thing about most of these tools, it's usually some file e.g. SUMMARY.md or mkdocs.yml which glues the markdown files together. One annoying part (of gitbook) is the showing of wide code blocks cuts off (IIUC it uses phantomjs to render, which can't scroll). |
👍 hi Michael, I saw you and one-more-minute merging quite a bit to julia master. Could you just shortly update me on your thoughts:
Cheers |
Does MichaelHatherly/Docile.jl#147 answer some of you're questions? There's probably lots of more specialised things that the base docsystem doesn't need to cover which can be left to Docile/Lexicon.
Hadn't noticed the branch that was against. It's fine though if it turns out to be a minor addition then getting it into a tagged release would be easier than having it on |
Yes. Thanks I had not seen that. |
Also there's the rewrite branch. My PR was pretty independent. :s Edit: well what I mean is... similar/the same code but in different files so will merge cleanly. |
Not sure what I was thinking when creating yet another branch... ignore that one for the moment I think. |
If we thought the generate_for api was a good one, I would suggest that the api files should generate something parsable (i.e. intermediary markdown which includes the I think this would mean
I think the API, at it's simplest would remain:
perhaps with a kwarg to (not) build and |
Could you provide an example of what you mean by this? Just markdown files containing
Naming-wise would |
e.g. generate api/Lexicon.md as:
This could be done temporarily i.e. generate Similarly for (API-)Index.md. Make sense? I like readability of |
I don't mind much about Considering the present and the lexicon-next situation I think |
I guess I'd be okay with generate, I really dislike "save" for this (that kinda makes sense for creating a single page - from the generated markdowns, or for creating a mkdocs.yml*) * would make more sense if generate accepted |
Planning issue for updating Lexicon.
Docile.Interface
toDocile.Cache
.Move to a separate query mode instead of replacingJust use the same approach as used in Lexicon currently. Once 0.4 is released perhaps add a separate mode.?
-mode.Compose.jl
-like API for creating static documentation.Query
,REPL
,Render
,Doctest
, etc.doctest
such as empty docstring checks, etc.metamacro
definitions.The text was updated successfully, but these errors were encountered: