{"id":16049290,"url":"https://github.com/ayan4m1/gatsby-source-reddit-wiki","last_synced_at":"2025-04-05T07:20:58.402Z","repository":{"id":47496335,"uuid":"235150489","full_name":"ayan4m1/gatsby-source-reddit-wiki","owner":"ayan4m1","description":"Gatsby source plugin for pulling data from a public Reddit wiki using the Reddit API.","archived":false,"fork":false,"pushed_at":"2022-05-16T00:26:44.000Z","size":1070,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T15:44:47.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ayan4m1.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}},"created_at":"2020-01-20T16:51:47.000Z","updated_at":"2022-05-08T02:26:41.000Z","dependencies_parsed_at":"2022-09-06T06:13:14.594Z","dependency_job_id":null,"html_url":"https://github.com/ayan4m1/gatsby-source-reddit-wiki","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan4m1%2Fgatsby-source-reddit-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan4m1%2Fgatsby-source-reddit-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan4m1%2Fgatsby-source-reddit-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayan4m1%2Fgatsby-source-reddit-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayan4m1","download_url":"https://codeload.github.com/ayan4m1/gatsby-source-reddit-wiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247301163,"owners_count":20916455,"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":[],"created_at":"2024-10-09T00:15:53.373Z","updated_at":"2025-04-05T07:20:58.377Z","avatar_url":"https://github.com/ayan4m1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-source-reddit-wiki\n\nSource plugin for pulling data from a public or private Reddit wiki using the Reddit API.\n\n## Features\n\n## Install\n\n```\n$\u003e npm install --save gatsby-source-reddit-wiki\n```\n\n## API Setup\n\n1. Go to [Reddit's apps page](https://www.reddit.com/prefs/apps)\n2. Click \"create app\"\n3. Enter any name\n4. Select \"script\" application type\n5. Enter anything for description, about URI, and redirect URI\n6. Click \"create app\"\n7. Ensure the user you will use to authenticate has been granted access to the app\n\n## Usage\n\n### gatsby-config.js\n\n```js\nmodule.exports = {\n  plugins: [\n    // your other plugins here...\n    'gatsby-transformer-remark',\n    {\n      resolve: 'gatsby-source-reddit-wiki',\n      options: {\n        // the following four fields are REQUIRED\n        username: 'spez',\n        password: 'ReallySecure',\n        appId: '8sjcAWF_98VAS',\n        appSecret: 'ck7S_ACJiobijq2v9asjiv',\n        // required name of subreddit which has its wiki enabled\n        // do not include the /r/ prefix\n        subreddit: 'aww',\n        // optional time in milliseconds to wait in between requests\n        // to the reddit API\n        minTime: 1000\n      }\n    }\n  ]\n};\n```\n\n### gatsby-node.js\n\nSee [gatsby-transformer-remark](https://www.gatsbyjs.org/packages/gatsby-transformer-remark/) for a complete example illustrating how to render a page component from the wiki data. All of your content is transformed to HTML in `allMarkdownRemark`.\n\n### Querying\n\nEnumerate nodes:\n\n```graphql\n{\n  allRedditWikiPage {\n    nodes {\n      id\n      path\n      content_md\n      revision_by {\n        name\n      }\n    }\n  }\n}\n```\n\nOnly fetch pages most recently updated by moderators:\n\n```graphql\n{\n  allRedditWikiPage(filter: { revision_by: { is_mod: { eq: true } } }) {\n    nodes {\n      id\n      path\n      content_md\n      revision_by {\n        name\n      }\n    }\n  }\n}\n```\n\n## Configuration\n\n**NOTE**: You cannot use this plugin with a Reddit account that has 2FA enabled.\n\n| Key       | Type   | Required | Description                                    |\n| --------- | ------ | -------- | ---------------------------------------------- |\n| username  | String | **Y**    | Reddit username                                |\n| password  | String | **Y**    | Reddit password                                |\n| appId     | String | **Y**    | Reddit-generated app ID                        |\n| appSecret | String | **Y**    | Reddit-generated app secret                    |\n| subreddit | String | **Y**    | Subreddit name without `/r/` prefix            |\n| minTime   | Number | N        | Minimum time to wait between API request in ms |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayan4m1%2Fgatsby-source-reddit-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayan4m1%2Fgatsby-source-reddit-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayan4m1%2Fgatsby-source-reddit-wiki/lists"}