dontdrinkandroot / gitki-bundle
Symfony Bundle that allows you to easily integrate a git based wiki into your project
Installs: 547
Dependents: 1
Suggesters: 0
Security: 0
Stars: 9
Watchers: 5
Forks: 2
Open Issues: 18
Type:symfony-bundle
pkg:composer/dontdrinkandroot/gitki-bundle
Requires
- php: >=7.1
- cpliakas/git-wrapper: ^1.2
- dontdrinkandroot/utils: 0.4.*,>=0.4.3
- league/commonmark: ^0.17
- symfony/asset: ^3.3
- symfony/finder: ^3.3
- symfony/form: ^3.3
- symfony/framework-bundle: ^3.3
- symfony/templating: ^3.3
- symfony/translation: ^3.3
- symfony/twig-bridge: ^3.3
- symfony/twig-bundle: ^3.3
- symfony/validator: ^3.3
- webuni/commonmark-table-extension: ^0.8
Requires (Dev)
- elasticsearch/elasticsearch: ^5.0
- liip/functional-test-bundle: ^1.7
- phpunit/phpunit: ^5.0
- scrutinizer/ocular: ^1.1
- symfony/console: ^3.3
- symfony/css-selector: ^3.3
- symfony/dom-crawler: ^3.3
- symfony/security-bundle: ^3.3
Suggests
- braincrafted/bootstrap-bundle: Style forms in a bootstrap compatible style
- elasticsearch/elasticsearch: Include this if you want the wiki to be searchable
This package is auto-updated.
Last update: 2025-10-31 00:23:33 UTC
README
About
Symfony Bundle that allows you to easily integrate a git based wiki into you project.
This project is currently in alpha state. It is working but changes happen frequently.
Features
- Git based
- Fully integrated markdown support (commonmark)
- Optional elasticsearch integration
- Minimal configuration
- Easy to extend
- Easy to integrate
Installation
Install via composer:
composer require dontdrinkandroot/gitki-bundle
Enable the bundle by adding the following line in the app/AppKernel.php file of your project:
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Dontdrinkandroot\GitkiBundle\DdrGitkiBundle(), ); // ... } }
To use this bundle in your project the User class handed to the bundle  must implement the
Dontdrinkandroot\GitkiBundle\Model\GitUserInterface. Fortunately this is compatible with the FOSUserBundle.
Configuration
Configure the bundle in the app/config/config.yml. At least the repository path is required which must point to a
git repository which is initialized and readable/writeable by the webserver.
# Default configuration for extension with alias: "ddr_gitki"
ddr_gitki:
    # The path to the git repository containing the wiki files. Must end with slash.
    repository_path:      ~ # Required
    # When enabled breadcrumbs are shown for easy navigation
    show_breadcrumbs:     true
    # When enabled the files and folders of the containing directory are shown while viewing a file
    show_directory_contents: true
    # Markdown specific configuration
    markdown:
        # When disabled all html content is escaped
        allow_html:           false
        toc:
            # Show the table of contents
            enabled:              true
            # Max depth of the table of contents
            max_level:            3
    # Configure elasticsearch integration
    elasticsearch:
        index_name:           ~ # Required
        host:                 localhost
        port:                 9200
    # Maps user roles to internal roles
    roles:
        # Is allowed to view content
        watcher:              IS_AUTHENTICATED_ANONYMOUSLY
        # Is allowed to edit content
        committer:            ROLE_USER
        admin:                ROLE_ADMIN
    # The file names that are used as a directory index. Searched in the order defined.
    index_files:
        # Defaults:
        - index.md
        - README.md
        - index.txt
        - README.txt
Add the routing to the app/config/routing.yml:
ddr_gitki_base:
resource: "@DdrGitkiBundle/Resources/config/routing.yml"
prefix: /wiki
Development
Run elasticsearch in docker locally:
docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.16.3