Clarity is an important aspect when starting any venture. Coding and/ or web development is no exception. Hence, I’d like to lay out the concept of what I’m trying to make.
My goal for this yet unnamed, simple bash script is to automate the process of creating a post in the
content/posts folder of my site.
Through automation, I’d like to achieve the following:
- Create a new post (or markdown file) inside
content/postswith the filename set to
- Automatically insert front matter inside the new post (e.g. title, subtitle, etc.).
- Automatically add current date and publish date (for future posts) in the front matter.
To do so, my script follows this process:
- Ask user to enter the Post Title
- Ask user which site (for multiple sites) to add a post to.
- Create a new markdown file inside the indicated site with the filename as current date and post title.
- Start writing the new post.
So far, my script has been doing what I want it to. Now, in order for this to be open source-friendly, I will have to add some useful variables and comments so people can just enter their details if they want to.
That’s it for now. :)