mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
cli/templateinit: add links to template READMEs (#2576)
- template init: add links to template docs - examples: add URL field to examples, ensure that example fields are always non-empty - cliui: bump wrap width to 80 from 58
This commit is contained in:
+1
-1
@@ -52,5 +52,5 @@ var Styles = struct {
|
||||
Fuschia: defaultStyles.SelectedMenuItem.Copy(),
|
||||
Logo: defaultStyles.Logo.SetString("Coder"),
|
||||
Warn: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}),
|
||||
Wrap: defaultStyles.Wrap,
|
||||
Wrap: lipgloss.NewStyle().Width(80),
|
||||
}
|
||||
|
||||
+2
-1
@@ -25,9 +25,10 @@ func templateInit() *cobra.Command {
|
||||
exampleByName := map[string]examples.Example{}
|
||||
for _, example := range exampleList {
|
||||
name := fmt.Sprintf(
|
||||
"%s\n%s\n",
|
||||
"%s\n%s\n%s\n",
|
||||
cliui.Styles.Bold.Render(example.Name),
|
||||
cliui.Styles.Wrap.Copy().PaddingLeft(6).Render(example.Description),
|
||||
cliui.Styles.Keyword.PaddingLeft(6).Render(example.URL),
|
||||
)
|
||||
exampleNames = append(exampleNames, name)
|
||||
exampleByName[name] = example
|
||||
|
||||
Reference in New Issue
Block a user