Extension:Add HTML Meta and Title
Appearance
現在、この拡張機能は積極的な保守が行われていません! それでも機能する可能性はありますが、バグ報告や機能の要望は無視される可能性が高くなります。 この拡張機能の開発や保守の作業を引き受けることに興味がある場合は、リポジトリの所有権を申請できます。 礼儀として、作者に問い合わせることをお勧めします。 保守を引き継いだ場合、このテンプレートは除去すべきです。また、拡張機能ページの {{Extension}} 基礎情報ボックス内のリストにあなたの名前を保守担当者として追加してください。 |
リリースの状態: 保守されていない |
|
|---|---|
| 実装 | タグ |
| 説明 | MediaWikiのSEO(検索エンジン最適化)を簡単にします。 |
| 作者 | Jim Wilson, Dennis Roczek (dennisroczekトーク) |
| 最新バージョン | 0.7 (2015-09-29) |
| MediaWiki | 1.24+ |
| データベースの変更 | いいえ |
<seo> |
|
| ライセンス | MIT ライセンス |
| ダウンロード | |
| translatewiki.net で翻訳を利用できる場合は、Add HTML Meta and Title 拡張機能の翻訳にご協力ください | |
The Add HTML Meta and Title extension allows for easier SEO (search engine optimization) with MediaWiki. It is based in part on the extension MetaKeywordsTag.
使用法
When you enter the following in a wiki page:
<seo title="word1,word2" metakeywords="word3,word4" metadescription="word5,word6" google-site-verification="123456789-abfd123456" />
...or the shorter...
<seo title="word1,word2" metak="word3,word4" metad="word5,word6" google-site-verification="123456789-abfd123456" />
...these words are added to the HTML title and meta headers. This makes SEO (search engine optimization) with MediaWiki easier.
For example, the above would become:
<title>word1,word2 - Wiki Name</title> (the string "word1,word2" replaces page title)
<meta name="keywords" content="word3,word4" />
<meta name="description" content="word5,word6" />
<meta google-site-verification="123456789-abfd123456" />
(These are new meta tags - existing metas are left untouched.)
インストール
- ダウンロードして、ファイルを
extensions/フォルダー内のAddHTMLMetaAndTitleという名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AddHTMLMetaAndTitle
- 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'AddHTMLMetaAndTitle' );
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
更新履歴
- v0.7.0
- added support for PHP CodeSniffer checks.
- fixed any remaining errors and warnings.
- v0.6.0
- added Google's site verification tag.
- v0.5.1
- modified to work with MW versions 1.1.2 and up (Revision by Mic)
- v0.4.0
- have put
$emt="";in the parseSEO function because I got some nasty PHP notice for an uninitialized variable...
- v0.2.0
- added htmlspecialchars() as a filter to the text that is displayed in the title and meta - anything else needed to prevent malicious people? I think no. (If you are an English speaker you may want to use the htmlentities PHP function, which is more restrictive.)
- v0.1.0
- Initial version - everything works.
関連項目
- Extension:WikiSEO is based on this extension, but rewritten to modern MediaWiki standards and under active development.
- If you only want to override the title on pages (not append words to it), you might also look at the DISPLAYTITLE tag in combination with the Manual:$wgAllowDisplayTitle and Manual:$wgRestrictDisplayTitle settings.
- Extension:Semantic Meta Tags for easily setting meta and keywords on entire namespaces or individual pages
