Print cli usage of hugo gen chromastyles alongside css

This commit is contained in:
Diwas Rimal 2024-12-28 22:54:04 +05:45 committed by Bjørn Erik Pedersen
parent 4e52be8b90
commit 83cec785cf

View file

@ -75,7 +75,9 @@ See https://xyproto.github.io/splash/docs/all.html for a preview of the availabl
return err return err
} }
formatter := html.New(html.WithAllClasses(true)) 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 return nil
}, },
withc: func(cmd *cobra.Command, r *rootCommand) { withc: func(cmd *cobra.Command, r *rootCommand) {