Skip to content

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

Notifications You must be signed in to change notification settings

devidw/hashnode-gh-src-new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages