Coder Social home page Coder Social logo

Provide a docs.all task about ex_doc HOT 10 CLOSED

elixir-lang avatar elixir-lang commented on July 17, 2024
Provide a docs.all task

from ex_doc.

Comments (10)

pminten avatar pminten commented on July 17, 2024

👍 A nice side effect will be that building documentation for lots of projects at the same time will be easy, just make a fake project and run docs.all.

from ex_doc.

ericmj avatar ericmj commented on July 17, 2024

When a dependency has a source_url I don't think we should generate docs for it but rather just link to the docs maintained by the project.

from ex_doc.

pminten avatar pminten commented on July 17, 2024

Those docs may be of a different version though, so there could be API differences.

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024

Right. And there is also the benefit of having offline docs.

from ex_doc.

ericmj avatar ericmj commented on July 17, 2024

Those are both good points. We can probably only solve the docs versioning issue when we have a package manager.

from ex_doc.

pminten avatar pminten commented on July 17, 2024

I'll take a stab at this.

from ex_doc.

pminten avatar pminten commented on July 17, 2024

Once we have this a logical follow-up feature would be to extend autolinking to dependency projects.

from ex_doc.

pminten avatar pminten commented on July 17, 2024

Quick progress report on this: I have a basic index working, it looks like this:

module index

I'm just not satisfied with the code structure yet. I'm currently having the html formatter write docs/$project/.ex_doc_project_info files which look like this:

# ExDoc generated project information, do not edit
[project: "json", version: "0.2.6", documented_modules: [{JSON, nil}, {JSON.Decode, nil}, {JSON.Decode.Error, :exception}, {JSON.Decode.UnexpectedEndOfBufferError, :exception}, {JSON.Decode.UnexpectedTokenError, :exception}, {JSON.Dynamo.Filter, nil}, {JSON.Dynamo.Filter.FilterResultObject, nil}, {JSON.Dynamo.Filter.ProcessFilteredResponse, nil}, {JSON.Encode, :protocol}, {JSON.Encode.Error, :exception}, {JSON.Numeric, nil}]]

When --no-index isn't passed to ex_doc the html formatter will read all .ex_doc_project_info files under the docs dir and use them to generate the project index.

Thing is though, reading and writing these files isn't really a job for the html formatter, nor is it really a job for the retriever. I'm still mulling over how to properly integrate those project infos in the ex_doc structure. Sooner or later I'll probably find a way, but that's what's holding up this feature at the moment.

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024

Couldn't you write the file from the ExDoc module?

from ex_doc.

pminten avatar pminten commented on July 17, 2024

Hmm, that might be Columbus' egg (is that even a valid English idiom). Thanks.

from ex_doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.