{"id":26422576,"url":"https://github.com/stackhtml/html-inject-github-corner","last_synced_at":"2025-03-18T02:25:58.981Z","repository":{"id":57267434,"uuid":"71724776","full_name":"stackhtml/html-inject-github-corner","owner":"stackhtml","description":"Add a github corner to a stream of html","archived":false,"fork":false,"pushed_at":"2017-11-14T19:45:53.000Z","size":49,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T13:15:47.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackhtml.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":"2016-10-23T19:29:44.000Z","updated_at":"2019-08-30T05:48:37.000Z","dependencies_parsed_at":"2022-08-26T12:33:11.789Z","dependency_job_id":null,"html_url":"https://github.com/stackhtml/html-inject-github-corner","commit_stats":null,"previous_names":["rreusser/github-cornerify"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fhtml-inject-github-corner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fhtml-inject-github-corner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fhtml-inject-github-corner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhtml%2Fhtml-inject-github-corner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhtml","download_url":"https://codeload.github.com/stackhtml/html-inject-github-corner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244042139,"owners_count":20388357,"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":"2025-03-18T02:25:58.402Z","updated_at":"2025-03-18T02:25:58.976Z","avatar_url":"https://github.com/stackhtml.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-inject-github-corner\n\n\u003e Add a Github corner to a stream of html\n\n[![Build Status][travis-image]][travis-url]\n[![npm version][npm-image]][npm-url]\n[![Dependency Status][david-dm-image]][david-dm-url]\n[![Standard Style][standard-badge]][standard-url]\n[![unstable][stability-unstable]][stability-url]\n\n### Introduction\n\nTim Holman's [Github Corners](https://github.com/tholman/github-corners/) are great! This is a quick way to avoid having to copy/paste them by hand. 😀\n\n### Installation\n\n```bash\n$ npm install html-inject-github-corner\n```\n\n### Example\n\nThis tool works great with [indexhtmlify](https://github.com/dominictarr/indexhtmlify) and [html-inject-meta](https://github.com/rreusser/html-inject-meta). For example:\n\n```bash\n$ browserify index.js | indexhtmlify | html-inject-meta | html-inject-github-corner \u003e index.html\n``` \n### Usage\n\nThis tools takes a stream of html and transforms it to include a github corner. It looks first to direct options, then to the `repository` field of the nearest `package.json`, and finally will accept any of these options from a `github-corner` field in `package.json`.\n\n```\nOptions:\n     --help  Display this message and exit\n       --bg  Background color\n       --fg  Foreground color\n  --z-index  CSS z-index of corner (default: 10000)\n --position  CSS position of corner (default: 'absolute')\n    --class  CSS class for element (default: 'github-corner')\n      --url  Repository url (by default, looks at repository url of nearest package.json\n     --side  Either \"left\" or \"right\"\n\n  $ browserify index.js | indexhtmlify | html-inject-meta | html-inject-github-corner \u003e index.html\n```\n\n### API\n\nThis can also be used as a through stream:\n\n#### `require('html-inject-github-corner')([opts])`\n\nThis creates a through stream that transforms html to include a github corner. The options are exactly the same as for the command line version:\n\n- `bg`: A valid CSS color for the triangular background\n- `fg`: A valid CSS color for the octocat foreground\n- `zIndex`: The z-index of the corner. Default is `10000`.\n- `position`: The CSS position of the corner. Default is `'absolute'`.\n- `repository`: A url to use in the link. Follows the format of the `package.json` `repository` field. If not provided, the nearest `package.json` will be located and analyzed. Within reason, will transformed to a web url.\n- `side`: `'left' | 'right'`. Default side for the link is the right side.\n- `class`: An optional CSS class for the element. Default is `.github-corner`.\n\n**Returns**: A through stream that appends CSS into the head tag and prepends the github corner to the HTML.\n\n### See Also\n\n- [github-corners](https://github.com/tholman/github-corners/)\n- [indexhtmlify](https://github.com/dominictarr/indexhtmlify)\n- [html-inject-meta](https://github.com/rreusser/html-inject-meta)\n\n### License\n\n\u0026copy; 2016 Ricky Reusser. MIT License. Original assets are adapted from [tholman/github-corners](https://github.com/tholman/github-corners). See [LICENSE](https://github.com/stackhtml/html-inject-github-corner/blob/master/LICENSE) for more details.\n\n\n\u003c!-- BADGES --\u003e\n\n[travis-image]: https://travis-ci.org/stackhtml/html-inject-github-corner.svg?branch=master\n[travis-url]: https://travis-ci.org/stackhtml/html-inject-github-corner\n\n[npm-image]: https://badge.fury.io/js/html-inject-github-corner.svg\n[npm-url]: https://npmjs.org/package/html-inject-github-corner\n\n[david-dm-image]: https://david-dm.org/stackhtml/html-inject-github-corner.svg?theme=shields.io\n[david-dm-url]: https://david-dm.org/stackhtml/html-inject-github-corner\n\n[standard-badge]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: https://github.com/feross/standard\n\n\u003c!-- see stability badges at: https://github.com/badges/stability-badges --\u003e\n[stability-url]: https://github.com/badges/stability-badges\n[stability-deprecated]: http://badges.github.io/stability-badges/dist/deprecated.svg\n[stability-experimental]: http://badges.github.io/stability-badges/dist/experimental.svg\n[stability-unstable]: http://badges.github.io/stability-badges/dist/unstable.svg\n[stability-stable]: http://badges.github.io/stability-badges/dist/stable.svg\n[stability-frozen]: http://badges.github.io/stability-badges/dist/frozen.svg\n[stability-locked]: http://badges.github.io/stability-badges/dist/locked.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhtml%2Fhtml-inject-github-corner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhtml%2Fhtml-inject-github-corner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhtml%2Fhtml-inject-github-corner/lists"}