cecil / theme-redirects
Cecil component theme Redirects
Package info
github.com/Cecilapp/theme-redirects
Language:Twig
Type:cecil-theme
pkg:composer/cecil/theme-redirects
Requires
- cecil/theme-installer: ^2.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
The Redirects component theme for Cecil provides support of _redirects file generation.
After installation and without any configuration, this component theme generates a _redirects file containing HTML redirections created by Cecil, in all languages (automatic or created manually with the redirect front matter variable).
Services that support the _redirects file:
Installation
composer require cecil/theme-redirects
Or download the latest archive and uncompress its content in
themes/redirects.
Usage
Add redirects in the theme section of your site configuration:
theme: - redirects
Add redirections
server: redirects: - from: https://xxxxxx/* to: https://xxxxxx/:splat status: 301 # HTTP status code, optional (301 by default if `force` is set) force: true # redirect even if the file exists, optional
Development
The demo/ website uses the theme under development and covers the supported cases (multilingual aliases, redirect front matter, redirections with and without status / force):
php demo/link.php php cecil.phar build demo
The generated demo/_site/_redirects file must match demo/expected/_redirects: this is checked by the Test workflow.
License
Redirects is a free software distributed under the terms of the MIT license.