{"id":20836311,"url":"https://github.com/igrigorik/hackernews-button","last_synced_at":"2025-04-06T19:13:36.180Z","repository":{"id":3013940,"uuid":"4033155","full_name":"igrigorik/hackernews-button","owner":"igrigorik","description":"Embeddable Hacker News button + vote counter for your site","archived":false,"fork":false,"pushed_at":"2019-01-10T04:05:59.000Z","size":175,"stargazers_count":414,"open_issues_count":1,"forks_count":25,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T18:08:46.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/igrigorik.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":"2012-04-15T16:18:24.000Z","updated_at":"2025-02-13T23:07:19.000Z","dependencies_parsed_at":"2022-08-26T03:01:46.056Z","dependency_job_id":null,"html_url":"https://github.com/igrigorik/hackernews-button","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/igrigorik%2Fhackernews-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fhackernews-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fhackernews-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fhackernews-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igrigorik","download_url":"https://codeload.github.com/igrigorik/hackernews-button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535520,"owners_count":20954576,"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-11-18T00:29:29.582Z","updated_at":"2025-04-06T19:13:36.163Z","avatar_url":"https://github.com/igrigorik.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embeddable Hacker News vote / counter button\n\n![HN Button](http://img.skitch.com/20120415-bp8igiq74w53f91swt6tcy9cx8.jpg)\n\nAsync, embeddable submit + vote counter button for Hacker News.\n\n- If the story has not been posted to HN, \"Submit\" button is shown, otherwise latest point count is displayed.\n- Auto-detects Google Analytics and registers clicks events (see reports under `Traffic Sources \u003e Social \u003e Social Plugins`).\n\n### Embedding the button\n\n**Step 1**, place the HN link where you want the button appear on the page:\n\n```html\n\u003c!-- Auto-detect URL of current page and title if necessary --\u003e\n\u003ca href=\"http://news.ycombinator.com/submit\" class=\"hn-share-button\"\u003eVote on HN\u003c/a\u003e\n\n\u003c!-- Override the URL and Title for the button --\u003e\n\u003ca href=\"http://news.ycombinator.com/submit\" class=\"hn-share-button\" data-title=\"Some Title\" data-url=\"http://www.igvita.com/\"\u003eVote on HN\u003c/a\u003e\n```\n\n**Step 2**, include the (async) javascript file:\n\n```html\n\u003cscript src=\"//hnbutton.appspot.com/static/hn.min.js\" async defer\u003e\u003c/script\u003e\n```\n\n_Note: you can safely embed multiple buttons on the same page._\n\n### Misc\n\n* Kudos to @sbashyal and @stbullard for the button styling (hnlike.com)\n* Kudos to Algolia for an [awesome HN API](http://hn.algolia.com/)\n* (MIT License) - Copyright (c) 2012 Ilya Grigorik\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrigorik%2Fhackernews-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figrigorik%2Fhackernews-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrigorik%2Fhackernews-button/lists"}