Setup pycharm for my blog

The goal is to ease working with my beloved PyCharm as an editor to publish my documents.

I want to add header every time create new Markdown file. To do this:

Goto File > Settings > Editor > File and Code Template
Click (+) and type .md extention

Then paste below code and apply:

:::apache
#set ($filename_ext = $FILE_NAME.indexOf('.'))
#set ($fname = $FILE_NAME.substring(0,$filename_ext))
#set ($title = $fname.replace('-', ' '))
#set ($title = ${StringUtils.capitalizeFirstLetter($title)})
Title: ${title}
Date: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
Author: ${USER}
Category: 
Tags: 
Slug: ${fname}
Status: draft
Card: no

Now every time you create new document something below will appear:

:::text
Title: Setup pycharm for my blog
Date: 2021-03-22 14:31
Author: Hosein
Category: 
Tags: pycharm, VTL
Slug: setup-pycharm-for-my-blog
Status: draft
Card: no

Usefull links:

File template variables

Apache Velocity Project

Search Results