diff --git a/cmd/listen.go b/cmd/listen.go index be275b5..e079383 100644 --- a/cmd/listen.go +++ b/cmd/listen.go @@ -23,6 +23,13 @@ import ( var listenCmd = &cobra.Command{ Use: "listen", Short: "Start webhook listener", + Long: `Start webhook listener + +Webhook mode utilized Forgejo's webhook to update pages. You have to setup webhook +in Forgejo's settings page to point to this server. When a push event is received, +this server will pull the repository and update the pages. How the pages are served +is up to you, eg. Nginx, Apache, or even a simple Go server. +`, Run: func(cmd *cobra.Command, args []string) { viper.BindPFlags(cmd.Flags()) // check flags diff --git a/cmd/serve.go b/cmd/serve.go index 2c9ce68..94c20d8 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -22,6 +22,12 @@ import ( var serveCmd = &cobra.Command{ Use: "serve", Short: "Start the static page server.", + Long: `Start the static page server. + +Serve mode will start a HTTP server to serve static pages. It just forward requests +to Forgejo server. This is useful when there is not much viewers, or you have other +cache/protection layer like Cloudflare in front of the server. +`, Run: func(cmd *cobra.Command, args []string) { viper.BindPFlags(cmd.Flags()) // check flags