{"id":13650535,"url":"https://github.com/splitbrain/mastodon-widget","last_synced_at":"2025-04-12T02:23:34.499Z","repository":{"id":203324141,"uuid":"708899657","full_name":"splitbrain/mastodon-widget","owner":"splitbrain","description":"Mastodon Web Components","archived":false,"fork":false,"pushed_at":"2023-11-15T19:11:03.000Z","size":236,"stargazers_count":7,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T02:23:16.025Z","etag":null,"topics":["mastodon","webcomponents","widget"],"latest_commit_sha":null,"homepage":"https://splitbrain.github.io/mastodon-widget/","language":"TypeScript","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/splitbrain.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-23T15:55:16.000Z","updated_at":"2024-07-15T11:26:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"2540921e-cc78-4c74-9aef-f751bdbadc7f","html_url":"https://github.com/splitbrain/mastodon-widget","commit_stats":null,"previous_names":["splitbrain/mastodon-widget"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fmastodon-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fmastodon-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fmastodon-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fmastodon-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitbrain","download_url":"https://codeload.github.com/splitbrain/mastodon-widget/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506139,"owners_count":21115388,"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":["mastodon","webcomponents","widget"],"created_at":"2024-08-02T02:00:37.631Z","updated_at":"2025-04-12T02:23:34.472Z","avatar_url":"https://github.com/splitbrain.png","language":"TypeScript","readme":"# Mastodon Widgets\n\nThis is a collection of Mastodon widgets for use on websites to add share and follow buttons and to display a user's profile and timeline.\n\n🌟 If you like it, please star the repo and share it on Mastodon.\n\n## Usage\n\nHere's the basic usage: Add the `script` tag to your `\u003chead\u003e` and then use any of the available components in your HTML.\n\n```html\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cscript type=\"module\" src=\"https://unpkg.com/mastodon-widget\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmastodon-widget account=\"splitbrain@octodon.social\" limit=\"5\"\u003e\u003c/mastodon-widget\u003e\n\n    \u003cmastodon-share text=\"What a cool idea!\"\u003e\u003cbutton\u003eShare this!\u003c/button\u003e\u003c/mastodon-share\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe script will lazy load only the components you actually use.\n\n## Components\n\nYou can see a demo of the available components at https://splitbrain.github.io/mastodon-widget/ and read more about them in their respective readme files:\n\n- [mastodon-widget](src/components/mastodon-widget/readme.md) The main widget showing a profile with a follow button and optionally timeline\n- [mastodon-follow](src/components/mastodon-follow/readme.md) Make any HTML a follow button\n- [mastodon-share](src/components/mastodon-share/readme.md) Make any HTML a share button\n- [mastodon-timeline](src/components/mastodon-timeline/readme.md) Show the timeline of a user\n- [mastodon-instancepicker](src/components/mastodon-instancepicker/readme.md) The instance picker dialog used in the components above\n\n## Development\n\nThe widgets are web components built with the [StencilJS](https://stenciljs.com/) compiler.\n\nSetup dependencies:\n\n```bash\nnpm install\n```\n\nStart a development server:\n\n```bash\nnpm run start\n```\n\nBuild the components and update the readme files for production:\n\n```bash\nnpm run build\n```\n\nPrettify the code:\n\n```bash\nnpm run pretty\n```\n\n## NPM Package\n\nThe project is published to npm as `mastodon-widget`. See the [npm page](https://www.npmjs.com/package/mastodon-widget) for more info.\n\nFor building a new release, run:\n\n```bash\nnpm version patch\ngit push\ngit push --tags\n```\n\nReplace `patch` with `minor` or `major` as needed. This will update the pakage version, create a git tag and push it to the repo. There a github action will build the package and publish it to npm.\n\n## Help\n\nPlease help with the open issues.\n\nThis is my first project using stenciljs and typescript, so I'm sure there is a lot of room for improvement. Pull requests are welcome.\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Fmastodon-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitbrain%2Fmastodon-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Fmastodon-widget/lists"}