Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.14 KB

File metadata and controls

46 lines (36 loc) · 1.14 KB

Bash Script to automatically create new hashnode .md article files with frontmatter

You can use the shell script new to auto generate boilterplate article .md files, when you publish on hashnode from a GitHub source.

Installation

  1. Download the new script

  2. Make it executable

chmod +x ./new

Configuration

Configuration is doen by changing variable values inside new.

Domain

Specify your hashnode domain (custom domain or hashnode subdomain)

domain="xn--david-9u04d.to"

Cover

Specify a default cover image URL

cover="https://david.wolf.gdn/media/cover.png"

Usage

Simply run the script, this will gnerate a new .md file with frontmatter in the directory the script is located.

./new

The file name will follow the format of YYYY-MM-DD_.md. For example: 2021-12-31_.md.

Note
Spaces are not allowed in hashnode source files, when you are publishing from a GitHub source on Hashnode, use underscores instead.

You can optionaly pass a date to the script by passing it as argument:

./new 2021-11-28