Hey everyone 👋
It would be amazing if we could connect a GitHub repository with our articles in markdown files.
This allows us to:
Write our articles in our favorite editor, e.g. Visual Studio Code Update our articles when we push to master branch (or a branch of choice) Enables us to create branches, do PRs and reviews.
For example, I would love to use Hashnode to do release notes and articles on behalf of my Open-Source projects and my company. Since we are multiple people working on these, it would be nice for us to do PRs and code reviews, like we do anything else.
Additionally, this also enables us to do "batch" updates of articles. Sometimes we need to do a simple "search and replace" throughout multiple articles, and this feature would allow us to update a series of articles by virtue of updating the repository.
We thought it's really interesting and started working on it. Today I am happy to announce that you can now connect a GitHub repository as a source for your Hashnode articles. This means you can use your favorite editor to write your article and as soon as you commit it on your GitHub repo it gets published on Hashnode automatically! 🙌
This feature is in private beta and currently available to Hashnode Ambassadors.
Here is how you can enable this feature in two easy steps:
Go to your dashboard and visit integrations tab. Click on "Connect Hashnode app on GitHub" button:
Once you click on it, you will be redirected to GitHub. You need to install our GitHub app on one of your repos which will house the articles.
Now go to your repo where you have installed our GitHub app and create a new
.md file. You can name it anything. The content of the file should be in the following format.
title: YOUR_TITLE_HERE slug: CUSTOM_SLUG_HERE tags: TAG_SLUG_1, TAG_SLUG_2 cover: COVER_IMAGE_URL domain: YOUR_DOMAIN_NAME_HERE (e.g. sandeep.dev or sandeep.hashnode.dev) Enter article body here
Once you commit, the article gets published on your Hashnode blog automatically.
Just note the following:
To use images in your posts, you will have to first upload them using Hashnode uploader. You can then copy the URL and use it in your article.
Posts sourced from GitHub can't be edited on Hashnode. You need to edit the files on GitHub and we sync automatically.
This feature is in private beta. We would love to have your feedback and improve further before releasing it to everyone. 🙌