Coder Social home page Coder Social logo

bearerpipelinetest / couscous Goto Github PK

View Code? Open in Web Editor NEW

This project forked from couscousphp/couscous

1.0 2.0 0.0 25.04 MB

Couscous is good.

Home Page: https://couscous.io

License: Other

PHP 70.94% HTML 1.04% CSS 0.79% JavaScript 1.34% Shell 0.39% Twig 18.16% Less 7.32%

couscous's Introduction

layout
home

Couscous generates a GitHub pages website from your markdown documentation.

Build Status Average time to resolve an issue Percentage of issues still open

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 the couscous.yml config file
  • InstallDependencies: install the dependencies (using yarn, npm or bower)
  • LoadMarkdownFiles: load the content of all the *.md files in memory
  • RenderMarkdown: render the markdown content
  • WriteFiles: 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.

couscous's People

Contributors

mnapoli avatar wysow avatar cyberbit avatar baptouuuu avatar lombartec avatar nyholm avatar leoruhland avatar bileljegham avatar henriquemoody avatar max-preno avatar jubianchi avatar eguvenc avatar sergiopvilar avatar lex111 avatar snipe avatar odan avatar pnowy avatar nklatt avatar bobmulder avatar alanpoulain avatar mmoreram avatar lbausch avatar purplebabar avatar alcalbg avatar webmaster777 avatar montealegreluis avatar kasperg avatar fonsecas72 avatar greg0ire avatar gmazzap avatar

Stargazers

Brie Russell avatar

Watchers

 avatar Brie Russell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.