{"id":19508029,"url":"https://github.com/krmax44/cocy","last_synced_at":"2025-04-26T02:33:44.391Z","repository":{"id":44967742,"uuid":"206649201","full_name":"krmax44/cocy","owner":"krmax44","description":"Transform your content into an API.","archived":false,"fork":false,"pushed_at":"2022-03-24T15:04:35.000Z","size":2190,"stargazers_count":9,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T17:35:40.808Z","etag":null,"topics":["api","content","jamstack","markdown"],"latest_commit_sha":null,"homepage":"https://cocy.js.org","language":"TypeScript","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/krmax44.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":"2019-09-05T20:12:05.000Z","updated_at":"2023-05-12T16:56:08.000Z","dependencies_parsed_at":"2022-08-30T13:40:30.786Z","dependency_job_id":null,"html_url":"https://github.com/krmax44/cocy","commit_stats":null,"previous_names":["krmax44/contently"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fcocy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fcocy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fcocy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fcocy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krmax44","download_url":"https://codeload.github.com/krmax44/cocy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250834193,"owners_count":21494926,"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":["api","content","jamstack","markdown"],"created_at":"2024-11-10T23:02:58.100Z","updated_at":"2025-04-26T02:33:44.104Z","avatar_url":"https://github.com/krmax44.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cocy\n\n[![CI status](https://img.shields.io/github/workflow/status/krmax44/cocy/build/main)](https://github.com/krmax44/cocy/actions)\n[![Code coverage](https://img.shields.io/codecov/c/github/krmax44/cocy?token=RcYyQnebV1)](https://codecov.io/gh/krmax44/cocy)\n[![npm version](https://img.shields.io/npm/v/cocy)](https://www.npmjs.com/package/cocy)\n\nCocy takes your static-file content and turns it into a consumable API for your [JAMstack](https://jamstack.org) site. The headless content management library, no matter what framework you're using.\n\n## Packages\n\nDocs are provided per package.\n\n| Name                                                  | Description                | Package                                                                                                                 |\n| ----------------------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| [cocy](./packages/cocy/README.md)                     | main docs                  | [![npm version](https://img.shields.io/npm/v/cocy)](https://www.npmjs.com/package/cocy)                                 |\n| [transform-md](./packages/transform-md/README.md)     | Transform Markdown to HTML | [![npm version](https://img.shields.io/npm/v/@cocy/transform-md)](https://www.npmjs.com/package/@cocy/transform-md)     |\n| [transform-yaml](./packages/transform-yaml/README.md) | Parse YAML files           | [![npm version](https://img.shields.io/npm/v/@cocy/transform-yaml)](https://www.npmjs.com/package/@cocy/transform-yaml) |\n| [render-json](./packages/render-json/README.md)       | Output static JSON files   | [![npm version](https://img.shields.io/npm/v/@cocy/render-json)](https://www.npmjs.com/package/@cocy/render-json)       |\n\n## Roadmap to v1\n\nSee the [Roadmap](https://github.com/krmax44/cocy/projects/1).\n\n## Example\n\n```\n📦 current working directory\n ┣ 📂 posts\n ┃ ┣ 📄 Hello-World.md\n ┃ ┣ 📄 Second-Post.md\n```\n\n```ts\nimport Cocy from 'cocy';\nimport md from '@cocy/transform-md';\n\nconst cocy = new Cocy().use(md); // setup Cocy with Markdown transformer\nawait cocy.process(); // search for files\n\nfor (const file of cocy.files.values()) {\n\tconsole.log(file.slug);\n}\n\n/*\n  output:\n  hello-world\n  second-post\n*/\n\nconst { data } = cocy.files.getByPath('posts', 'Hello-World.md');\nconsole.log(data.html);\n\n/*\n  output:\n  \u003cp\u003eHey!\u003c/p\u003e\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrmax44%2Fcocy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrmax44%2Fcocy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrmax44%2Fcocy/lists"}