CouscousPHP/Couscous
소개
Couscous는 좋습니다.
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originallayout: home
Couscous generates a GitHub pages website from your markdown documentation.
Everything is documented on couscous.io.
What follows is the documentation for contributors.
How Couscous works?
Couscous was designed to be as simple as possible. By embracing simplicity, it becomes extremely simple to extend.
Website generation
The website generation is composed of a list of steps to process the Project model object:
interface Step
{
/**
* Process the given project.
*
* @param Project $project
*/
public function __invoke(Project $project);
}
Steps are very granular, thus extremely easy to write and test. For example:
LoadConfig: load thecouscous.ymlconfig fileInstallDependencies: install the dependencies (using yarn, npm or bower)LoadMarkdownFiles: load the content of all the*.mdfiles in memoryRenderMarkdown: render the markdown contentWriteFiles: write the in-memory processed files to the target directory- …
For example, here is a step that would preprocess Markdown files to put the word "Couscous" in bold:
class PutCouscousInBold implements \Couscous\Step
{
public function __invoke(Project $project)
{
/** @var MarkdownFile[] $markdownFiles */
$markdownFiles = $project->findFilesByType('Couscous\Model\MarkdownFile');
foreach ($markdownFiles as $file) {
$file->content = str_replace('Couscous', '**Couscous**', $file->content);
}
}
}
Couscous uses PHP-DI for wiring everything together with dependency injection.
The full list of steps is configured in src/Application/config.php.
Website deployment
Couscous deploys by cloning (in a temp directory) the current repository, checking out the gh-pages branch, generating the website inside it, committing and pushing.
In the future, Couscous will support several deployment strategies.
Contributing
See the CONTRIBUTING file.
License
Couscous is released under the MIT License.
관련 프로젝트 살펴보기
불러오는 중…