Yard relative link to extra file
Asked Answered
W

1

14

I want to link to another extra file from my README using Yard.

For example, I have the following line:

    ...detailed instructions [here](contributing.md) on how to contribute

I want this to link to my file contributing.md in the same directory. I can include the extra file in my .yardopts file, and it will show up in the file list as it should.

So then I found that I can use the yard DSL to make the link work:

    ...detailed instructions {file:contributing.md here} on how to contribute

However this will not work if the README is being read from Github. Am I naive to want to have it both ways?

Is there a way to link to another .md extra file in markdown using Yard?

Wharton answered 29/11, 2014 at 22:13 Comment(1)
i've been trying to figure this out too, with no luck.Cornaceous
B
0

I am not sure what you mean with 'if the README is being read from Github'.

The following works for me locally

  1. I add a file to the README via {file:my_file.md test}
  2. I tell yard via the --files command-line option that there is an extra file. The link to 'test' appears in the README. For example in the following way:
bundle exec yard --files my_file.md
Baur answered 6/1, 2021 at 16:18 Comment(1)
This is not valid Markdown syntax, so this link will show properly in the generated YARD docs, but not when reading the README on Github.Projection

© 2022 - 2024 — McMap. All rights reserved.