{"id":13398213,"url":"https://github.com/CouscousPHP/Couscous","last_synced_at":"2025-03-14T02:30:46.076Z","repository":{"id":13299029,"uuid":"15985153","full_name":"CouscousPHP/Couscous","owner":"CouscousPHP","description":"Couscous is good.","archived":false,"fork":false,"pushed_at":"2024-02-15T20:24:16.000Z","size":28588,"stargazers_count":840,"open_issues_count":48,"forks_count":107,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-05-18T20:06:25.283Z","etag":null,"topics":["documentation","markdown","static-site-generator"],"latest_commit_sha":null,"homepage":"https://couscous.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CouscousPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"mnapoli","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-01-17T00:06:26.000Z","updated_at":"2024-06-18T12:18:12.313Z","dependencies_parsed_at":"2024-06-18T12:18:06.169Z","dependency_job_id":"a2ce8138-ebe9-4e47-bf40-37cca4d51a8f","html_url":"https://github.com/CouscousPHP/Couscous","commit_stats":{"total_commits":455,"total_committers":48,"mean_commits":9.479166666666666,"dds":0.3516483516483516,"last_synced_commit":"1b0731fb254da88696e591578be18abce43e812e"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CouscousPHP%2FCouscous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CouscousPHP%2FCouscous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CouscousPHP%2FCouscous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CouscousPHP%2FCouscous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CouscousPHP","download_url":"https://codeload.github.com/CouscousPHP/Couscous/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243511577,"owners_count":20302576,"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":["documentation","markdown","static-site-generator"],"created_at":"2024-07-30T19:00:20.370Z","updated_at":"2025-03-14T02:30:45.696Z","avatar_url":"https://github.com/CouscousPHP.png","language":"PHP","funding_links":["https://github.com/sponsors/mnapoli"],"categories":["PHP","Table of Contents"],"sub_categories":["Static Site Generators"],"readme":"---\nlayout: home\n---\n\nCouscous generates a [GitHub pages](https://pages.github.com/) website from your markdown documentation.\n\n[![Build Status](https://travis-ci.org/CouscousPHP/Couscous.svg?branch=master)](https://travis-ci.org/CouscousPHP/Couscous)\n[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/CouscousPHP/Couscous.svg)](https://isitmaintained.com/project/CouscousPHP/Couscous \"Average time to resolve an issue\")\n[![Percentage of issues still open](https://isitmaintained.com/badge/open/CouscousPHP/Couscous.svg)](https://isitmaintained.com/project/CouscousPHP/Couscous \"Percentage of issues still open\")\n\n**Everything is documented on [couscous.io](https://couscous.io/).**\n\nWhat follows is the documentation for contributors.\n\n## How Couscous works?\n\nCouscous was designed to be as simple as possible. By embracing simplicity, it becomes extremely simple to extend.\n\n### Website generation\n\nThe website generation is composed of a list of **steps** to process the `Project` model object:\n\n```php\ninterface Step\n{\n    /**\n     * Process the given project.\n     *\n     * @param Project $project\n     */\n    public function __invoke(Project $project);\n}\n```\n\nSteps are very granular, thus extremely easy to write and test. For example:\n\n- `LoadConfig`: load the `couscous.yml` config file\n- `InstallDependencies`: install the dependencies (using yarn, npm or bower)\n- `LoadMarkdownFiles`: load the content of all the `*.md` files in memory\n- `RenderMarkdown`: render the markdown content\n- `WriteFiles`: write the in-memory processed files to the target directory\n- …\n\nFor example, here is a step that would preprocess Markdown files to put the word \"Couscous\" in bold:\n\n```php\nclass PutCouscousInBold implements \\Couscous\\Step\n{\n    public function __invoke(Project $project)\n    {\n        /** @var MarkdownFile[] $markdownFiles */\n        $markdownFiles = $project-\u003efindFilesByType('Couscous\\Model\\MarkdownFile');\n\n        foreach ($markdownFiles as $file) {\n            $file-\u003econtent = str_replace('Couscous', '**Couscous**', $file-\u003econtent);\n        }\n    }\n}\n```\n\nCouscous uses [PHP-DI](https://php-di.org/) for wiring everything together with dependency injection.\n\nThe full list of steps is configured in [`src/Application/config.php`](src/Application/config.php).\n\n### Website deployment\n\nCouscous deploys by cloning (in a temp directory) the current repository, checking out the `gh-pages` branch, generating the website inside it, committing and pushing.\n\nIn the future, Couscous will support several deployment strategies.\n\n## Contributing\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file.\n\n## License\n\nCouscous is released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCouscousPHP%2FCouscous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCouscousPHP%2FCouscous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCouscousPHP%2FCouscous/lists"}