... which works for the API doc page's browser tab, but not when a link to that page is inserted into the forum.
The link in the forum's onebox (aka Discourse aside,) comes out as:
"https://ruby.sketchup.com/Sketchup/InstanceObserver.html/../favicon.ico"
so the favicon cannot be found and so does not render to the left of the site name.
(Interestingly if you insert another "../" in front of the filename, then it's a valid URL.)
The simplest solution is to remove the YARD method call to url_for() and just set an absolute favicon path.
Firstly, the
"favicon.ico"
file is located at:"https://ruby.sketchup.com/favicon.ico"
.In template file:
/master/lib/yard-sketchup/templates/default/layout/html/headers.erb
... the shortcut icon ERB HTML is:This results in a relative url:
... which works for the API doc page's browser tab, but not when a link to that page is inserted into the forum.
The link in the forum's onebox (aka Discourse aside,) comes out as:
"https://ruby.sketchup.com/Sketchup/InstanceObserver.html/../favicon.ico"
so the favicon cannot be found and so does not render to the left of the site name. (Interestingly if you insert another"../"
in front of the filename, then it's a valid URL.)The simplest solution is to remove the YARD method call to
url_for()
and just set an absolute favicon path.