Skip to content

Commit

Permalink
[TASK] Streamline formatting of yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed May 11, 2023
1 parent 19901f9 commit 99af3da
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .phplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ path: ./
jobs: 10
cache: .phplint.cache
extensions:
- php
- php
exclude:
- .build
- .build
18 changes: 6 additions & 12 deletions Configuration/Routes/BlogArchive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ routeEnhancers:
extension: Blog
plugin: Archive
routes:
-
routePath: '/archive/{year}'
- routePath: '/archive/{year}'
_controller: 'Post::listPostsByDate'
_arguments:
year: year
-
routePath: '/archive/{year}/page-{page}'
- routePath: '/archive/{year}/page-{page}'
_controller: 'Post::listPostsByDate'
_arguments:
year: year
page: 'currentPage'
-
routePath: '/archive/{year}/{month}'
- routePath: '/archive/{year}/{month}'
_controller: 'Post::listPostsByDate'
_arguments:
year: year
month: month
-
routePath: '/archive/{year}/{month}/page-{page}'
- routePath: '/archive/{year}/{month}/page-{page}'
_controller: 'Post::listPostsByDate'
_arguments:
year: year
Expand Down Expand Up @@ -57,8 +53,7 @@ routeEnhancers:
november: 11
december: 12
localeMap:
-
locale: 'de_.*'
- locale: 'de_.*'
map:
januar: 1
februar: 2
Expand All @@ -72,8 +67,7 @@ routeEnhancers:
oktober: 10
november: 11
dezember: 12
-
locale: 'fr_.*'
- locale: 'fr_.*'
map:
janvier: 1
fevrier: 2
Expand Down
6 changes: 2 additions & 4 deletions Configuration/Routes/BlogAuthorPosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ routeEnhancers:
extension: Blog
plugin: AuthorPosts
routes:
-
routePath: '/author/{author_title}'
- routePath: '/author/{author_title}'
_controller: 'Post::listPostsByAuthor'
_arguments:
author_title: author
-
routePath: '/author/{author_title}/page-{page}'
- routePath: '/author/{author_title}/page-{page}'
_controller: 'Post::listPostsByAuthor'
_arguments:
author_title: author
Expand Down
6 changes: 2 additions & 4 deletions Configuration/Routes/BlogCategory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ routeEnhancers:
extension: Blog
plugin: Category
routes:
-
routePath: '/category/{category_title}'
- routePath: '/category/{category_title}'
_controller: 'Post::listPostsByCategory'
_arguments:
category_title: category
-
routePath: '/category/{category_title}/page-{page}'
- routePath: '/category/{category_title}/page-{page}'
_controller: 'Post::listPostsByCategory'
_arguments:
category_title: category
Expand Down
3 changes: 1 addition & 2 deletions Configuration/Routes/BlogPosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ routeEnhancers:
extension: Blog
plugin: Posts
routes:
-
routePath: '/page-{page}'
- routePath: '/page-{page}'
_controller: 'Post::listRecentPosts'
_arguments:
page: 'currentPage'
Expand Down
6 changes: 2 additions & 4 deletions Configuration/Routes/BlogTag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ routeEnhancers:
extension: Blog
plugin: Tag
routes:
-
routePath: '/tag/{tag_title}'
- routePath: '/tag/{tag_title}'
_controller: 'Post::listPostsByTag'
_arguments:
tag_title: tag
-
routePath: '/tag/{tag_title}/page-{page}'
- routePath: '/tag/{tag_title}/page-{page}'
_controller: 'Post::listPostsByTag'
_arguments:
tag_title: tag
Expand Down
12 changes: 6 additions & 6 deletions Configuration/Routes/Default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# imports:
# - { resource: "EXT:blog/Configuration/Routes/Default.yaml" }
imports:
- { resource: "EXT:blog/Configuration/Routes/BlogCategory.yaml" }
- { resource: "EXT:blog/Configuration/Routes/BlogTag.yaml" }
- { resource: "EXT:blog/Configuration/Routes/BlogArchive.yaml" }
- { resource: "EXT:blog/Configuration/Routes/BlogAuthorPosts.yaml" }
- { resource: "EXT:blog/Configuration/Routes/BlogFeedWidget.yaml" }
- { resource: "EXT:blog/Configuration/Routes/BlogPosts.yaml" }
- { resource: 'EXT:blog/Configuration/Routes/BlogCategory.yaml' }
- { resource: 'EXT:blog/Configuration/Routes/BlogTag.yaml' }
- { resource: 'EXT:blog/Configuration/Routes/BlogArchive.yaml' }
- { resource: 'EXT:blog/Configuration/Routes/BlogAuthorPosts.yaml' }
- { resource: 'EXT:blog/Configuration/Routes/BlogFeedWidget.yaml' }
- { resource: 'EXT:blog/Configuration/Routes/BlogPosts.yaml' }
12 changes: 6 additions & 6 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false
_defaults:
autowire: true
autoconfigure: true
public: false

T3G\AgencyPack\Blog\:
resource: '../Classes/*'
T3G\AgencyPack\Blog\:
resource: '../Classes/*'

0 comments on commit 99af3da

Please sign in to comment.