承接 timnarr/hyphenate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

timnarr/hyphenate

最新稳定版本:v1.0.2

Composer 安装命令:

composer require timnarr/hyphenate

包简介

Hyphenate is a Statamic addon providing a modifier to hyphenate strings based on the TeX-Hyphenation algorithm provided by the org_heigl/hyphenator package.

README 文档

README

Hyphenate is a Statamic addon providing a modifier to hyphenate strings based on the TeX-Hyphenation algorithm provided by the org_heigl/hyphenator package.

The Hyphenate modifier will output a “soft hyphen” using the HTML entity ­. This entity marks wehre the browser should break if necessary.

Install via Composer

composer require timnarr/hyphenate

Usage

{{ title | hyphenate }}

Read more about Statamic modifiers here https://statamic.dev/modifiers

Example

Let's assume we have a multilang page and a heading title, which holds "Hyphenation" in english and "Silbentrennung" in german.

We output title in your antlers file and use the hyphenate modifier like this:

  <h1>{{ title | hyphenate }}</h1>

And the final HTML output is:

  <h1>Silben&shy;tren&shy;nung</h1>
  <h1>Hyphen&shy;a&shy;tion</h1>

Note

Frequent use of the hyphenate modifier, especially on long texts, can affect your page performance and slow down your website. Please use in combination with caching!

License

MIT License © 2023-present Tim Grochowski

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固