Create a new link post entry in a Kirby blog.
Create a new link post entry in a Kirby blog using the command line.
You also need to set up a custom post type for link posts as discribed in this blog post. The textfiles for link post have to be called
article.link.txt as proposed in that post.
You need to create at least the first post manually if you don't have any posts yet.
Install the module with:
npm install -g kirby-linkpost
To create create a new link post in your Kirby blog setup move into the directory of your Kirby blog e.g.:
klp 'Title Of Post'
The second argument providing the external link is optional.
The script will create a new directory in
/content/01-blog/. The name of of the directory will be prefixed with the correct number followed by a slug generated from the provided title of the post.
Then it will create a file in that directory called
article.link.txt and fill in the template for a link post including title and the external link if a second argument is provided.
And lastly it opens that file with the
subl command. If you want the script to open it with a different text editor you will have to provide a different command in the script directly.
var callFavTextEditor = 'subl' to the command of your choice.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
v0.1.0 Initial release. No bugs. Only features. :)
Copyright (c) 2012 Kahlil Lechelt Licensed under the MIT license.