aboutsummaryrefslogtreecommitdiff
path: root/templates (unfollow)
Commit message (Collapse)AuthorFiles
2024-05-21feat: Allow packages to define custom documentation URL and badge (#147)Maria1
feat: Allow packages to define custom doc URL and badge Co-authored-by: Jacob Oaks <jacoboaks.8@gmail.com> Co-authored-by: r-hang <rhang@uber.com>
2024-03-12Support dark mode theme (#142)Chongyi Zheng3
* Support dark mode theme * Add dark mode to 404 and package pages * Fix tests
2023-11-10feat: support for custom templates (#129)Henrique Dias2
Adds a `-templates` flag that can be used to provide an alternative directory with templates for Sally to use. The new templates override the default set embedded in Sally. This includes a new 404 template so that 404 errors use the same theme as the rest of the website. Additionally, for HTTP status >400, this also sets the Cache-Control header to discourage CDNs like Cloudflare from caching the page. Resolves #125, #18
2023-11-07feat: add support for other vcs systems (#128)Henrique Dias2
Adds support to other VCS systems as per the specification. Defaults to `git` for backwards compatibility. Renames the internally used `.GitURL` to `.RepoURL` for clarity.
2023-11-07fix: documentation URL in index page (#126)Henrique Dias1
Fixes the documentation URL in the homepage, as it already includes the protocol: https://github.com/uber-go/sally/blob/686fb8782cfa89a807ecc6dcbc104c6dab43eb66/handler.go#L45 Right now, we're rendering "https://https://[...]".
2023-10-18Add support for sub-indexes (#120)Abhinav Gupta2
<details> <summary>Background</summary> Sally renders two kinds of pages: - packages: These are for packages defined in sally.yaml and any route under the package path. - indexes: These list available packages. The latter--indexes was previously only supported at '/', the root page. This leads to a slight UX issue: if you have a package with a / in its name (e.g. net/metrics): - example.com/net/metrics gives you the package page - example.com/ lists net/metrics - However, example.com/net fails with a 404 </details> This adds support for index pages on all parents of package pages. Therefore, if example.com/net/metrics exists, example.com/net will list all packages defined under that path. Resolves #31
2023-05-07Removing redundant go-source tag (#92)Anurag Bandyopadhyay1
* update: removing redundant go-source tag * fix: removing /.idea and adding dir to gitignore * fix: removing /.idea and removing branch field from from templateData * fix: pkgHndler defaultBranch rem revert * fix: minor typo * fix: removing assertion of template responses * fix: tabs * Update handler_test.go * Update handler_test.go * Update handler_test.go --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
2023-04-29ci: gofmt, golint => revive, update tools and actions (#87)Abhinav Gupta1
Fixes up the `make lint` target to also check that all files are properly gofmt-ed, replaces the deprecated `golint` check with `revive`, and sets up dependabot to also update tools and actions regularly.
2023-04-29refactor(indexHandler): Don't retain configuration (#86)Abhinav Gupta1
Similar to the previous patch, this patch removes knowledge of the configuration from the index handler. Instead, the index handler is now passed a list of packageInfo structs each containing just the information needed to render the index page. This also obviates the need to duplicate the logic to compute the package import path in the index.html template.
2023-01-23Add support for package descriptions (#68)Abhinav Gupta1
* template: Use a more fluid layout Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. * Add support for package descrpitions Packages may now optionally specify a description. If specified, this is printed below the package information, indented one column to make it stand out. Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com>
2023-01-23template: Use a more fluid layout (#67)Abhinav Gupta1
Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top.
2022-12-18ci: Use Go 1.19 and update GH actions (#58)Abhinav Gupta1
This updates sally to build and test against Go 1.19. Additionally, this upgrades the GitHub Action versions for checkout and setup-go. One of the features in setup-go v3 is that caching is built-in and opted-into with `cache: true`. Non-CI changes: gofmt, drop ioutil
2022-05-17badge: Use pkg.go.dev badge (#55)Abhinav Gupta1
When we originally switched to pkg.go.dev (#40), it did not offer documentation badges so we relied on a third-party service. That's no longer true (https://pkg.go.dev/badge) so we can use pkg.go.dev's more "on-brand" badges for this.
2022-05-17Update dependencies (#54)Abhinav Gupta1
Update all dependencies, use Go 1.18 to build and test, and delete outdated `bindata` clause in Makefile (we switched to `go:embed` in #50). Other minor changes: - Fix the golint import path (it switched to golang.org/x/lint long before it was deprecated) and fix the failing lint check. (Switching from golint to revive is out of scope for this PR.) - Delete .envrc -- this was transitional for when Go modules were optional.
2022-01-03Support package-level overrides for URLs (#52)Tyler Sullivan1
Sally accepts the base vanity URL (e.g. `go.uber.org`) in a top-level `url` key. This applies to all packages listed in the configuration. Add support for overriding the `url` on a per-package basis. This will provide for an easier transition period when migrating Go packages of an organization between hosts, for example from BitBucket to GitHub. With this, source code can be modified across the various repositories over time to use the new vanity URL. For example, some packages will use a URL of bitbucketurl.org and some will use mycoolgoimportvanity.org in their source code imports. Other than the use-case outlined above, this feature adds flexibility to the vanity server to support more than one vanity URL when used behind an ingress controller.
2021-09-10Use go embed for templates (#50)Luciano Nooijen1
Go 1.16 includes a `//go:embed` directive that obviates the need for bindata. Use `//go:embed` instead of bindata for templates used in sally. Signed-off-by: Luciano Nooijen <luciano@bytecode.nl> Co-authored-by: Abhinav Gupta <abg@uber.com>
2021-05-18Allow setting branch (#46)Jan-Philipp Benecke1
Support specifying the branch from which source will be served in the YAML configuration.
2020-03-02Fix godoc badge image (#43)Abhinav Gupta1
pkg.go.dev does not serve a badge like godoc.org. This change switches the image over to one provided by shields.io. Note that this uses the style "for-the-badge" from shields.io.
2019-03-05Support changing godoc instance (#38)Diego Bernardes1
This adds the ability to change the godoc.org instance used by Sally to link to documentation by providing a new `godoc` section in the configuration.
2019-01-03Add minimal stylingAbhinav Gupta2
2016-10-12Rework as HTTP server (#15)Grayson Koonce2
2016-09-30Starting point (#1)Grayson Koonce2