How can I make godoc being run on local source code use the godoc 
templates/assets properly from a locally hosted version of godoc?

I tried the following:  $ godoc 
-templates="$GOPATH/src/github.com/golang/gddo/gddo-server/assets" -html 
path/to/local/library > ~/destination/path/library.html

I also found the following notes:

>From (https://github.com/golang/gddo/wiki/Development-Environment-Setup):  
"To run the gddo-server binary outside of a development environment with 
the source in $GOPATH/src/github.com/golang/gddo, you will need a copy of 
the assets directory. Use the gddo-server --assets command line flag to 
specify the location of the directory."

>From (https://github.com/golang/tools/blob/master/godoc/README.md):  "In 
production, CSS/JS/template assets need to be compiled into the godoc 
binary. It can be tedious to recompile assets every time, but you can pass 
a flag to load CSS/JS/templates from disk every time a page loads:    $  
godoc -templates=$GOPATH/src/golang.org/x/tools/godoc/static -http=:6060"

Is there a flag I can use when I run godoc to make the proper 
assets/templates get used in the generated file?  



On Tuesday, October 25, 2016 at 7:05:18 PM UTC-4, Stephen Weinberg wrote:
>
> Yeah, I work on godoc.org and we essentially decided not to try to 
> support the internal usecase. The reason is that you can just use the 
> normal godoc tool.
>
> I recommend setting up a simple cron job to pull from github every so 
> often and run the godoc tool. gddo is very very heavy for this small of a 
> use case. It prides itself on efficiently managing the entire (open source) 
> Go corpus. I plan to work on a lot of production improvements (better 
> logging, error reporting, performance tracing) that are just not necessary 
> for a small install. Unless your company is the size of Google, you 
> probably just need to git pull every so often to follow dozens (or maybe 
> even hundreds) repos for your company.
>
> That being said, gddo does take contributions! If you want you can port it 
> to an internal server environment and contribute back. I wouldn't 
> necessarily recommend that though.
>
> -- Stephen
>
> On Tuesday, October 25, 2016 at 10:57:58 AM UTC-4, Kareem Gan wrote:
>>
>> Ah. But I need it to download the repositories from my organizations 
>> enterprise github server through. 
>> On Tue, Oct 25, 2016 at 09:55 Pietro Gagliardi <and...@lostsig.net> 
>> wrote:
>>
>>> Is imitating golang.org not sufficient? It will still show you all the 
>>> packages in your $GOPATH in the Packages page:
>>>
>>> http://imgur.com/EGpqWsR
>>>
>>> On Oct 25, 2016, at 10:36 AM, Kareem Gan <kare...@gmail.com> wrote:
>>>
>>> So it's not possible? It would be really helpful if someone here has 
>>> done it already and share the knowledge how.
>>>
>>> On Thursday, October 20, 2016 at 12:35:10 PM UTC-5, Pietro Gagliardi 
>>> (andlabs) wrote:
>>>>
>>>> You can go get golang.org/x/tools/cmd/godoc and run the godoc tool 
>>>> itself, which will imitate golang.org. This is different from godoc.org; 
>>>> that is harder to host locally.
>>>>
>>>> On Oct 20, 2016, at 1:13 PM, Kareem Gan <kare...@gmail.com> wrote:
>>>>
>>>> Hello.
>>>>
>>>> Is it possible to host godoc internally because we have our own git 
>>>> server and would like to host godoc internally so we can build 
>>>> documentation for our golang repositories.
>>>> -- 
>>>> Best,
>>>>
>>>> Kareem Gan
>>>> 01010011 01000101
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "golang-nuts" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to golang-nuts...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>>
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com.
>>>
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> -- 
>> Best,
>>
>> Kareem Gan
>> 01010011 01000101
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to