My tech blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

120 lines
2.2 KiB

<?php
return [
// data-less
[
'methods' => ['GET'],
'path' => '/about(.html)?',
'action' => 'About'
],
// data-ful
[
'methods' => ['GET'],
'path' => '/',
'action' => 'Home'
],
[
'methods' => ['GET'],
'path' => '/blog/?',
'action' => 'Article\\Index'
],
[
'methods' => ['GET'],
'path' => '/lists/{category}/?',
'action' => 'Article\\Index'
],
[
'methods' => ['GET'],
'path' => '/blog/feeds/{category}.xml',
'action' => 'Article\\RSS'
],
[
'methods' => ['GET'],
'path' => '/blog/feed/{category}.xml',
'action' => 'Article\\RSS'
],
[
'methods' => ['GET'],
'path' => '/blog/{slug}\\.{mode}',
'action' => 'Article\\Show'
],
[
'methods' => ['GET'],
'path' => '/blog/{slug}',
'action' => 'Article\\Show'
],
[
'methods' => ['GET'],
'path' => '/search(.html)?',
'action' => 'Search'
],
// Authentication
[
'methods' => ['GET', 'POST'],
'path' => '/login',
'action' => 'Admin\\Login'
],
[
'methods' => ['GET'],
'path' => '/admin/logout',
'action' => 'Admin\\Logout'
],
[
'methods' => ['GET', 'POST'],
'path' => '/admin(.*)',
'action' => 'Admin\\CheckAuthentication'
],
// API
[
'methods' => ['GET'],
'path' => '/api/search',
'action' => 'API\\Search'
],
[
'methods' => ['POST'],
'path' => '/api/preview',
'action' => 'API\\Preview'
],
[
'methods' => ['POST'],
'path' => '/api/slugify',
'action' => 'API\\Slugify'
],
[
'methods' => ['GET'],
'path' => '/api/list-categories',
'action' => 'API\\ListCategories'
],
// admin panel
[
'methods' => ['GET'],
'path' => '/admin(/?)',
'action' => 'Admin\\Dashboard'
],
[
'methods' => ['GET', 'POST'],
'path' => '/admin/new-article',
'action' => 'Admin\\Article\\Create'
],
[
'methods' => ['GET', 'POST'],
'path' => '/admin/import-article',
'action' => 'Admin\\Article\\Import'
],
[
'methods' => ['GET', 'POST'],
'path' => '/admin/edit-article/([0-9]+)',
'action' => 'Admin\\Article\\Edit'
],
[
'methods' => ['GET'],
'path' => '/admin/delete-article/{slug}',
'action' => 'Admin\\Article\\Delete'
],
// rewrites
[
'methods' => ['GET'],
'path' => '/image/(.+)',
'action' => 'Rewrite\\Image'
]
];