Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/commands/field-add-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ import { addField } from "../lib/prismic/models";

const config = {
name: "prismic field add text",
description: "Add a text field to a slice or custom type.",
description: `
Add a text field to a slice or custom type.

A text field holds a short plain string with no formatting.

For a title or a heading, rich text limited to a single heading block
is usually a better fit:

prismic field add rich-text title --to-type blog_post --allow heading1 --single
`,
positionals: {
id: { description: "Field ID", required: true },
},
Expand Down
3 changes: 2 additions & 1 deletion src/commands/field-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export default createCommandRouter({
},
text: {
handler: fieldAddText,
description: "Add a text field",
description:
"Add a text field for short plain strings (not for titles or headings -- use rich-text --allow heading1 --single)",
},
timestamp: {
handler: fieldAddTimestamp,
Expand Down
Loading