SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
39 stars 10 forks source link

Documentation image links broken in locally generated YARD docs. #822

Open DanRathbun opened 1 year ago

DanRathbun commented 1 year ago

SketchUp API Documentation Issue

The "rdoc-image:" tags do not work for locally generated YARD doc pages.

(I use the Redcarpet markdown parser gem, btw.)

This is occurring with:


For example, I have to edit them to use markdown image links, ie:

  # rdoc-image:images/geom-tesselation-polygon-with-holes.png

... must be changed to:

  # ![](images/geom-tesselation-polygon-with-holes.png)

Note, the above link is from the "Geom.rb" file (later "Geom.html") which is in the same folder as the "images" folder.

The other class files need "../" prepended to their image paths because they are in subfolders of the "doc" directory. Ie, for Sketchup::View#draw_text's image:

  # **Example of different vertical alignment and text bounds:**
  #
  # ![Vertical Text Alignments](../images/view-draw-text-with-bounds.png)

~

thomthom commented 1 year ago

The Ruby API docs are not using Markdown, it's using Rdoc. I wish it was Markdown, but we've not had the time to reformat everything to Markdown. (The additional pages are Markdown, but not the doc comments)

DanRathbun commented 1 year ago

Could this be a template issue ? I mean is it possible to convert these "rdoc-image:" tags to inline <img> HTML elements ?

DanRathbun commented 1 year ago

Let's label this as question, answered and close it. Any further discussion can happen in the API Stubs repo issue thread: https://github.com/SketchUp/ruby-api-stubs/issues/78