{"id":23449515,"url":"https://github.com/danielmahon/gatsby-remark-widows","last_synced_at":"2025-04-13T18:51:37.443Z","repository":{"id":57244896,"uuid":"129554817","full_name":"danielmahon/gatsby-remark-widows","owner":"danielmahon","description":"Gatsby plugin for gatsby-transformer-remark to remove widows in text nodes.","archived":false,"fork":false,"pushed_at":"2018-04-14T21:26:20.000Z","size":20,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T12:49:29.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gatsby-remark-widows","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielmahon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-14T21:12:26.000Z","updated_at":"2021-05-18T02:25:51.000Z","dependencies_parsed_at":"2022-09-01T06:12:08.403Z","dependency_job_id":null,"html_url":"https://github.com/danielmahon/gatsby-remark-widows","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgatsby-remark-widows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgatsby-remark-widows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgatsby-remark-widows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgatsby-remark-widows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmahon","download_url":"https://codeload.github.com/danielmahon/gatsby-remark-widows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248765983,"owners_count":21158296,"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-12-23T23:19:23.290Z","updated_at":"2025-04-13T18:51:37.421Z","avatar_url":"https://github.com/danielmahon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-remark-widows\n\nAutomatically adds a non-breaking space between the last 2 words in a text node parsed by `gatsby-transformer-remark`. This ensures there isn't a \"widow\", or single word left at the end of a wrapped sentance/paragraph.\n\n---\n\n### Nulla et exercitation excepteur ullamco \u003cbr/\u003eeiusmod.\n\nLorem ipsum dolor sit Lorem irure aliquip magna labore qui\u003cbr/\u003evelit officia aliquip deserunt aliqua. Aute tempor fugiat nisi\u003cbr/\u003eadipisicing et aliquip sint minim cupidatat elit consequat\u003cbr/\u003eet.\n\n:arrow_down:\n\n### Nulla et exercitation excepteur\u003cbr/\u003eullamco eiusmod.\n\nLorem ipsum dolor sit Lorem irure aliquip magna labore qui\u003cbr/\u003evelit officia aliquip deserunt aliqua. Aute tempor fugiat nisi\u003cbr/\u003eadipisicing et aliquip sint minim cupidatat elit\u003cbr/\u003econsequat et.\n\n---\n\n## Install\n\n`npm install --save gatsby-remark-widows`\n\nCurrently uses `\\u00a0` to insert a space so you don't need to use `dangerouslySetInnerHTML`.  \nYour browser should™ render that as `\u0026nbsp;`\n\n\u003e **Warning:** This currently effects **every text node**. You can limit by word count via the options.\n\n## How to use\n\n```javascript\n// In your gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-transformer-remark`,\n    options: {\n      // Probably best to place after other plugins\n      plugins: [`gatsby-remark-widows`],\n    },\n  },\n];\n```\n\n### Options\n\nYou may set some options to configure which text nodes are processed by their word count. Defaults to `minLength: 4`\n\n```javascript\n// In your gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-transformer-remark`,\n    options: {\n      plugins: [\n        {\n          resolve: 'gatsby-remark-widows',\n          options: {\n            minLength: 4, // default\n            maxLength: null, // default\n          },\n        },\n      ],\n    },\n  },\n];\n```\n\n### Todo\n\n* [ ] Add more options\n* [ ] Add tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmahon%2Fgatsby-remark-widows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmahon%2Fgatsby-remark-widows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmahon%2Fgatsby-remark-widows/lists"}