Download the PHP package tomk79/px2-seo-utils without Composer
On this page you can find all versions of the php package tomk79/px2-seo-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package px2-seo-utils
px2-seo-utils
Pickles 2 に、SEOに関するユーティリティを追加します。
セットアップ - Setup
1. インストール - Installation
Pickles 2 をセットアップしたあとに、次のコマンドを実行します。
2. $conf->funcs->before_sitemap
に設定する
設定ファイル config.php
(通常は ./px-files/config.php
) を編集し、次のように追記します。
テーマの後に実行されるように設定してください。
使い方 - Usage
robots タグの出力
プラグイン設定
robots->enable
を true
に設定します。
サイトマップを拡張する
サイトマップに次の列を追加します。
robots:follow
robots:index
robots:archive
サイトマップに追加した拡張列に、各ページの設定を入力します。
on
、yes
、true
、1
のように入力した場合は、肯定の命令(例:follow
) が出力されます。off
、no
、false
、0
のように入力した場合は、否定の命令(例:nofollow
) が出力されます。- 空白か、列が未定義か、または
null
のように入力した場合は、出力されません。
3つの項目のうちの何れか1つ以上が設定されている場合、
head
要素の閉じタグの直前に、
<meta name="robots" content="follow,noindex" />
のようなコードが出力されます。
metaタグを直接取得する
直接タグを取得したい場合は、次の例のように $seoUtils->robots()->tag()
メソッドから取得できます。
このとき、 同時に X-Robots-Tag
ヘッダーが発行されます。
sitemap.xml の生成
プラグイン設定
sitemapXml->enable
を true
に設定します。
更新履歴 - Change log
tomk79/px2-seo-utils v0.1.0 (2021年8月15日)
- Initial Release.
ライセンス - License
MIT License
作者 - Author
- Tomoya Koyanagi [email protected]
- website: https://www.pxt.jp/
- Twitter: @tomk79 https://twitter.com/tomk79/
All versions of px2-seo-utils with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package tomk79/px2-seo-utils contains the following files
Loading the files please wait ....