zapnap / rdocinfo

New development has moved to http://github.com/lsegal/rubydoc.info
http://rdoc.info
MIT License
18 stars 3 forks source link

index page is regenerated... but still contains @private / broken links #38

Closed dreamcat4 closed 14 years ago

dreamcat4 commented 14 years ago

Hi, I am told this is an rdoc.info issue.

See:

http://github.com/lsegal/yard/issues/issue/93

Thanks.

zapnap commented 14 years ago

If I generate the docs locally using YARD 0.5.3 (we use a modified / safe version of the latest gem release on rdoc.info) I still see the classes that you note should be missing. Have you tried generating this locally yet with yardoc??

dreamcat4 commented 14 years ago

Well, I just tried locally myself for the first time. I find it seems to be working correctly locally as the author of yardoc has been saying. those classes/modules are supresses from index. (The end comments at the other issue).

This is when we start from fresh. I also checked what would happen locally if we already had old files / previously generated index page. That seemed fine also.

he command I ran was: yardoc, and/or rake yard from my gem.

zapnap commented 14 years ago

Hmm this didn't seem to be the case for me. I'll take another look at this tomorrow. Perhaps something environmental.

zapnap commented 14 years ago

It looks like our command line options are somehow overriding the private flag toggle. Will hopefully have a fix later today.

dreamcat4 commented 14 years ago

Hi zapnap,

I found out something interesting about this today. It seems that if i just type yardoc in my project (with no arguments), the index page generated ok.

But then I wanted to edit the RDoc Template, and contribute improvements for it. So I typed in my project:

yardoc -t "default" -p "/Users/id/tmp/rdocinfo/templates" "/Users/id/tmp/libxml4r/.document"

Which I expected it to generate an RDoc.info - styled documentation. But it did 2 things I didn't expect:

1) The template looks as if its the yard template, with White background and blue text. (not black background). Did I get the right template?

2) The index page now exhibits the same broken links as the real rdoc.info production site.

So perhaps this means the issue may be in the template? Or at least something to do with the default template.

Perhaps your frozen template is a little bit older than the one in the newest official Yard release? The @private keyword was introduced very recently.

Meanwhile, I will dig deeper in the template to do some template edits for something else. Perhaps I'll find something which can help us with this issue too.

zapnap commented 14 years ago

Yeah I suspect that is the case. It's definitely possible that the newer @private changes are somehow only exposed (or rather, hidden) in the newer stock templates.

If that's the case we just need to update the custom rdoc.info template to merge in those changes. I've been slammed with work and travel the last few days so I haven't yet had a chance to investigate and was planning on chatting with Loren but he's been busy at MWRC. I'll try to dig in this evening but in the meantime if you have time and want to investigate, I'm happy to pull changes :).

And yes, specifying the custom template directory should allow you to override the default theme with the custom supplied one. Not sure why that wouldn't be working for you with latest yard release. Strange.

dreamcat4 commented 14 years ago

Okay,

I diffed and theres many differences between the rdoc.info default template, and the official YarDoc (version 0.5.3) default template.

Unfortunately the default template is just too big and complex for me to figure out exactly which 1-2 files to change. You are wecome to try, if you like. What I did was just to delete the whole template and replace it with the yard one:

$ rm -rf rdocinfo/templates/default
$ cp -Rf yard-0.53/templates/default rdocinfo/templates/default

And that solved the problem for the broken links in the index pages. I guess being able to do it safely depends if there were any modifications to the template?

zapnap commented 14 years ago

Yes there are modifications that need to be retained. I'll need to dig into it when I can free up a couple hours.

zapnap commented 14 years ago

I've updated the template with our customizations (better packaged for reuse now, too) and regenerated the latest version of the hosted libxml4r project docs.

Looks like YARD itself is still generating links to classes that don't have doc pages in the class search list but they're gone from the index. I'm seeing this problem locally when using the stock template too, though. Let me know if you're experiencing something different.

dreamcat4 commented 14 years ago

Yep. Moved to issue-103

http://github.com/lsegal/yard/issues/issue/103