docmeta / rubydoc.info

Next generation rdoc.info site
http://rubydoc.info
MIT License
132 stars 43 forks source link

unable to add other than github.com projects #107

Closed dasbiswajit closed 4 years ago

dasbiswajit commented 8 years ago

I have used rubydoc.info (http://github.com/lsegal/rubydoc.info) to create a stand alone rubydoc.info server. It was very straight forward. But I am unable to add different github projects location lets say - github.phl.dreams.corp. where our inhouse github server name is - https://github.phl.dreams.corp. But I am able to add https://github.com projects only. is there any way to do that or we need to customize?

Regards Biswajit

lsegal commented 8 years ago

Currently, rubydoc.info hardcodes for "github.com" support, not private GitHub instances. If you wanted to, you could change these instances in your checkout of the codebase (i.e. fork it) to add support:

https://github.com/docmeta/rubydoc.info/search?p=2&q=github.com&utf8=%E2%9C%93

Specifically in places like:

https://github.com/docmeta/rubydoc.info/blob/a81c6a3599267dbd36a42541788dfc7816629c56/app.rb#L300

and

https://github.com/docmeta/rubydoc.info/blob/1c082157122eaa6dc916545ab86db350b8a8b220/templates/default/fulldoc/html/js/rubydoc_custom.js#L11

Also note that whichever server is running this code needs to have SSH keys configured for accessing your private repository, since rubydoc does a git clone on the server to pull down the code.

This issue is not really a problem with rubydoc.info so I will leave this open for a few days in case anybody else has run into it. In short, we do not support any other public hosted sites besides github.com and rubygems.org. That said, we would probably accepted patches to make the "github.com" domain configurable in the config.yml file, so if you were interested in improving this, feel free to send along the code you've written to make this work for you (assuming the change can support both domains).

Hope that helps.

zapnap commented 8 years ago

+1 for making this configurable via config.yaml. PRs welcome.

lsegal commented 4 years ago

Closing out this old issue due to inactivity. A PR would be welcome to add this type of configurability.