Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 4a530a4

Browse files
Add homepage (#52)
* Add homepage * Not there anymore * Update existing tests * Use specific exception * Merge fixes * Set HTML title using translations * Add homepage to integration tests * Fix and test title * Extract PageEvent * Missed some cases * Return type * Tweak configuration * Improve name
1 parent f1695eb commit 4a530a4

File tree

89 files changed

+1558
-856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1558
-856
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/config/packages/content_page.yaml
1+
/config/packages/libero_page.yaml
22

33
###> phpunit/phpunit ###
44
/phpunit.xml

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ Serve content read from a Libero API to the public.
88
Getting started
99
---------------
1010

11+
To run Browser in the `dev` environment:
12+
1113
1. Run `docker-compose down --volumes --remove-orphans && docker-compose up --build`.
1214

13-
2. Open http://localhost:8080/articles/article1 to see the scholarly article `article1` in the `dev` environment.
15+
2. Open http://localhost:8080/ to see the homepage.
16+
17+
3. Open http://localhost:8080/articles/article1 to see the scholarly article `article1`.
1418

1519
### Configuration
1620

@@ -25,17 +29,20 @@ To run an image reading from two content services (`blog-articles` and `scholarl
2529

2630
- Set the `API_URI` environment variable to be the root of the Libero API.
2731

28-
- Create `config/packages/content_page.yaml` (either by extending the image or mounting a file):
32+
- Create `config/packages/libero_page.yaml` (either by extending the image or mounting a file):
2933

3034
```yaml
31-
content_page:
35+
libero_page:
3236
pages:
33-
blog_article:
34-
path: '/blog/{id}'
35-
service: 'blog-articles'
36-
scholarly_article:
37-
path: '/articles/{id}'
38-
service: 'scholarly-articles'
37+
homepage:
38+
path: '/'
39+
content:
40+
blog_article:
41+
path: '/blog/{id}'
42+
content_service: 'blog-articles'
43+
scholarly_article:
44+
path: '/articles/{id}'
45+
content_service: 'scholarly-articles'
3946
```
4047
4148
Getting help

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"autoload-dev": {
1212
"psr-4": {
1313
"tests\\Libero\\Browser\\": "tests/",
14-
"tests\\Libero\\ContentPageBundle\\": "vendor-extra/ContentPageBundle/tests/",
1514
"tests\\Libero\\JatsContentBundle\\": "vendor-extra/JatsContentBundle/tests/",
1615
"tests\\Libero\\LiberoContentBundle\\": "vendor-extra/LiberoContentBundle/tests/",
16+
"tests\\Libero\\LiberoPageBundle\\": "vendor-extra/LiberoPageBundle/tests/",
1717
"tests\\Libero\\ViewsBundle\\": "vendor-extra/ViewsBundle/tests/"
1818
}
1919
},
@@ -23,9 +23,9 @@
2323
"ext-intl": "*",
2424
"ext-mbstring": "*",
2525
"csa/guzzle-bundle": "^3.1",
26-
"libero/content-page-bundle": "^1.0@dev",
2726
"libero/jats-content-bundle": "^1.0@dev",
2827
"libero/libero-content-bundle": "^1.0@dev",
28+
"libero/page-bundle": "^1.0@dev",
2929
"libero/patterns-bundle": "^1.0@dev",
3030
"libero/views-bundle": "^1.0@dev",
3131
"symfony/asset": "^4.1",

composer.lock

Lines changed: 34 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
return [
66
Csa\Bundle\GuzzleBundle\CsaGuzzleBundle::class => ['all' => true],
7-
Libero\ContentPageBundle\ContentPageBundle::class => ['all' => true],
87
Libero\JatsContentBundle\JatsContentBundle::class => ['all' => true],
98
Libero\LiberoContentBundle\LiberoContentBundle::class => ['all' => true],
9+
Libero\LiberoPageBundle\LiberoPageBundle::class => ['all' => true],
1010
Libero\LiberoPatternsBundle\LiberoPatternsBundle::class => ['all' => true],
1111
Libero\ViewsBundle\ViewsBundle::class => ['all' => true],
1212
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],

config/packages/dev/content_page.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

config/packages/dev/libero_page.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
libero_page:
2+
pages:
3+
homepage:
4+
path: '/'
5+
content:
6+
blog_article:
7+
path: '/blog/{id}'
8+
content_service: 'blog-articles'
9+
scholarly_article:
10+
path: '/articles/{id}'
11+
content_service: 'scholarly-articles'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
content_page:
1+
libero_page:
22
client: 'csa_guzzle.client.libero_api'
33
page_template: 'page.html.twig'

config/packages/test/content_page.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

config/packages/test/libero_page.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
libero_page:
2+
pages:
3+
homepage:
4+
path: '/'
5+
content:
6+
blog_article:
7+
path: '/blog/{id}'
8+
content_service: 'blog-articles'
9+
scholarly_article:
10+
path: '/articles/{id}'
11+
content_service: 'scholarly-articles'

0 commit comments

Comments
 (0)