https://github.com/devidw/hashnode-gh-src-new
Bash Script to automatically create new hashnode .md article files with frontmatter
https://github.com/devidw/hashnode-gh-src-new
article articles bash bash-script bash-scripting cli hashnode makdown
Last synced: about 1 year ago
JSON representation
Bash Script to automatically create new hashnode .md article files with frontmatter
- Host: GitHub
- URL: https://github.com/devidw/hashnode-gh-src-new
- Owner: devidw
- Created: 2021-11-26T19:30:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-28T21:45:53.000Z (over 4 years ago)
- Last Synced: 2025-02-02T11:41:44.739Z (about 1 year ago)
- Topics: article, articles, bash, bash-script, bash-scripting, cli, hashnode, makdown
- Language: Shell
- Homepage:
- Size: 1.85 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= 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
. Download the `new` script
. Make it executable
[source, bash]
----
chmod +x ./new
----
== Configuration
Configuration is doen by changing variable values inside `new`.
=== Domain
Specify your hashnode domain (custom domain or hashnode subdomain)
[source, bash]
----
domain="xn--david-9u04d.to"
----
=== Cover
Specify a default cover image URL
[source, bash]
----
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.
[source, bash]
----
./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:
[source, bash]
----
./new 2021-11-28
----