{"id":15289223,"url":"https://github.com/weirdpattern/gatsby-remark-embed-gist","last_synced_at":"2025-04-13T09:06:53.003Z","repository":{"id":32750146,"uuid":"139258203","full_name":"weirdpattern/gatsby-remark-embed-gist","owner":"weirdpattern","description":"Gatsby remark gists preprocessor","archived":false,"fork":false,"pushed_at":"2023-01-06T01:58:10.000Z","size":1258,"stargazers_count":29,"open_issues_count":25,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T09:06:42.632Z","etag":null,"topics":["embedded","gatsby","gatsby-plugin","gatsby-remark","gatsbyjs","gist","plugin","remark"],"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/weirdpattern.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-06-30T15:04:01.000Z","updated_at":"2025-02-16T00:02:19.000Z","dependencies_parsed_at":"2023-01-14T22:15:29.910Z","dependency_job_id":null,"html_url":"https://github.com/weirdpattern/gatsby-remark-embed-gist","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weirdpattern%2Fgatsby-remark-embed-gist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weirdpattern%2Fgatsby-remark-embed-gist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weirdpattern%2Fgatsby-remark-embed-gist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weirdpattern%2Fgatsby-remark-embed-gist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weirdpattern","download_url":"https://codeload.github.com/weirdpattern/gatsby-remark-embed-gist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688569,"owners_count":21145766,"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":["embedded","gatsby","gatsby-plugin","gatsby-remark","gatsbyjs","gist","plugin","remark"],"created_at":"2024-09-30T15:59:55.374Z","updated_at":"2025-04-13T09:06:52.984Z","avatar_url":"https://github.com/weirdpattern.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-remark-embed-gist\n\n[![NPM badge](https://img.shields.io/npm/v/gatsby-remark-embed-gist.svg?style=flat-square)](https://www.npmjs.com/package/gatsby-remark-embed-gist)\n[![Travis badge](https://img.shields.io/travis/weirdpattern/gatsby-remark-embed-gist.svg?branch=master\u0026style=flat-square)](https://travis-ci.org/weirdpattern/gatsby-remark-embed-gist)\n[![codecov](https://codecov.io/gh/weirdpattern/gatsby-remark-embed-gist/branch/master/graph/badge.svg)](https://codecov.io/gh/weirdpattern/gatsby-remark-embed-gist)\n\nThis plugin allows content authors to embed [Gist](https://gist.github.com/)\nsnippets.\n\n## Getting started\n\nTo embed a Gist snippet in you markdown/remark content, simply add an inline code\nblock using the `gist:` protocol.\n\n```md\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e#\u003cgist_file\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e#\u003cgist_file\u003e?lines=\u003cnumber|ranges\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e#\u003cgist_file\u003e?highlights=\u003cnumber|ranges\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e#\u003cgist_file\u003e?highlights=\u003cnumber|ranges\u003e\u0026lines=\u003cnumber|ranges\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e?file=\u003cgist_file\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e?file=\u003cgist_file\u003e?lines=\u003cnumber|ranges\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e?file=\u003cgist_file\u003e?highlights=\u003cnumber|ranges\u003e`\n`gist:[\u003cusername\u003e/]\u003cgist_id\u003e?file=\u003cgist_file\u003e?highlights=\u003cnumber|ranges\u003e\u0026lines=\u003cnumber|ranges\u003e`\n```\n\nWhere:\n\n- **username**, represents the github handler whose gist is to be accessed.  \n  Can be defaulted via configuration.\n- **gist_id**, is the id of the gist to be accessed.  \n  This is the hash value in the gist url, e.g. https://gist.github.com/\u003cusername\\\u003e/`ce54fdb1e5621b5966e146026995b974`).\n- **gist_file**, is the name of the file in the gist to be accessed.\n\nHighlights and lines can be defined using:\n\n- A single number (e.g. `highlights=1`, `lines=1`)\n- A list of numbers (e.g. `highlights=1,4`, `lines=1,4`)\n- A range of numbers (e.g. `highlights=1-4`, `lines=1-4`)\n- A combination of all above (e.g. `highlights=1,3,7-9`, `lines=1,3,7-9`)\n\n## Installation\n\n`yarn add gatsby-remark-embed-gist`\n\n## Usage\n\n```javascript\n// In your gatsby-config.js\n{\n  resolve: \"gatsby-transformer-remark\",\n  options: {\n    plugins: [\n      {\n        resolve: \"gatsby-remark-embed-gist\",\n        options: {\n          // Optional:\n\n          // the github handler whose gists are to be accessed\n          username: \"\u003cstring\u003e\",\n\n          // a flag indicating whether the github default gist css should be included or not\n          // default: true\n          // DEPRECATED (PLEASE USE gistDefaultCssInclude)\n          includeDefaultCss: true || false,\n\n          // a flag indicating whether the github default gist css should be included or not\n          // default: true\n          gistDefaultCssInclude: true || false,\n\n          // a flag indicating whether the github default gist css should be preloaded or not\n          // use this if you want to load the default css asynchronously.\n          // default: false\n          gistCssPreload: true || false,\n\n          // a string that represents the github default gist css url.\n          // defaults: \"https://github.githubassets.com/assets/gist-embed-b3b573358bfc66d89e1e95dbf8319c09.css\"\n          gistCssUrlAddress: \"\u003cstring\u003e\"\n        }\n      }\n    ]\n  }\n}\n```\n\n## Example\n\nTurns this...\n\n```md\n`gist:weirdpattern/ce54fdb1e5621b5966e146026995b974#syntax.text`\n```\n\nInto this...\n\n```html\n\u003cdiv id=\"gist90436059\" class=\"gist\"\u003e\n  \u003cdiv class=\"gist-file\"\u003e\n    \u003cdiv class=\"gist-data\"\u003e\n      \u003cdiv\n        class=\"js-gist-file-update-container js-task-list-container file-box\"\n      \u003e\n        \u003cdiv id=\"file-syntax-text\" class=\"file\"\u003e\n          \u003cdiv itemprop=\"text\" class=\"blob-wrapper data type-text\"\u003e\n            \u003ctable\n              class=\"highlight tab-size js-file-line-container\"\n              data-tab-size=\"8\"\n            \u003e\n              \u003ctbody\u003e\n                \u003ctr\u003e\n                  \u003ctd\n                    id=\"file-syntax-text-L1\"\n                    class=\"blob-num js-line-number\"\n                    data-line-number=\"1\"\n                  \u003e\u003c/td\u003e\n                  \u003ctd\n                    id=\"file-syntax-text-LC1\"\n                    class=\"blob-code blob-code-inner js-file-line\"\n                  \u003e\n                    \u0026lt;operation\u0026gt; [n]\u0026gt; /dev/null [options]\n                  \u003c/td\u003e\n                \u003c/tr\u003e\n              \u003c/tbody\u003e\n            \u003c/table\u003e\n          \u003c/div\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"gist-meta\"\u003e\n      \u003ca\n        href=\"https://gist.github.com/weirdpattern/ce54fdb1e5621b5966e146026995b974/raw/30a0ad953a8d79c8bcbdd76343d86a9e4bbda311/syntax.text\"\n        style=\"float:right\"\n        \u003eview raw\u003c/a\n      \u003e\n      \u003ca\n        href=\"https://gist.github.com/weirdpattern/ce54fdb1e5621b5966e146026995b974#file-syntax-text\"\n        \u003esyntax.text\u003c/a\n      \u003e\n      hosted with ❤ by \u003ca href=\"https://github.com\"\u003eGitHub\u003c/a\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Notes\n\nThe order of the plugins only matters when used in conjunction with\n`gatsby-remark-prismjs`, because this plugin transforms the inline code blocks,\nso add `gatsby-remark-embed-gist` somewhere above this plugin.\n\n## License\n\nMIT, by Patricio Trevino\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweirdpattern%2Fgatsby-remark-embed-gist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweirdpattern%2Fgatsby-remark-embed-gist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweirdpattern%2Fgatsby-remark-embed-gist/lists"}