{"id":15506749,"url":"https://github.com/manovotny/remark-excerpt","last_synced_at":"2025-04-23T01:58:40.792Z","repository":{"id":41458009,"uuid":"170626272","full_name":"manovotny/remark-excerpt","owner":"manovotny","description":"Remark transformer for extracting an excerpt.","archived":false,"fork":false,"pushed_at":"2023-10-23T19:46:37.000Z","size":1041,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T01:58:32.085Z","etag":null,"topics":["excerpt","markdown","preview","remark","remark-plugin","teaser"],"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/manovotny.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","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},"funding":{"github":"manovotny"}},"created_at":"2019-02-14T04:19:49.000Z","updated_at":"2024-02-02T10:26:37.000Z","dependencies_parsed_at":"2024-12-10T15:38:22.504Z","dependency_job_id":null,"html_url":"https://github.com/manovotny/remark-excerpt","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"4e683ed113e0710724eb03c9103d8a3942e200fb"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manovotny%2Fremark-excerpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manovotny%2Fremark-excerpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manovotny%2Fremark-excerpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manovotny%2Fremark-excerpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manovotny","download_url":"https://codeload.github.com/manovotny/remark-excerpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354301,"owners_count":21416751,"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":["excerpt","markdown","preview","remark","remark-plugin","teaser"],"created_at":"2024-10-02T09:28:57.164Z","updated_at":"2025-04-23T01:58:40.774Z","avatar_url":"https://github.com/manovotny.png","language":"JavaScript","funding_links":["https://github.com/sponsors/manovotny"],"categories":[],"sub_categories":[],"readme":"# remark-excerpt\n\n\u003e [Remark](https://remark.js.org/) transformer for extracting an excerpt.\n\nThis is a [remark](https://remark.js.org/) plugin for transformer for extracting an excerpt, similar to [WordPress's excerpt functionality](https://kinsta.com/knowledgebase/wordpress-excerpt/).\n\n## Installation\n\n### NPM\n\n```\n$ npm i remark-excerpt\n```\n\n### Yarn\n\n```\n$ yarn add remark-excerpt\n```\n\n## Usage\n\nSay we have the following file, `example.md`:\n\n```\n# Title\n\nParagraph 1.\n\nParagraph 2.\n\n\u003c!-- excerpt --\u003e\n\nParagraph 3.\n\nParagraph 4.\n```\n\nAnd our script, `example.js`, looks as follows:\n\n```js\nconst remark = require('remark');\nconst excerpt = require('remark-excerpt');\nconst vfile = require('to-vfile');\n\n(async () =\u003e {\n    const file = await vfile.read('example.md');\n    const result = await remark().use(excerpt).process(file);\n\n    console.log(result.toString());\n})();\n```\n\nNow, running `node example` yields:\n\n```\n# Title\n\nParagraph 1.\n\nParagraph 2.\n```\n\nYou can try this yourself by downloading or cloning the project, installing dependencies, and running `yarn example`.\n\n## API\n\n### `remark().use(excerpt[, options])`\n\nReturns markdown content specified before the excerpt comment.\n\n#### Options\n\n##### `identifier`\n\nType: `String`\nDefault: `excerpt`, `more`, `preview`, or `teaser`\n\nSpecifies the excerpt comment identifier to look for.\n\n## License\n\nMIT © [Michael Novotny](https://manovotny.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanovotny%2Fremark-excerpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanovotny%2Fremark-excerpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanovotny%2Fremark-excerpt/lists"}