Logs
Patchsets
Range Diff ↕ rd-115
1: 0200c93 ! 1: a2710a3 refactor: custom index page
Range Diff ↕ rd-116
1: a2710a3 ! 1: 7338b44 feat: allow config `desc` to add a description box to index page
Range Diff ↕ rd-121
1: 7338b44 ! 1: 26daea4 feat(pgs): lru cache for object info and special files
-: ------- > 2: b004b64 chore(pgs): use http cache clear event to rm lru cache for special files
-: ------- > 3: 59f5618 refactor(pgs): store lru cache on web router
Range-diff rd-116
- title
- feat: allow config `desc` to add a description box to index page
- description
-
Patch changed - old #1
a2710a3- new #1
7338b44
1: a2710a3 ! 1: 7338b44 feat: allow config `desc` to add a description box to index page
old
old:
cli.go
new:cli.go
} func NewCli(sesh ssh.Session, be *Backend, pr GitPatchRequest) *cli.App { - desc := `Patchbin: a supercharged pastebin for git collaboration. + desc := `git-pr: the simplest git collaboration tool. Here's how it works: - External contributor clones repo (git-clone) app := &cli.App{ Name: "ssh", Description: desc, - Usage: "Collaborate with contributors for your git project", + Usage: "Send, receive, and review git patches", Writer: sesh, ErrWriter: sesh, ExitErrHandler: func(cCtx *cli.Context, err error) { return nil }, Commands: []*cli.Command{ + { + Name: "index", + Usage: "Generate an index page", + Args: true, + Action: func(cCtx *cli.Context) error { + indexFile := `{{template "base" .}} +{{define "title"}}git-pr{{end}} + +{{define "meta"}} +{{end}} + +{{define "body"}} +<header class="group"> + <h1 class="text-2xl">git-pr</h1> + <div> + <span>The simplest git collaboration service</span> · <a href="/e">explore</a> + </div> +</header> + +<main></main> + +<footer class="mt">Built by <a href="https://pico.sh">pico.sh</a></footer> +{{end}}` + wish.Println(sesh, indexFile) + return nil + }, + }, { Name: "logs", Usage: "List event logs with filters",