Skip to content

Commit

Permalink
go-aah/aah#227 addressing documentation unavailable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Dec 12, 2018
1 parent 1ec3042 commit adf938d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
5 changes: 5 additions & 0 deletions app/controllers/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func (c *DocController) VersionHome(version string) {
File(filepath.Join("static", version))
case "godoc":
c.GoDoc()
case "examples":
c.Examples()
default:
queryStr := c.Req.URL().Query().Encode()
targetURL := c.RouteURL("docs.show_doc", releases[0], version)
Expand All @@ -90,6 +92,9 @@ func (c *DocController) VersionHome(version string) {
func (c *DocController) ShowDoc(version, content string) {
// handle certian doc path and updates
switch content {
case "release-notes.html":
c.ReleaseNotes(version)
return
case "error-handling.html":
if util.VersionLtEq(version, "v0.9") {
c.Reply().Redirect(c.RouteURL("docs.show_doc", version, "/centralized-error-handler.html"))
Expand Down
2 changes: 1 addition & 1 deletion config/env/dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dev {
# --------------------
log {
#receiver = "file"
#level = "trace"
level = "trace"
#color = false
#pattern = "%time:2006-01-02 15:04:05.000 %level:-5 %shortfile %line %appname %insname %reqid %principal %message %fields"
}
Expand Down
18 changes: 9 additions & 9 deletions config/routes.conf
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,18 @@ domains {
path = "/*content"
action = "ShowDoc"
}
release_notes {
path = "/release-notes.html"
action = "ReleaseNotes"
}
# release_notes {
# path = "/release-notes.html"
# action = "ReleaseNotes"
# }
}
}

examples {
path = "/examples.html"
controller = "DocController"
action = "Examples"
}
# examples {
# path = "/examples.html"
# controller = "DocController"
# action = "Examples"
# }

} # end - docs app routes

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module aahframework.org/website

require (
aahframe.work v0.12.1
aahframe.work/minify/html v0.1.0
aahframe.work/minify/html v0.2.0
github.com/hashicorp/go-version v1.0.0
github.com/russross/blackfriday v1.5.2
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
aahframe.work v0.12.0/go.mod h1:pJFDfvHExiQFl3P3o5cvuhvJVZUBMtlbQmxafVhnbL0=
aahframe.work v0.12.1 h1:yCqUu+Y7A2mmH2VAd+Ysofvni12/YhAyjAUlDuDN/IY=
aahframe.work v0.12.1/go.mod h1:cwxvkz5siNsSfRiUdO203R4/ZgjWlf0G4e+nsI4okCc=
aahframe.work/minify/html v0.1.0 h1:CHfM7EYj2AxWdr7I5GS8JaBKVx5WykkJWHKCI3ePkPs=
aahframe.work/minify/html v0.1.0/go.mod h1:Qn72AfHnTkoXB42rgBEX6AjGnOS65nuxDPxD8LKcUuQ=
aahframe.work/minify/html v0.2.0 h1:1gtG3fqfUzfIeIIoaGt+h8W0ScskMog686RdxcEPJ6E=
aahframe.work/minify/html v0.2.0/go.mod h1:we9/8Q4XPI8tZJ84o+75rPXfp0b3TyTGnUVxCuv6bvI=
cloud.google.com/go v0.30.0 h1:xKvyLgk56d0nksWq49J0UyGEeUIicTl4+UBiX1NPX9g=
cloud.google.com/go v0.30.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-aah/forge v0.6.0/go.mod h1:noFuP/1ZMLfYHd/CpUGNdlXgqeRaYiEkj7WsCdqnlvc=
github.com/go-aah/forge v0.7.0 h1:WgD53x4jUS14IRDeTON+m7tGkqUg0Oj+e5PhiKbtFTM=
github.com/go-aah/forge v0.7.0/go.mod h1:+pz2ywtYKCMzKtHa2kyKIOBw2XhQpj+dgch/vMGWyqo=
github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc=
Expand Down

0 comments on commit adf938d

Please sign in to comment.