From 83cec785cffd19a00eee83b7550b99e42fea0377 Mon Sep 17 00:00:00 2001 From: Diwas Rimal Date: Sat, 28 Dec 2024 22:54:04 +0545 Subject: [PATCH] Print cli usage of `hugo gen chromastyles` alongside css --- commands/gen.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/gen.go b/commands/gen.go index 83b4d637c66..67aa7a89665 100644 --- a/commands/gen.go +++ b/commands/gen.go @@ -75,7 +75,9 @@ See https://xyproto.github.io/splash/docs/all.html for a preview of the availabl return err } formatter := html.New(html.WithAllClasses(true)) - formatter.WriteCSS(os.Stdout, style) + w := os.Stdout + fmt.Fprintf(w, "/* Generated using: hugo %s */\n\n", strings.Join(os.Args[1:], " ")) + formatter.WriteCSS(w, style) return nil }, withc: func(cmd *cobra.Command, r *rootCommand) {