Notio - Hashnode Post-Publication LLM Toolkit

Notio - Hashnode Post-Publication LLM Toolkit

LLM tools you need after your Hashnode article is published.

As someone who manages various communities with different languages, personalities, and audiences, I've always wanted them all to benefit my Hashnode blogs, but I haven't been successful.

Some readers found my articles boring, while others thought they were too technical and hard to understand. Some people even had trouble reading articles in English.

So I thought, why not use LLMs for some post-production work and publish different versions of an article I write on Hashnode?

Theory

Hashnode uses a GitHub repository to create backups for the articles you publish on Hashnode. If you enable this feature in your Hashnode dashboard, a username/hashnode repository will be created on your GitHub profile.

From then on, whenever you publish or edit an article, it will automatically be pushed to that GitHub repository, and here is when magic happens! 🪄

As soon as Hashnode updates the repository, Notio gets triggered on the article.

Based on the configuration given to Notio, it carries out different tasks on the article. In the end, the result is a markdown file with the new version of the article inside the backup repository.

How Notio Works

Notio functions as a GitHub CI pipeline (GitHub Action). It connects to a Hypermode GraphQL instance and processes the article by making API calls to the instance.

Once the transformed article is received, it is saved as a Markdown file in the backup directory. Since both Hashnode and GitHub use similar Markdown syntax, the output articles stay readable on GitHub.

LLM Features

Notio provides several LLM features. Let's begin with the most important one.

Article translation

You can receive a translated version of your article in any language on your GitHub just minutes after publishing it on Hashnode. (both RTL and LTR languages are supported)

Generating questions

This feature allows you to generate any number of questions, with or without answers, about the published article and save them as a markdown document.

Generate abstraction

If you need to create a brief summary of your article, this feature is perfect for you. Just a minute after you publish your article on Hashnode, you'll have its summary in the repository.

Simplify article

You can use this feature to create a simpler version of your article for readers who need a basic understanding of the topic. This version might include fewer code blocks and lighter discussion topics, but it still covers all sections of the article.

Setup & Usage

If you want to set up Notio for your Hashnode blog, follow these steps.

1. Enable blog backup from Hashnode

Navigate to your blog settings. From the sidebar, select "GitHub” and follow the instructions.

2. Create a Hypermode instance

Clone this Hypermode sample instance repository. Follow this document to deploy your own GraphQL instance on Hypermode.

3. Grab the endpoint URL and API key

Once your instance is deployed to Hypermode, retrieve the endpoint URL from the Hypermode dashboard and the API key from the instance settings.

4. Store the secrets

Navigate to the backup repository that Hashnode has just created for you on your GitHub profile. Go to "Settings" > "Secrets and variables" > "Actions" and create the following secrets.

  • HYPERMODE_ENDPOINT_URL: The endpoint URL–taken from the Hypermode dashboard.

  • HYPERMODE_API_TOKEN: The API token–taken from the Hypermode instance settings.

5. Use Notio

Now that everything is set up and the model is ready to respond, create a workflow file in the backup repository at .github/workflows/notio-ci.yml. For now, paste the following YAML configuration into it.

name: Notio LLM CI

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    name: Running the action
    steps:
      - name: checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

Two more steps need to be added to this YAML file. The next step involves using Notio. The steps below show how to use each LLM feature. Choose one and configure it according to your needs.

  • translate-article: To translate the article.

      - name: Running Notio
        uses: lnxpy/notio@main
        with:
          method: translate-article
          path: dutch/  # default: transformed_articles/
          translate_to: Dutch # default: English
          hypermode_endpoint: ${{ secrets.HYPERMODE_ENDPOINT }}
          hypermode_api_token: ${{ secrets.HYPERMODE_API_TOKEN }}
    
  • question-generation: To generate questions about the article.

      - name: Running Notio
        uses: lnxpy/notio@main
        with:
          method: generate-questions
          path: questions/
          question_limit: 10 # default: 20
          include_answers: false # default: true
          hypermode_endpoint: ${{ secrets.HYPERMODE_ENDPOINT }}
          hypermode_api_token: ${{ secrets.HYPERMODE_API_TOKEN }}
    
  • abtract-article: To summarize and generate an abstraction from the article.

      - name: Running Notio
        uses: lnxpy/notio@main
        with:
          method: abstract-article
          path: abstractions/
          hypermode_endpoint: ${{ secrets.HYPERMODE_ENDPOINT }}
          hypermode_api_token: ${{ secrets.HYPERMODE_API_TOKEN }}
    
  • simplify-article: To simplify the article.

      - name: Running Notio
        uses: lnxpy/notio@main
        with:
          method: simplify-article
          path: simplified_articles/
          hypermode_endpoint: ${{ secrets.HYPERMODE_ENDPOINT }}
          hypermode_api_token: ${{ secrets.HYPERMODE_API_TOKEN }}
    

And finally, add the commit step to ensure the Notio articles are submitted to the repository and visible to your audiences.

- name: Commiting
  uses: EndBug/add-and-commit@v9
  with:
    default_author: github_actions
    message: 'article updated'

Here is a sample notio-ci.yml file showing how to use the question-generation method.

name: Notio LLM CI

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    name: Running the action
    steps:
      - name: checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Running Notio
        uses: lnxpy/notio@main
        with:
          method: generate-questions
          path: questions/
          question_limit: 20
          include_answers: true
          hypermode_endpoint: ${{ secrets.HYPERMODE_ENDPOINT }}
          hypermode_api_token: ${{ secrets.HYPERMODE_API_TOKEN }}

      - name: Commiting
        uses: EndBug/add-and-commit@v9
        with:
          default_author: github_actions
          message: 'article updated'

Now, whenever you publish or edit an article on Hashnode, Notio will begin processing it and perform the LLM operation you have specified.

Example

I'm using Notio for my Hashnode blog. When I published this article, Notio generated 10 questions about the article and stored them in my Hashnode backup repository. You can visit it here.

Tech Stacks

Conclusion

With the rapid growth of AI and LLMs, we'll see significant improvements in our CI cycles. We won't need to review and rewrite articles ourselves because we have AI!

Special thanks to Hypermode and Hashnode for setting up this awesome hackathon. 🍻