typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Referencing External Pages

Open Bruddles opened this issue 11 years ago • 11 comments

Hey,

I have a markdown file with examples in it, and i was wondering if there was any way to reference it in the documentation. I would like to keep the file separate from the code base where possible.

Thanks.

Bruddles avatar Feb 11 '15 15:02 Bruddles

Hi, nice to hear from you. Currently this is not possible but I see the point, something like this might be handy for long descriptions. Integrating something like this shouldn't be to complicated, we could expose a handlebars helper to do this. I'll have a look at this.

sebastian-lenz avatar Feb 11 '15 19:02 sebastian-lenz

:+1: I'd love to see this too.

mudHOAX avatar Feb 12 '15 08:02 mudHOAX

Okay, currently I'm implementing it this way:

  • You can specify the location the external pages are located at with the argument
    --includes PATH/TO/INCLUDES
  • Within your comments you can include files using
    [[include:PATH/TO/FILE]]
  • If the included file is a handlebars template (*.hbs) it will be evaluated with the current reflection as its context

To be able to place images/documents I've also included the argument --media PATH/TO/MEDIA. This one must point to a directory and it will be copied to the output directory. One may specify references to files in this folder using media://PATH/TO/FILE and it will be resolved to a relative link pointing to the media directory.

sebastian-lenz avatar Feb 12 '15 23:02 sebastian-lenz

Great start, I really appreciate the work you're putting into this.

Would it be possible to further extend this to not only inline the external documents, but also provide a way to link to external documents and view them as a standalone entity.

For example we have a huge markdown file containing discussion and examples for a class as a whole. Whilst I appreciate I can inline this on the class, I'd prefer that the API for the class is still given top priority and having the ability to link over to a separate page completely for all the further discussion and examples.

mudHOAX avatar Feb 13 '15 16:02 mudHOAX

You can place the html file in the media directory and link to it using the media:// pattern. But I guess that's not what you are aiming for, you want the markdown file to be rendered using the documentation template?

This would be a great feature allowing you to include more detailed examples and guides within the documentation but it also raises a lot of questions and problems. How do you reach these docs, are they visible in the navigation, how are they named and sorted? I thought about giving TypeDoc the ability to load external plugins. Features like this one could be implemented as an optional plugin to TypeDoc.

sebastian-lenz avatar Feb 22 '15 23:02 sebastian-lenz

I think it'd be great if there's a way to have an index of all such external articles in front page like the one at (http://docs.sencha.com/extjs/4.2.3/#!/guide). Because there would be articles covering more than a single class, and would be nice to create a cross-reference system.

awerlang avatar Mar 28 '15 22:03 awerlang

I was thinking about this yesterday. Similar to how msdn has a Remarks section, it would be great to be able to do this.

Even if there is a proper link feature, something like

@remarks

It could then take a folder to search for remarks and could match on fully qualified name. This would make it easy to maintain side by side docs without maintenance of updating comments.

This might be a separate feature but useful nonetheless.

kamranayub avatar Apr 05 '15 13:04 kamranayub

Do you mean the feature described here? If it resolves docs by qualified names, why do we need a comment tag?

sebastian-lenz avatar Apr 06 '15 12:04 sebastian-lenz

It probably doesn't need to, you're right! I guess as long as it can be organized into folders, it would suit our needs. Thinking that you could also go one level deeper to the symbol, for examples and such, just like MSDN.

On Mon, Apr 6, 2015, 13:21 Sebastian Lenz [email protected] wrote:

Do you mean the feature described here https://msdn.microsoft.com/en-us/library/3zw4z1ys.aspx? If it resolves docs by qualified names, why do we need a comment tag?

— Reply to this email directly or view it on GitHub https://github.com/sebastian-lenz/typedoc/issues/63#issuecomment-90035710 .

kamranayub avatar Apr 06 '15 14:04 kamranayub

How is this feature going? I have a TypeScript project in which I'd like to use Typedoc to generate guides besides the reference documentation, as it seems a much simpler solution than to build a whole documentation website just for the 3 guide files I'm going to put beside the reference documentation.

SolarLiner avatar Oct 15 '18 10:10 SolarLiner

Closing in favor of #247 - on the list... probably sometime next year.

Gerrit0 avatar Nov 29 '20 00:11 Gerrit0