{"id":20407136,"url":"https://github.com/nitzano/gatsby-source-hashnode","last_synced_at":"2025-04-12T15:11:36.658Z","repository":{"id":39153631,"uuid":"325091451","full_name":"nitzano/gatsby-source-hashnode","owner":"nitzano","description":"Gatsby source plugin for building websites using Hashnode API as data source","archived":false,"fork":false,"pushed_at":"2023-03-01T15:59:38.000Z","size":3187,"stargazers_count":4,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T15:11:30.773Z","etag":null,"topics":["gatsby","gatsby-plugin","hashnode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitzano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-28T18:51:36.000Z","updated_at":"2022-09-27T09:16:08.000Z","dependencies_parsed_at":"2024-11-15T05:33:16.114Z","dependency_job_id":null,"html_url":"https://github.com/nitzano/gatsby-source-hashnode","commit_stats":{"total_commits":322,"total_committers":3,"mean_commits":"107.33333333333333","dds":0.4161490683229814,"last_synced_commit":"80313dee973037689a6b246cfc7440556981c237"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fgatsby-source-hashnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fgatsby-source-hashnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fgatsby-source-hashnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fgatsby-source-hashnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitzano","download_url":"https://codeload.github.com/nitzano/gatsby-source-hashnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586230,"owners_count":21128997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gatsby","gatsby-plugin","hashnode"],"created_at":"2024-11-15T05:21:31.576Z","updated_at":"2025-04-12T15:11:36.635Z","avatar_url":"https://github.com/nitzano.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003egatsby-source-hashnode\u003c/h1\u003e\n\u003ch2 align=\"center\"\u003e\nBuild Gatsby websites with \u003ca href=\"https://hashnode.com/\"\u003eHashnode\u003c/a\u003e as a data source  \n\u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm](https://img.shields.io/npm/v/gatsby-source-hashnode)](https://www.npmjs.com/package/gatsby-source-hashnode)\n[![npm-beta](https://img.shields.io/npm/v/gatsby-source-hashnode/beta)](https://www.npmjs.com/package/gatsby-source-hashnode)\n![npm-total](https://img.shields.io/npm/dt/gatsby-source-hashnode)\n![GitHub Repo stars](https://img.shields.io/github/stars/nitzano/gatsby-source-hashnode?style=flat)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\n\u003c/div\u003e\n\n- [Highlights](#highlights)\n- [Install](#install)\n- [How to use](#how-to-use)\n- [How to query](#how-to-query)\n  - [Get user posts](#get-user-posts)\n  - [Get post's reading time](#get-posts-reading-time)\n  - [Get user details](#get-user-details)\n\n## Highlights\n\n- Retrieves user posts\n- Calculates estimated reading time\n- Fetches user details\n- Converts images for [gatsby-plugin-image](https://www.gatsbyjs.com/plugins/gatsby-plugin-image/)\n- Supported versions\n  - Gatsby v4 ( `@latest` tag)\n  - Gatsby v3 (`@release-2` tag)\n\n## Install\n\n![release workflow](https://github.com/nitzano/gatsby-source-hashnode/actions/workflows/release.yml/badge.svg)\n![test workflow](https://github.com/nitzano/gatsby-source-hashnode/actions/workflows/test.yml/badge.svg)\n\n```bash\nnpm install gatsby-source-hashnode\n```\n\n## How to use\n\nConfigure the plugin in `gatsby-config.js`:\n\n```javascript\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: \"gatsby-source-hashnode\",\n      options: {\n        username: \"\u003cHASHNODE_USERNAME\u003e\",\n      },\n    },\n  ],\n};\n```\n\n## How to query\n\n### Get user posts\n\n```graphql\n{\n  allHashNodePost {\n    edges {\n      node {\n        brief # \"In this article...\"\n        coverImage {\n          # File node (to be used with gatsby-plugin-image)\n          childImageSharp {\n            gatsbyImageData(layout: FULL_WIDTH, placeholder: BLURRED)\n          }\n          # OR\n          # url // \"https://cdn.hashnode.com/...\n        }\n        slug # \"my-great-article\"\n        title # \"My Great Article\"\n      }\n    }\n  }\n}\n```\n\n### Get post's reading time\n\n(With the kind help of [reading-time](https://www.npmjs.com/package/reading-time))\n\n```graphql\n{\n  allHashNodePost {\n    edges {\n      node {\n        title\n        readingTime {\n          minutes # 2\n          text # \"2 min read\"\n          time # 120000\n          words # 100\n        }\n      }\n    }\n  }\n}\n```\n\n### Get user details\n\n```graphql\n{\n  allHashNodeUser {\n    edges {\n      node {\n        _id\n        blogHandle # \"userhandle1\"\n        coverImage # \"https:/...\n        dateJoined # \"2014-01-01T01:00:00.000Z\"\n        isDeactivated # false\n        isEvangelist # true\n        location # \"Canada\"\n        name # \"First last\"\n        numFollowers # 503\n        numFollowing # 14\n        numPosts # 50\n        numReactions # 95\n        photo # \"https:/...\n        publicationDomain # \"blog.mydomain..\"\n        tagline # \"I do stuff\"\n        username # \"username1\"\n      }\n    }\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzano%2Fgatsby-source-hashnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitzano%2Fgatsby-source-hashnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzano%2Fgatsby-source-hashnode/lists"}