Loading...

Create file templates for Jekyll posts

Writing Jekyll posts always require a YAML front matter block content. To speed up the task you may create a file template for IntelliJ or Webstorm, depending which IDE from Jetbrains you are using. The procedure is equal.

First create a new file template.

Create new file template

In this template you can use the internal variables provided by the IDEA platform. The author and date using variables as default values. The title is requested.

This is my template content. Adjust it to your needs.

---
layout: post
status: publish
published: true
title: $title
author: ${USER}
date: '${DATE} ${TIME}'
categories: []
tags: []
comments: []
---

Pay attention in which scope (default and project)the template exists.

Jekyll Post template

After that you just create a new file and input the requested information.

Create new Jekyll post