{"id":15595293,"url":"https://github.com/michaelherold/bridgetown-webfinger","last_synced_at":"2025-09-30T06:30:49.614Z","repository":{"id":83861901,"uuid":"606309319","full_name":"michaelherold/bridgetown-webfinger","owner":"michaelherold","description":"A Bridgetown plugin that gives your site the ability to answer Webfinger requests","archived":false,"fork":false,"pushed_at":"2023-02-25T17:41:21.000Z","size":61,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-17T07:05:19.504Z","etag":null,"topics":["bridgetown-automation","bridgetown-plugin","ruby","webfinger"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/michaelherold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2023-02-25T05:10:29.000Z","updated_at":"2024-10-31T11:24:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3a9faaa-b77c-4bff-a2f6-dd441478cf30","html_url":"https://github.com/michaelherold/bridgetown-webfinger","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"2be4d44e6710dceb328bac4a57b6b8e5f826b067"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelherold%2Fbridgetown-webfinger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelherold%2Fbridgetown-webfinger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelherold%2Fbridgetown-webfinger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelherold%2Fbridgetown-webfinger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelherold","download_url":"https://codeload.github.com/michaelherold/bridgetown-webfinger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234679562,"owners_count":18870610,"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":["bridgetown-automation","bridgetown-plugin","ruby","webfinger"],"created_at":"2024-10-03T00:51:29.180Z","updated_at":"2025-09-30T06:30:49.234Z","avatar_url":"https://github.com/michaelherold.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bridgetown Webfinger plugin\n\nA [Bridgetown][1] plugin for handling [Webfinger][2] requests for the Fediverse and [IndieWeb][3].\n\nWhether you run a single-author, statically rendered site or a multi-author site with a dynamic backend, this is your one-stop shop for Webfinger support.\n\nThis plugin allows for hosting Webfinger lookups on your website for [`acct:` URIs][4]. This is the first step to giving your site the ability to post to Fediverse apps like [Mastodon][5], [Pleroma][6], or [PeerTube][7]. While not all Fediverse apps use Webfinger, enough do that adding Webfinger support will be necessary to have your site participate in the Fediverse.\n\n[1]: https://www.bridgetownrb.com\n[2]: https://webfinger.net/\n[3]: https://indieweb.org/\n[4]: https://datatracker.ietf.org/doc/html/rfc7565\n[5]: https://joinmastodon.org/\n[6]: https://pleroma.social/\n[7]: https://joinpeertube.org/\n\n## Installation\n\nRun this command to add this plugin to your site's Gemfile:\n\n    bundle add bridgetown-webfinger\n\nOr you can use [an automation script][8] instead for guided setup:\n\n    bin/bt apply https://github.com/michaelherold/bridgetown-webfinger\n\n[8]: https://www.bridgetownrb.com/docs/automations\n\n## Usage\n\nThis plugin runs in one of two modes: static mode or dynamic mode.\n\nStatic mode is for when you run a single-author, fully static website without using any of Bridgetown's Server-Side Rendering (SSR) capabilities. It is mildly non-compliant with the Webfinger specification, but is an accepted practice for static sites.\n\nDynamic mode uses a Roda plugin to serve author data for all accounts defined in your `src/_data/authors.yml` file.\n\n### Authors data file\n\nWithin your authors data file, each author requires a `webfinger` associative array with data about the account. For example, for the account `bilbo`, who has a Twitter account at `https://twitter.com/bilbobaggins` and hosts an avatar at `https://bagend.com/bilbo.png`, the authors data file entry might look like:\n\n```yaml\n# src/_data/authors.yml\n---\nbilbo:\n  webfinger:\n    aliases:\n      - https://twitter.com/bilbobaggins\n    links:\n      - href: https://bagend.com/bilbo.png\n        rel: http://webfinger.net/rel/avatar\n        type: image/png\n```\n\nYou may configure any number of authors in this way, however static mode works with only a single author.\n\n### Static mode\n\nTo use static mode, configure your [authors data file](#authors-data-file) and add the following to your `config/initializers.rb` file:\n\n```ruby\n# config/initializers.rb\nBridgetown.configure do\n  init \"bridgetown-webfinger\", static: true\nend\n```\n\nBridgetown will now generate a `.well-known/webfinger` file using your first author's information when building the site.\n\n#### Deploying to Netlify\n\nTo have the correct headers for your static file, add the following to your `netlify.toml`.\n\n```toml\n[[headers]]\nfor = \"/.well-known/webfinger\"\n\n[headers.values]\nAccess-Control-Allow-Origin = \"*\"\nContent-Type = \"application/jrd+json\"\n```\n\nSee [the allowed hosts section below](#allowed-hosts) for more information about the access control header.\n\n### Dynamic mode\n\nTo use dynamic mode, configure your [authors data file](#authors-data-file) and add the following to your `config/initializers.rb` file:\n\n```ruby\n# config/initializers.rb\nBridgetown.configure do\n  init \"bridgetown-webfinger\", static: false, allowed_hosts: \"*\"\nend\n```\n\nThen, add the `bridgetown_webfinger` plugin to your `RodaApp` and call the `bridgetown_webfinger` request method:\n\n```ruby\n# server/roda_app.rb\nclass RodaApp \u003c Bridgetown::Rack::Roda\n  plugin :bridgetown_ssr  # required\n  plugin :bridgetown_webfinger\n  \n  route do |r|\n    r.bridgetown_webfinger\n  end\nend\n```\n\nThis generates a `.well-known/webfinger` route that serves `acct:` URI requests for authors on your site.\n\n#### Allowed hosts\n\nThe [Webfinger specification][9] states that [servers must include the `Access-Control-Allow-Origin`][10] header to enable Cross-Origin Resource Sharing (CORS) requests and that they should use the least restrictive setting.\n\nUnless you are hosting private Webfinger information — e.g. within a corporate network, to only authenticated followers, or for any other reason — you should set this to `\"*\"` using the configuration above.\n\nIf this is private information that you wish to restrict [set the header value appropriately][11].\n\n[9]: https://datatracker.ietf.org/doc/html/rfc7033\n[10]: https://datatracker.ietf.org/doc/html/rfc7033#section-5\n[11]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin\n\n## Contributing\n\nSo you're interested in contributing to Bridgetown Webfinger? Check out our [contributing guidelines](CONTRIBUTING.md) for more information on how to do that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelherold%2Fbridgetown-webfinger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelherold%2Fbridgetown-webfinger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelherold%2Fbridgetown-webfinger/lists"}