{"id":21531935,"url":"https://github.com/matrixai/polykey-docs","last_synced_at":"2025-07-16T23:36:24.989Z","repository":{"id":49833879,"uuid":"518297198","full_name":"MatrixAI/Polykey-Docs","owner":"MatrixAI","description":"Documentation for Polykey","archived":false,"fork":false,"pushed_at":"2025-05-29T06:01:57.000Z","size":9897,"stargazers_count":1,"open_issues_count":21,"forks_count":5,"subscribers_count":5,"default_branch":"staging","last_synced_at":"2025-05-29T06:40:27.622Z","etag":null,"topics":["key-management","polykey","public-key-cryptography","secrets-management"],"latest_commit_sha":null,"homepage":"https://polykey.com/docs/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatrixAI.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-27T03:35:15.000Z","updated_at":"2025-05-29T05:55:24.000Z","dependencies_parsed_at":"2024-03-14T20:50:02.667Z","dependency_job_id":"f6760983-b9ab-4947-ae36-7b650d07b2d1","html_url":"https://github.com/MatrixAI/Polykey-Docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MatrixAI/Polykey-Docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2FPolykey-Docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2FPolykey-Docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2FPolykey-Docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2FPolykey-Docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixAI","download_url":"https://codeload.github.com/MatrixAI/Polykey-Docs/tar.gz/refs/heads/staging","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2FPolykey-Docs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265550454,"owners_count":23786571,"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":["key-management","polykey","public-key-cryptography","secrets-management"],"created_at":"2024-11-24T02:18:13.035Z","updated_at":"2025-07-16T23:36:24.956Z","avatar_url":"https://github.com/MatrixAI.png","language":"TypeScript","readme":"# Polykey-Docs\n\nDocumentation for Polykey.\n\n## Development\n\nRun `nix develop`, and once you're inside, you can use:\n\n```sh\n# run local docusaurus server (for quick edits)\nnpm run start\n# build the the static site\nnpm run build\nnpm run build -- --dev # for development build\n# run local cloudflare server (to test backend too)\nnpm run dev\n# deploy to cloudflare\nnpm run deploy\n# lint the source code\nnpm run lint\n# automatically fix the source\nnpm run lintfix\n```\n\nWe use Git LFS to store all media in `images/**` and `files/**`. It's important\nto ensure that `git-lfs` is installed on your system before you contribute\nanything (on NixOS, it is installed as a separate package to `git`). By default\nanything put under `images/**` or `files/**` when using `git add` (after LFS is\nsetup) will be uploaded to LFS, and thus the repository will only have links.\nBecause LFS is enabled, it is used on GitHub.\n\nIf this is the first time you cloned the repository, you must use\n`git lfs install` to ensure your local repository has LFS setup. It may be\nautomatically setup if you already had it installed prior to cloning.\n\nPro-tip, if we need to make sure files that were accidentally not put into LFS\nmust be put into LFS, the command to use is:\n\n```sh\ngit lfs migrate import --include=\"/static/images/**\" --everything\ngit lfs migrate import --include=\"/static/files/**\" --everything\ngit lfs migrate import --include=\"/static/fonts/**\" --everything\n```\n\nSometimes when you change branches, certain LFS references may not yet be\nresolved, in those cases you should just use (such as doing a\n`git lfs migrate import`):\n\n```sh\ngit lfs pull\n```\n\n## Contributing\n\nBecause we use docusaurus, we can choose to write in markdown, TSX or MDX.\n\n### HTML Syntax\n\nSometimes markdown syntax just doesn't cut it, and HTML syntax needs to be used.\n\nWhile `docusaurus` is flexible, GitHub is not.\n\nGitHub will process the markdown and then sanitizes the HTML:\nhttps://github.com/github/markup#github-markup.\n\nThere is a limited set of HTML tags are here:\nhttps://github.com/gjtorikian/html-pipeline/blob/03ae30d713199c2562951d627b98b75dc16939e4/lib/html/pipeline/sanitization_filter.rb#L40-L49\n\nFurthermore not all attributes are kept. The `style` attribute for example is\nfiltered out.\n\nThe most common styling attributes to be used will most likely be `align`,\n`width`, and `height`. See:\nhttps://davidwells.io/snippets/how-to-align-images-in-markdown\n\n### Linking Assets (files, images)\n\nMarkdown supports markdown-syntax and HTML tags for referencing assets:\n\n```md\n![](/images/foobar.png)\n\n[Download This](/files/x.docx)\n\n\u003cimg src=\"/images/foobar.png\" /\u003e\n\n\u003ca href=\"/files/x.docx\" /\u003e\n```\n\nIn order to maintain portability, we always use absolute paths. This works on\nGitHub markdown rendering and also for `docusaurus`.\n\nThe markdown syntax will render properly for markdown previews. However the HTML\nreferences may not work when compiled by docusaurus.\n\nThis is because, it relies on the static asset reference that is not subject to\nwebpack asset processing pipeline. The pipeline ensures that caching,\ncache-busting, base URL all works.\n\nAvoid using the raw HTML tags with paths like the above, instead use:\n\n```mdx\n\u003cimg src={require('@site/images/foobar.png').default} /\u003e\n\n\u003ca href={require('@site/files/x.docx').default} /\u003e\n```\n\nThis applies to all HTML tags like `\u003cimg\u003e`, `\u003ca\u003e`, `\u003cvideo\u003e`, `\u003caudio\u003e`, and\n`\u003cpicture\u003e`.\n\nMake sure to use the `@site` alias to get an absolute path load.\n\nIf for some reason, you must avoid webpack asset pipeline, then make sure to use\n`useBaseUrl`, otherwise the compiled link may be incorrect:\n\n```mdx\nimport useBaseUrl from '@docusaurus/useBaseUrl';\n\n\u003cimg src={useBaseUrl('/images/foobar.png')} /\u003e;\n```\n\nThe only downside here is that these assets won't render on markdown previews\nbecause they require JS interpretation. Therefore prefer to use the markdown\nsyntax when possible.\n\n```md\n\u003cdiv align=\"center\"\u003e\n\n![](/images/foobar.png)\n\n\u003c/div\u003e\n```\n\nTake note of the whitespace newlines between, if no newlines are used, GitHub\nwill interpret this as all HTML. Also note that `\u003cp\u003e\u003c/p\u003e` will not work.\n\nNote that this won't work for resizing the images unfortunately. You have to\napply the `width` attribute directly to the `\u003cimg /\u003e` tag. See:\nhttps://github.com/facebook/docusaurus/discussions/6465 for more information.\n\nNote that Docusaurus will automatically copy all of the contents under `static`\nto the `public` directory.\n\n### Optimisation\n\nPrefer using `webp` format for all static and animated images.\n\nUse these commands to convert to `webp`:\n\n```sh\n# This resizes to a maximum of 800px wide and sets the quality to 85\n# This is useful for maintaining a consistent set of documentary images\ngm convert -resize '800x\u003e' -quality 85 ./x.jpg ./x.webp\n```\n\nThis is important not only for Docusaurus but for reducing the size of images\nbeing stored in the repository. Even with LFS, it's ideal to minimize the size\nof images.\n\n### Linking\n\nIn the navigation in Docusaurus, there are several properties that controls how\nthe routing works. Because `matrix.ai` is composed of separate cloudflare\nworkers stitched together into a single domain, we have to hack around client\nside routing even for what looks like relative links.\n\n```js\n{\n  to: 'pathname:///docs/',\n  target: '_self'\n}\n```\n\nThe `to` ensures it shows up as a relative link.\n\nThe `pathname://` bypasses the client side routing forcing server side routing.\n\nThe `target: '_self'` ensures that the same frame is used instead of creating a\nnew frame.\n\n## Deployment\n\nThen you can build `npm run build`.\n\nFinally run `npm run deploy`.\n\nThis will deploy the development workers first.\n\nIf you want to deploy production workers, you have to\n`npm run deploy -- --env master`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fpolykey-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixai%2Fpolykey-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fpolykey-docs/lists"}