{"id":15503595,"url":"https://github.com/pomber/gatsby-remark-import-code","last_synced_at":"2025-04-22T23:45:24.293Z","repository":{"id":57244872,"uuid":"197837178","full_name":"pomber/gatsby-remark-import-code","owner":"pomber","description":"Gatsby remark plugin to import code from a file into code blocks","archived":false,"fork":false,"pushed_at":"2020-08-21T12:40:51.000Z","size":5,"stargazers_count":23,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T01:18:35.546Z","etag":null,"topics":["code","gatsby","gatsby-plugin-mdx","import","markdown","mdx","remark","remark-plugin","remarkjs"],"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/pomber.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":"2019-07-19T20:23:57.000Z","updated_at":"2023-09-07T06:22:25.000Z","dependencies_parsed_at":"2022-09-01T04:31:10.658Z","dependency_job_id":null,"html_url":"https://github.com/pomber/gatsby-remark-import-code","commit_stats":null,"previous_names":["pomber/remark-import-code"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomber%2Fgatsby-remark-import-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomber%2Fgatsby-remark-import-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomber%2Fgatsby-remark-import-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomber%2Fgatsby-remark-import-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomber","download_url":"https://codeload.github.com/pomber/gatsby-remark-import-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249874565,"owners_count":21338348,"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":["code","gatsby","gatsby-plugin-mdx","import","markdown","mdx","remark","remark-plugin","remarkjs"],"created_at":"2024-10-02T09:14:06.906Z","updated_at":"2025-04-22T23:45:24.277Z","avatar_url":"https://github.com/pomber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-remark-import-code\n\n### Install\n\n```bash\n$ npm install gatsby-remark-import-code\n```\n\n### Use\n\nUse it together with [gatsby-plugin-mdx](https://www.gatsbyjs.org/packages/gatsby-plugin-mdx/). In `gatsby-config.js`:\n\n```js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-plugin-mdx`,\n      options: {\n        gatsbyRemarkPlugins: [`gatsby-remark-import-code`]\n      }\n    }\n  ]\n};\n```\n\nIt transforms md/mdx code blocks from this:\n\n````md\n```js file=./hello-world.js\n```\n````\n\ninto:\n\n````md\n```js\nfunction helloWorld() {\n  return \"hello world\";\n}\n```\n````\n\n### Related\n\n- [gatsby-remark-embed-snippet](https://www.gatsbyjs.org/packages/gatsby-remark-embed-snippet/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomber%2Fgatsby-remark-import-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomber%2Fgatsby-remark-import-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomber%2Fgatsby-remark-import-code/lists"}