{"id":13929280,"url":"https://github.com/pusher/docs","last_synced_at":"2026-04-02T01:20:55.721Z","repository":{"id":37826370,"uuid":"304306281","full_name":"pusher/docs","owner":"pusher","description":"The all new Pusher docs, powered by @11ty and @vercel","archived":false,"fork":false,"pushed_at":"2025-06-12T11:35:22.000Z","size":11916,"stargazers_count":8,"open_issues_count":52,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-12T03:51:22.204Z","etag":null,"topics":["11ty","docs"],"latest_commit_sha":null,"homepage":"https://pusher.com/docs","language":"CSS","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/pusher.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-15T11:36:28.000Z","updated_at":"2025-06-12T11:35:19.000Z","dependencies_parsed_at":"2024-11-26T18:42:50.208Z","dependency_job_id":null,"html_url":"https://github.com/pusher/docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"jonheslop/static-quickstart","purl":"pkg:github/pusher/docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pusher","download_url":"https://codeload.github.com/pusher/docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fdocs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["11ty","docs"],"created_at":"2024-08-07T18:02:13.922Z","updated_at":"2026-04-02T01:20:55.699Z","avatar_url":"https://github.com/pusher.png","language":"CSS","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"---\ndate: 2021-08-01\ntitle: Readme\nlayout: readme.njk\npermalink: docs/README/\n---\n\n# Pusher docs readme\n\nAn [Eleventy] powered static site using our custom [Tachyons] build with [Postcss] for styling.\n\nIt’s deployed and hosted by [Vercel] when the `main` branch changes using their [Github integration] - https://pusher-docs.vercel.app\n\n## Running locally\n\n1. Checkout the [repo](https://github.com:pusher/docs)\n\n```bash\ngit checkout git@github.com:pusher/docs.git\n```\n\n2. Install the dependencies via [yarn]\n\n```bash\nyarn install\n```\n\n3. Run [Eleventy] in development mode\n\n```bash\nyarn run dev\n```\n\n[Eleventy] watches for any changes and recompiles automatically, it uses [BrowserSync] behind the scenes to refresh the browser.\n\n### Compiling the CSS\n\nIf you’ve just checked out the repo, you’ll need to generate the css. You can also leave this running if you intend to change the CSS as you go, it will recompile and 11ty will pick up the changes and reload.\n\n```bash\nyarn run css\n```\n\n### Search\n\nSearch is powered by Algolia, on every production build a refreshed index of all content is sent to them.\n\nFor users without JS there is a fallback page which is powered by Vercel’s serverless functions.\n\nIf you need to debug this you can run the project with `vercel dev` and it will hot reload any changes.\n\n## How to add / update new pages\n\n1. Add a new [Markdown] file in the relevant directory or edit an existing one.\n2. Add YAML front matter to the top. This should include an approved title and description and the creation date. If making a change be sure to update the date.\n   For example:\n\n```yml\n---\ndate: 2021-08-23\ntitle: Connection — Channels — Pusher Docs\nlayout: channels.njk\ndescription: Optionally set this to override generated one\neleventyNavigation:\n  parent: Using Channels\n  key: Connection\n---\n```\n\n3. Write up your docs, you can use [Markdown], HTML or [Nunjucks]. Although it’s best to keep it simple and stick to [Markdown] where possible.\n\nIt’s worth having a quick read of this [CSS Tricks post about words to avoid](https://css-tricks.com/words-avoid-educational-writing/)\n\n## Advanced formatting\n\n### Code blocks\n\nAdd the language name just after the triple backticks to get syntax highlighting. We use [Prism], the full list of [supported languages is here](https://prismjs.com/#supported-languages).\n\n### Tabbed snippets\n\nSometimes it’s useful to provide multiple snippets of the same example code in multiple languages. For this we need to sprinkle a little [Nunjucks] to get things to work. We have a `snippets` [shortcode](https://github.com/pusher/docs/blob/72f74955f1c28f2149242ef60c5b9ebf660ab4b2/.eleventy.js#L83-L110) for this.\n\nTo use it open a `snippets` block and pass an array of languages that matches the markdown code blocks within. Empty lines must be between the `nunjucks` and markdown code blocks.\n\n{% raw %}\n\n````jinja2\n{% snippets ['js', 'rb'] %}\n\n```js\nconst func = (x) =\u003e x^2;\n```\n\n```rb\ndef func(x)\n  x^2\nend\n```\n\n{% endsnippets %}\n````\n\n{% endraw %}\n\nWhich will render like this\n\n{% snippets ['js', 'rb'] %}\n\n```js\nconst func = (x) =\u003e x ^ 2;\n```\n\n```rb\ndef func(x)\n  x^2\nend\n```\n\n{% endsnippets %}\n\n#### Conditionally showing content when the snippet language is changed\n\nYou can change other content when the snippet changed to do this you must add a boolean to the snippet declaration and wrap in container\n\n{% raw %}\n\n````jinja2\n{% snippets ['js', 'swift', 'laravelecho'], true %}\n\n```js\npusher.unsubscribe(channelName);\n```\n\n```swift\n[self.pusher unsubscribeFromChannel:channel];\n```\n\n```js\nEcho.leaveChannel(channelName);\n```\n\n{% endsnippets %}\n\n#### Parameters\n\n{% parameter 'channelName', 'string', true, 'js,laravelecho' %}\n\nThe name of the channel to unsubscribe from.\n\n{% endparameter %}\n\n{% parameter 'channel', 'PTPusherChannel', true, 'swift', false %}\n\nThe name of the channel to unsubscribe from.\n\n{% endparameter %}\n{% endmethodwrap %}\n````\n\n{% endraw %}\n\n### Parameter shortcode syntax\n\n#### Parameters\n\n{% parameter 'name', 'String', true %}\n\nThe name of the parameter\n\n{% endparameter %}\n\n{% parameter 'type', 'String', false %}\n\nCan be either:\n\n- A string detailing the type like `object` or `string`\n- or `null` if you don’t want a type at all (Default)\n\n{% endparameter %}\n\n{% parameter 'required', 'Boolean or null', false %}\n\nCan be either:\n\n- `true` - will show 'required' styled appropriately\n- `false` - will show 'optional' styled appropriately\n- `null` - won’t show anything (Default)\n\n{% endparameter %}\n\n{% parameter 'language', 'String', false %}\n\nThis is for when you want to show it conditionally, should match the tabbed snippet label, e.g. `js`.\nDefaults to `null`.\n\n{% endparameter %}\n\n{% parameter 'show', 'Boolean', false %}\n\nThis is for when you want to show it conditionally, and controls whether it should be visible by default.\nDefaults to `true`.\n\n{% endparameter %}\n\n#### Example\n\n{% raw %}\n\n```jinja2\n\n{% parameter 'channel', 'PTPusherChannel', true, 'swift', false %}\n\nThe name of the channel to unsubscribe from.\n\n{% endparameter %}\n\n```\n\n{% endraw %}\n\n## Contribute\n\nContributions welcome!\n\n[eleventy]: https://www.11ty.io\n[tachyons]: http://tachyons.io/\n[postcss]: https://postcss.org\n[vercel]: https://vercel.co/\n[github integration]: https://vercel.com/docs/git-integrations\n[markdown]: https://www.markdownguide.org/\n[yarn]: https://yarnpkg.com/\n[browsersync]: https://www.browsersync.io/\n[prism]: https://prismjs.com/\n[nunjucks]: https://mozilla.github.io/nunjucks/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpusher%2Fdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fdocs/lists"}