On 08/25/2013 01:24 PM, Jos� Valim wrote:
> Thanks Peter,
>
> I think all ideas are great. In fact a while ago Alexei (alco/true_droid)
> experimented with some of those, so you may find the previous discussion
> interesting.
>
> Some comments:
>
>>
>> First of all let's replace the current function summary with a table of
>> function/macro type indication (F/M), function signatures and a short
>> description (taken from the first paragraph of a function's doc). The left
>> hand side "bar" already serves as a function quick reference. This will
>> greatly ease browsing and searching while being pretty easy to implement
>> (we have all the information available at the HTML formatter already).
>>
>
> Of all the ideas, this is the one I am the most unsure, simply because I
> haven't seen it in any other documentation tool (yet). I am not generally
> saying it is a bad idea or that it won't work but maybe there is something
> else we could do? Maybe we need a less "visually verbose" docs, so it is
> easier to scroll though? I can see how browsing could be improved by this
> proposal but searching would remain the same as you'd still need to use the
> browser search in order to find a particular text, no?
Take a look at
"
https://github.com/pminten/ex_doc/tree/function-summaries-with-descriptions",
I've already made an implementation (slightly different from my
description above) and I must say, some problems with overly long
synopsises and default arguments aside, that it looks quite good to me
and that it's already making the documentation more useful to me. In
fact even if the patch is refused I think I'll keep it locally to run on
my own copy of elixir.
What I've implemented so far isn't uncommon btw, Javadoc works like this.
>
>> Next let's create a toplevel summary page for an
>> application/project/package (whatever you want to call it). This would
>> contain a summary table for the modules/records/protocols with a short
>> description for each (like with functions taken from the first paragraph of
>> the moduledoc). This sends users in the right direction. If there's a
>> README.md the information from it can be presented here.
>>
>
> I think is a great idea. However, this feature seems to conflict with
> projects that have a README. Let's imagine we will break five projects:
> iex, mix, eex, ex_unit and elixir. Would it be preferable for us to use the
> automatically generated list of modules or to include a README in each
> project with specific instruction and guidelines? I think I lean more in
> favor of the README and then in the README we could list the most important
> modules in the system (manually done). Also, if we are going in this
> direction, we could consider being able to include other files besides the
> README in docs, allowing us to provide some sort of Erlang user guides.
Maybe we could merge the README into the page with automatically
generated documentation.
As for user guides, definitely, we should have some way of doing that.
Maybe a (I don't know) users_guide directory and the files in there
would be concatenated (after sorting alphabetically) and turned into the
users_guide.
>> There should be a level about a single application/project/package with a
>> summary of all the applications. So when you want to look something up in
>> the stdlib you first go to the main doc site then click on stdlib and only
>> see the modules from the standard library. If you decide you also need
>> ex_unit you just click on some "go up" link which takes you back to the
>> root doc site.
>>
>
> This is a bit hard to make work today with ExDoc. Maybe we could simply
> point users to the current
elixir-lang.org/docs page which would now link
> each project? Then the header "Elixir v0.10.2" and the link in each project
> would point to this /docs page. It is one of the things that is easier to
> push outside of the docs and instead add to
elixir-lang.org website simply
> because
elixir-lang.org is just html and we have more flexibility to do
> anything we want.
I would say you give ex_doc a link to the great big documentation root
and let it embed it in the generated docs, pretty much as you say.
Creating the great big documentation root page might involve a different
way of invoking ex_doc.
Essentially all ex_doc would need to accomplish this task is a list of
applications/projects/packages and their descriptions. I'm thinking, but
this is a very vague far from reality thought that you could have some
way of starting an ex_doc Erlang process and call it with that list.
Then it would be trivial for a tool that has the necessary info (a
package manager like expm) to create a new documentation root index page
whenever a package is added. Along the same lines it would be easy
enough to hack the makefile to generate a root index just for the stuff
in the elixir repo.
Greetings,
Peter