diff --git a/sulu/article-bundle/2.0/config/packages/sulu_article.yaml b/sulu/article-bundle/2.0/config/packages/sulu_article.yaml new file mode 100644 index 00000000..c9b17ed0 --- /dev/null +++ b/sulu/article-bundle/2.0/config/packages/sulu_article.yaml @@ -0,0 +1,28 @@ +sulu_article: + index_name: '%env(resolve:ELASTICSEARCH_INDEX)%' + hosts: + - '%env(resolve:ELASTICSEARCH_HOST)%' + types: + article: + translation_key: "sulu_article.article" + +sulu_route: + mappings: + Sulu\Bundle\ArticleBundle\Document\ArticleDocument: + generator: schema + options: + route_schema: '/articles/{object.getTitle()}' + Sulu\Bundle\ArticleBundle\Document\ArticlePageDocument: + generator: article_page + options: + route_schema: '{translator.trans("page")}-{object.getPageNumber()}' + parent: '{object.getParent().getRoutePath()}' + +ongr_elasticsearch: + analysis: + tokenizer: + pathTokenizer: + type: path_hierarchy + analyzer: + pathAnalyzer: + tokenizer: pathTokenizer diff --git a/sulu/article-bundle/2.0/config/routes/sulu_article_admin.yaml b/sulu/article-bundle/2.0/config/routes/sulu_article_admin.yaml new file mode 100644 index 00000000..2fb93645 --- /dev/null +++ b/sulu/article-bundle/2.0/config/routes/sulu_article_admin.yaml @@ -0,0 +1,4 @@ +sulu_article_api: + resource: '@SuluArticleBundle/Resources/config/routing_api.yml' + type: rest + prefix: /admin/api diff --git a/sulu/article-bundle/2.0/manifest.json b/sulu/article-bundle/2.0/manifest.json new file mode 100644 index 00000000..a340517d --- /dev/null +++ b/sulu/article-bundle/2.0/manifest.json @@ -0,0 +1,16 @@ +{ + "bundles": { + "Sulu\\Bundle\\ArticleBundle\\SuluArticleBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "copy-from-package": { + "Resources/doc/default.xml": "%CONFIG_DIR%/templates/articles/default.xml", + "Resources/doc/default.html.twig": "templates/articles/default.html.twig" + }, + "env": { + "ELASTICSEARCH_HOST": "127.0.0.1:9200", + "ELASTICSEARCH_INDEX": "su_articles" + } +} diff --git a/sulu/article-bundle/2.0/post-install.txt b/sulu/article-bundle/2.0/post-install.txt new file mode 100644 index 00000000..bfe4e617 --- /dev/null +++ b/sulu/article-bundle/2.0/post-install.txt @@ -0,0 +1,11 @@ + + What's next? + + + * The SuluArticleBundle is almost ready: + 1. Configure elasticsearch host and index in the .env file. + 2. Initialize PHPCR by running php bin/console sulu:document:init. + 3. Create the elasticsearch indices by running php bin/console ongr:es:index:create and php bin/console ongr:es:index:create --manager live. + 4. Make sure your user has all the necessary permissions for the SuluArticleBundle. + + * Read the documentation at https://github.com/sulu/SuluArticleBundle/blob/master/Resources/doc/README.md