How I sync my Hashnode with my Hugo blog

Hashnode provide a visual editor easy to use and create blog. Hashnode also provide auto backup into github in markdown format. So I gonna create blog in hashnode and sync it to my hugo blog Step 1: make a script to convert from hashnode format to hugo format Even they’re both markdown, but both has a special properties to format the blog. So here we have to convert mostly those properties, for the body don’t need to to touch much....

August 13, 2024 · 5 min

Merge 2 branches with Github Actions

Story I plan to auto push blog from hashnode to hugo. So this is the first step. My repo has 2 branch: main: is the branch that hashnode gonna backup the posts there in md format. Hugo: is the branch that contains Hugo blog Step 1: Make sure your Actions has permission to write to the repo. Check it here: https://github.com/thebrownbox/blogs/settings/actions Step 2: Create the github actions ref: https://github.com/devmasx/merge-branch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 name: Merge main to Hugo on: push: branches: - main jobs: merge-branch: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Merge main -> Hugo uses: devmasx/merge-branch@master with: type: now target_branch: Hugo github_token: ${{ secrets....

August 13, 2024 · 1 min