# RDoc question: How do I make a link from the README file to a specific RDOC Page

**URL:** <https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056>\
**Category:** Ruby\
**Created:** [February 13, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056 "2008-02-13T21:11:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [February 13, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056/1 "2008-02-13T21:11:53Z")

</div>

This is an excerpt from the ActiveWarehouse-etl README file

- Multiple source types. Current supported types:
  - Fixed-width and delimited text files
  - XML files through SAX
  - Apache combined log format

I want to link the word “Fixed-width” to the page  
ETL::Parser::FixedWidthParser

How can i do that in an optimal way to keep readability in the source  
file?

/Jesper

–

* * *

Jesper RÃ¸nn-Jensen / Capgemini Denmark  
Tel. +45 3977 8220 / Mob. +45 2373 6220 / Fax +45 7011 2201  
[www.dk.capgemini.com](http://www.dk.capgemini.com) / Blog [http://justaddwater.dk/](http://justaddwater.dk/)

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [February 22, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056/2 "2008-02-22T21:04:45Z")

</div>

On Feb 13, 2008, at 12:10 PM, Jesper Rønn-Jensen wrote:

> How can i do that in an optimal way to keep readability in the  
> source file?

RDoc only supports links to external pages and auto-linking via method/  
class names.

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [February 22, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056/3 "2008-02-22T21:51:02Z")

</div>

Eric H. wrote:

> > I want to link the word “Fixed-width” to the page  
> > ETL::Parser::FixedWidthParser
> > 
> > How can i do that in an optimal way to keep readability in the source  
> > file?
> 
> RDoc only supports links to external pages and auto-linking via  
> method/class names.

There is the ‘link’ directive in rdoc. For example:

{README}[link:…/ruby-api/files/README.html]

The {…} part is used for the visible text of the link.

I’m not sure if it is possible to link to a class rather than a file,  
but of course you can just link to the HTML file containing the class’s  
generated rdoc.

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [February 22, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056/4 "2008-02-22T22:42:25Z")

</div>

On Feb 22, 2008, at 12:49 PM, Joel VanderWerf wrote:

> > > ETL::Parser::FixedWidthParser  
> > > The {…} part is used for the visible text of the link.
> 
> I’m not sure if it is possible to link to a class rather than a  
> file, but of course you can just link to the HTML file containing  
> the class’s generated rdoc.

As I recall, the names of classes are generated, so it will be  
difficult to have a stable link.

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [February 22, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/rdoc-question-how-do-i-make-a-link-from-the-readme-file-to-a-specific-rdoc-page/129056/5 "2008-02-22T23:59:02Z")

</div>

Eric H. wrote:

> > > > I want to link the word “Fixed-width” to the page
> > 
> > The {…} part is used for the visible text of the link.
> > 
> > I’m not sure if it is possible to link to a class rather than a file,  
> > but of course you can just link to the HTML file containing the  
> > class’s generated rdoc.
> 
> As I recall, the names of classes are generated, so it will be difficult  
> to have a stable link.

The file names are stable. For example, Foo::Bar::Baz becomes

classes/Foo/Bar/Baz.html

Targets within that file have things like #M000155 appended to them, so  
you wouldn’t want to link to them in that way.
