create-md-post
Customizable markdown post layout generator
Config
Config is set in create-md-post.json
.
If there is create-md-post.json
in process.cwd()
, create-md-post use the create-md-post.json
.
If not, create-md-post use the create-md-post.json
of default setting.
And create-md-post use create-md-post.md
as template.
If there is no create-md-post.md
in process.cwd()
, create-md-post use the create-md-post.md
of default setting.
create-md-post.json
filename
Type: string
(Function
: ({ attributes, conf }) => Promise<string>
)
A function that determines the name of the file to be created.
You can use inputs through attributes
object.
And you can use Conf object to save some date.
order
Type: array
The array of attributes.
Questions are made according to the order of the array.
template
Type: string (file path)
Template file path.
attributes
Type: object
Each attribute becomes a question when executes create-md-post
.
type
Type: string (enum)
Possible values: string
, list/comma
Determine the type of the question.
message
Type: string
Determine the message of the question.
default
Type: string
(Function
: ({ attributes, conf }) => Promise<string>
)
Determine the default value of the question.
callback
Type: string
(Function
: ({ attributes, conf }) => Promise<string>
)
Run a callback after receiving user input.