- Notifications
You must be signed in to change notification settings - Fork 2.3k
godoc/server: allow customized menu and navigation #313
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: allow customized menu and navigation #313
Conversation
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.
| </div><!-- #lowframe --> | ||
| | ||
| <div id="topbar"{{if .Title}} class="wide"{{end}}><div class="container"> | ||
| <div class="top-heading" id="heading-wide"><a href="/pkg/">Go Documentation Server</a></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/pkg/ is not necessary in any case because / is already redirected by handler
| This PR (HEAD: 9a3b682) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/313095 to see it. Tip: You can toggle comments from me using the |
| Message from Dmitri Shuralyov: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Thomas Freudenberg: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Dmitri Shuralyov: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Thomas Freudenberg: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Freudenberg: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Freudenberg: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| This PR (HEAD: 42f38a8) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/313095 to see it. Tip: You can toggle comments from me using the |
| Message from Dmitri Shuralyov: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Freudenberg: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Dmitri Shuralyov: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
| Message from Tom Freudenberg: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/313095. |
This feature enables to create a template file named
navmenu.html optionally.
If this exists, it will be included into the menu div and
allows to extend the navigation for some custom
stativ pages.
Also, if that file exists, there is no default redirect
from "/" to "/pkg/" anymore. If you have "enabled"
custom navigation it is also possible to create a
custom index page.
This patch enables the godoc server to be a full customizable
documentation site of go projects.
PR #309 should be applied in addition so that only partial
overload of templates is necessary.
Example:
file: templates/navmenu.html
file: doc/help.html
This will look like: