-
Notifications
You must be signed in to change notification settings - Fork 2.4k
godoc/server: fix: templateDir /lib/godoc not mounted #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
godoc/server: fix: templateDir /lib/godoc not mounted #309
Conversation
|
Attention - in case of missing branch this PR supersedes #307 |
|
This PR (HEAD: 1f5195d) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/313091 to see it. Tip: You can toggle comments from me using the |
This feature enables to create a template file named navmenu.html optionally. If this exists, it will included into the menu div and allows to extend the navigation for some custom stativ pages. Also if exist, there is no redirect from "/" to "/pkg/" anymore. In case of this also a custom index page could be created. This patch enables the godoc server to a full customizable documentation site of go projects. PR golang#309 should be applied in addition so that only partial overload of templates is necessary.
This feature enables to create a template file named navmenu.html optionally. If this exists, it will included into the menu div and allows to extend the navigation for some custom stativ pages. Also if exist, there is no redirect from "/" to "/pkg/" anymore. In case of this also a custom index page could be created. This patch enables the godoc server to a full customizable documentation site of go projects. PR golang#309 should be applied in addition so that only partial overload of templates is necessary.
|
Message from Dmitri Shuralyov: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
|
Message from Tom Thomas Freudenberg: Patch Set 3: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
Even that there already a `vfs.BindBefore` option was used when an optionally `templateDir` was given, the default static content was not mounted always. Without the patch you can only replace the __all__ templates but now also single ones.
1f5195d to
3447088
Compare
|
This PR (HEAD: 3447088) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/313091 to see it. Tip: You can toggle comments from me using the |
|
For ongoing discussion I rebased the PR to latest HEAD of master |
|
Message from Tom Freudenberg: Patch Set 3: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
|
Message from Tom Freudenberg: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
|
This PR (HEAD: a725f76) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/313091 to see it. Tip: You can toggle comments from me using the |
|
Message from Dmitri Shuralyov: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
|
Message from Tom Freudenberg: Patch Set 3: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
|
Message from Tom Freudenberg: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313091. |
The godoc static files are not mounted in general by vfs.
The patch allows to overlay only several template files
with custom files.