Search by

cecil / theme-redirects

aligny

Cecil component theme Redirects

Package info

github.com/Cecilapp/theme-redirects

Language:Twig

Type:cecil-theme

pkg:composer/cecil/theme-redirects

Fund package maintenance!

ArnaudLigny

Open Collective

Statistics

Installs: 725

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

2.1.0 2026-10-22 23:49 UTC

This package is auto-updated.

Last update: 2026-10-22 23:50:17 UTC


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.

© Arnaud Ligny