Add flex recipe for SuluArticleBundle

This commit is contained in:
Luca Rath-Heel
2020-07-14 15:27:15 +02:00
parent a701a4bcac
commit 110d030cc3
5 changed files with 55 additions and 0 deletions
@@ -0,0 +1,8 @@
ongr_elasticsearch:
analysis:
tokenizer:
pathTokenizer:
type: path_hierarchy
analyzer:
pathAnalyzer:
tokenizer: pathTokenizer
@@ -0,0 +1,16 @@
sulu_article:
index_name: '%env(resolve:ELASTICSEARCH_INDEX)%'
hosts:
- '%env(resolve:ELASTICSEARCH_HOST)%'
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()}
@@ -0,0 +1,4 @@
sulu_article_api:
resource: '@SuluArticleBundle/Resources/config/routing_api.yml'
type: rest
prefix: /admin/api
+16
View File
@@ -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.xml"
},
"env": {
"ELASTICSEARCH_HOST": "127.0.0.1:9200",
"ELASTICSEARCH_INDEX": ""
}
}
+11
View File
@@ -0,0 +1,11 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>
* The <fg=green>SuluArticleBundle</> is almost ready:
1. Configure elasticsearch host and index in the <comment>.env</> file.
2. Initialize PHPCR by running <info>php bin/console sulu:document:init</>.
3. Create the elasticsearch indices by running <info>php bin/console ongr:es:index:create</> and <comment>php bin/console ongr:es:index:create --manager live</>.
4. Make sure your user has all the necessary permissions for the <fg=green>SuluArticleBundle</>.
* <fg=blue>Read</> the documentation at <comment>https://github.com/sulu/SuluArticleBundle/blob/master/Resources/doc/README.md</>