Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 2.16 KB

File metadata and controls

76 lines (53 loc) · 2.16 KB

Installation — WikiBundle

Requirements

  • FormKitBundle (nowo-tech/form-kit-bundle ^2.0) — dashboard/admin Symfony forms (FormOptionsTrait, profile wiki). Register NowoFormKitBundle in config/bundles.php (Flex / demo). Optional host YAML: config/packages/nowo_form_kit.yaml.

  • PHP 8.2+

  • Symfony 7.4, 8.0, or 8.1

  • Doctrine ORM

  • nowo-tech/tiptap-editor-bundle

Composer

composer require nowo-tech/wiki-bundle nowo-tech/tiptap-editor-bundle

The Flex recipe lives under .symfony/recipe/ (copy those files if Flex does not apply them).

Register bundles if Flex does not:

// config/bundles.php
Nowo\TiptapEditorBundle\NowoTiptapEditorBundle::class => ['all' => true],
Nowo\WikiBundle\WikiBundle::class => ['all' => true],

Routing

# config/routes/nowo_wiki.yaml
nowo_wiki:
    resource: .
    type: nowo_wiki

Database

Run Doctrine migrations in your application after entities are mapped (bundle prepends ORM mapping).

Tiptap editor

Configure a notion profile (or override nowo_wiki.editor.tiptap_config):

# config/packages/nowo_tiptap_editor.yaml
nowo_tiptap_editor:
    configs:
        notion:
            variant: notion
            toolbar: true
            min_height: 520px
            form_theme: form_div_layout.html.twig

Publish bundle assets (wiki + Tiptap) and load the editor script on edit pages (included automatically when using @NowoWikiBundle/layout.html.twig and page_edit.html.twig):

php bin/console assets:install public

If you override the wiki layout, keep {% block wiki_editor_scripts %} or add:

<script src="{{ asset(nowo_tiptap_editor_asset_path('tiptap-editor.js')) }}"></script>

Twig Extra Bundle (REQ-TWIG-004)

This package ships Twig templates. Host applications must install and enable Twig Extra:

composer require twig/extra-bundle twig/string-extra

Register Twig\Extra\TwigExtraBundle\TwigExtraBundle in config/bundles.php (Flex usually does this). Demos already include the same stack. The package release-check runs make check-twig-extra to guard this contract.