定制 cecil/theme-netlify 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cecil/theme-netlify

最新稳定版本:2.2.1

Composer 安装命令:

composer require cecil/theme-netlify

包简介

Cecil component theme Netlify

README 文档

README

The Netlify component theme for Cecil provides support of Netlify's _redirects and _header.

After installation and without any configuration, this component theme generate:

  1. a _redirects file containing HTML's redirections created by Cecil (automatic or created manually with the redirect front matter variable)
  2. a _headers file containing HTTP headers created by Cecil (generated from headers' configuration)

Installation

composer require cecil/theme-netlify

Or download the latest archive and uncompress its content in themes/netlify.

Usage

Add netlify in the theme section of your site configuration:

theme: - netlify

Add redirections

netlify: redirects: - from: https://xxxxxx/* to: https://xxxxxx/:splat status: 301 # optional force: true # optional

Refer to Netlify documentation for details.

Redirect home page to the user language version

netlify: redirect_by_language: true # false by default

It generate the following redirect for each available language (other than the default):

/ /<language-code>/ 302! Language=<language-code> 

Example:

/ /fr/ 302! Language=fr 

The language can be specified in the cookie nf_lang, so you can override the default behavior with JavaScript (in case of a language dropdown selector for example).

Add headers

server: headers: - path: <path> # Relative path, prefixed with a slash. Support "*" wildcard. headers: - key: <key> value: "<value>"

Document: https://cecil.app/documentation/configuration/#headers.

统计信息

  • 总下载量: 23.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Twig

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固