diff options
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | config.go | 2 | ||||
-rw-r--r-- | handler_test.go | 2 | ||||
-rw-r--r-- | sally.yaml | 1 | ||||
-rw-r--r-- | templates/index.html | 11 |
6 files changed, 21 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 31295a3..3f92d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Changed +### Added +- Add an optional `description` field to packages. - Use a fluid layout for the index page. This renders better on narrow screens. @@ -47,6 +47,9 @@ packages: # Defaults to "master". branch: master + # Optional description of the package. + description: A fast, structured-logging library. + # Alternative base URL instead of the value configured at the top-level. # This is useful if the same sally instance is # hosted behind multiple base URLs. @@ -26,6 +26,8 @@ type Package struct { Repo string `yaml:"repo"` Branch string `yaml:"branch"` URL string `yaml:"url"` + + Desc string `yaml:"description"` // plain text only } // Parse takes a path to a yaml file and produces a parsed Config diff --git a/handler_test.go b/handler_test.go index 96a10dd..e300d19 100644 --- a/handler_test.go +++ b/handler_test.go @@ -17,6 +17,7 @@ packages: zap: url: go.uberalt.org repo: github.com/uber-go/zap + description: A fast, structured logging library. ` @@ -27,6 +28,7 @@ func TestIndex(t *testing.T) { body := rr.Body.String() assert.Contains(t, body, "github.com/thriftrw/thriftrw-go") assert.Contains(t, body, "github.com/yarpc/yarpc-go") + assert.Contains(t, body, "A fast, structured logging library.") } func TestPackageShouldExist(t *testing.T) { @@ -3,5 +3,6 @@ url: go.uber.org packages: thriftrw: repo: github.com/thriftrw/thriftrw-go + description: A customizable implementation of Thrift. yarpc: repo: github.com/yarpc/yarpc-go diff --git a/templates/index.html b/templates/index.html index 3fc210c..d193263 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,6 +7,7 @@ .separator { margin: 0.25em 0; } + .description { color: #666; } /* On narrow screens, switch to inline headers. */ .table-header { display: none; } @@ -44,6 +45,16 @@ </a> </div> </div> + {{ with .Desc }} + <div class="row"> + <div class="one column"> + <!-- indent --> + </div> + <div class="eleven columns description"> + {{ . }} + </div> + </div> + {{ end }} {{ end }} </div> </body> |