tomk79 / px2-path-resolver
2.1.0
2022-01-08 09:18 UTC
Requires
- php: >=7.3.0
- tomk79/filesystem: 1.*
Requires (Dev)
- phpunit/phpunit: ~9.5
- pickles2/broccoli-module-fess: dev-master
- pickles2/broccoli-module-plain-html-elements: dev-master
- pickles2/px-fw-2.x: ^2.0
- pickles2/px2-px2dthelper: ^2.0
- pickles2/px2-sitemapexcel: 2.*
README
Linux | Windows | |
---|---|---|
master |
|
|
develop |
|
|
px2-path-resolver 为 Pickles 2 增加了相对路径和绝对路径的写入选项。
导入方法 - Setup
1. Pickles 2 安装
2. 在 composer.json 中添加软件包信息
{ "require": { "pickles2/px2-path-resolver": "^2.0" } }
3. composer update
反映更新的软件包信息。
$ composer update
4. 更新 config.php
$conf->funcs->before_output
添加插件设置。
<?php return call_user_func( function(){ /* (中略) */ // processor $conf->funcs->processor->html = [ // px2-path-resolver - 共通コンテンツのリンクやリソースのパスを解決する // このAPIは、サイトマップCSV上で path と content が異なるパスを参照している場合に、 // 相対的に記述されたリンクやリソースのパスがあわなくなる問題を解決します。 'tomk79\pickles2\pathResolver\main::resolve_common_contents()' , // テーマ // 'theme'=>'pickles2\themes\pickles\theme::exec' , 'theme'=>'(API name of theme package)' , ]; /* (中略) */ // funcs: Before output $conf->funcs->before_output = [ // px2-path-resolver - 相対パス・絶対パスを変換して出力する // options // string 'to': // - relate: 相対パスへ変換 // - absolute: 絶対パスへ変換 // - pass: 変換を行わない(default) // bool 'supply_index_filename': // - true: 省略されたindexファイル名を補う // - false: 省略できるindexファイル名を削除 // - null: そのまま (default) 'tomk79\pickles2\pathResolver\main::exec('.json_encode(array( 'to' => 'relate', 'supply_index_filename' => true )).')' , ]; /* (中略) */ return $conf; } );
更新日志 - Change log
pickles2/px2-path-resolver v2.1.0 (2022年1月8日)
- 支持的 PHP 版本更改为
>=7.3.0
。 - 支持 PHP 8.1。
pickles2/px2-path-resolver v2.0.15 (2021年5月25日)
- 内部代码修正。
pickles2/px2-path-resolver v2.0.14 (2020年10月17日)
- 修复了处理大尺寸内容的问题。现在可以处理高达 600MB 的内容。
pickles2/px2-path-resolver v2.0.13 (2019年9月4日)
- 修复了在 PHP 7.3 系中发生的问题。
pickles2/px2-path-resolver v2.0.12 (2019年6月8日)
- 修复了 CSS 引用的文件名不能包含
)
符号的问题。
pickles2/px2-path-resolver v2.0.11 (2019年4月19日)
- 修复了在路径转换时,原始字符集被忽略并转换为 UTF-8 的问题。
pickles2/px2-path-resolver v2.0.10 (2019年1月25日)
- 当 GET 参数部分或锚部分包含未解决的路径时,不进行转换。
pickles2/px2-path-resolver v2.0.9 (2018年8月30日)
- 修复了一些小问题。
pickles2/px2-path-resolver v2.0.8 (2018年1月24日)
- 修复了
resolve_common_contents()
在path
或content
未定义的页面中引发错误的问题。
pickles2/px2-path-resolver v2.0.7 (2016年7月27日)
- 修复了在
tomk79\pickles2\pathResolver\main::resolve_common_contents()
中,当content
为 0 字节文件时异常终止的问题。
pickles2/px2-path-resolver v2.0.6 (2016年5月25日)
- 添加了处理单个 HTML 文件过大而解析失败时的错误处理。
许可 - License
MIT 许可证
作者 - Author
- (C)Tomoya Koyanagi tomk79@gmail.com
- 网站: https://www.pxt.jp/
- 推特: @tomk79 https://twitter.com/tomk79/