Geeklog

Geeklogで使えるwiki構文のサンプル

投稿者: 閲覧数29,477

Geeklogでは "コンフィギュレーション" の "ユーザと投稿" で "投稿にWikiテキストエディタ"を"はい"にすることで、記事の投稿でWikiスタイル(PEAR::TEXT_WIKI)が使えるようになってます。(履歴を調べるとGeeklog1.5.0以降から使えるようです)
プラグインではダウンロードがWikiスタイルに対応。(他にもあれば教えてください)
ただWikiスタイルといっても様々なwikiがありそれぞれ微妙に記述方法(構文)が違ったりするので、Geeklogで使えるWikiスタイルの構文がどんなものか調べてみました。

さらにテーマごとに用意されている見栄えも違ってくるため、ここへWiki構文のサンプルを記述します。
(この記事を作成しているのはGeeklog1.7.0です。他のバージョンでは確認していませんので微妙に違ってくるかもしれません)

インライン書式

''イタリック'' イタリック
//em強調// em強調
**ボールド** ボールド
''**イタリック&ボールド**'' イタリック&ボールド
//**em強調&ボールド**// em強調&ボールド
} }
@@--- 打ち消し線 +++ 下線 @@ 打ち消し線 下線
@@--- 打ち消し線 @@ 打ち消し線
@@+++ 下線 @@ 下線

文字どおりのテキスト

Text_Wikiのテキスト解析を望まないならば、2つのバッククォート(シングルクォートではない)で囲んでください。

This //text// gets **parsed**.
``This //text// does not get **parsed**.``

This //text// does not get **parsed**.

見出し

テキストの前にプラス記号を置くことによっていろいろなレベルを作成できます。


+  レベル1見出し

++ レベル2見出し

+++  レベル3見出し

++++ レベル4見出し

+++++  レベル5見出し

++++++ レベル6見出し

レベル1見出し

レベル2見出し

レベル3見出し

レベル4見出し

レベル5見出し
レベル6見出し

目次

あらゆる見出しのリストを作成しリンクすることで目次タグを簡単に作成できます。

[[toc]]

水平線

4つのマイナス記号で横線である水平線を作成できます。


----

リスト

記号リスト

1つのアスタリスクで記号リストを作成できます。

* 記号1リスト
 * サブ記号リスト
  • 記号1リスト
    • サブ記号リスト

番号リスト

同様に1つのシャープで番号リストを作成できます。

# 番号1リスト
# 番号2リスト
 # サブ番号リスト
  1. 番号1リスト
  2. 番号2リスト
    1. サブ番号リスト

番号リストと記号リストの複合リスト

番号と記号リストを混在して一緒に使うことができます。

# 番号1リスト
 * 記号リスト
 * 記号リスト
# 番号2リスト
 * 記号リスト
 * 記号リスト
  * サブ記号リスト
   # サブサブ番号リスト
   # サブサブ番号リスト
# 番号3リスト
 * 記号リスト
 * 記号リスト
  1. 番号1リスト
    • 記号リスト
    • 記号リスト
  2. 番号2リスト
  3. 記号リスト
  4. 記号リスト
    • サブ記号リスト
      1. サブサブ番号リスト
      2. サブサブ番号リスト
  5. 番号3リスト
    • 記号リスト
    • 記号リスト

定義リスト

以下の構文で定義(説明)リストを作成できます。

: Item 1 : Something
: Item 2 : Something else

Item 1
Something
Item 2
Something else

引用文

1つの '>'記号 で始めることで引用文のブロックを作成できます。

This is normal text here.

> Indent me! The quick brown fox jumps over the lazy dog. Now this the time for all good men to come to the aid of their country. Notice how we can continue the block-quote in the same "paragraph" by using a backslash at the end of the line.
>
> Another block, leading to...
>> Second level of indenting.  This second is indented even more than the previous one.

Back to normal text.

This is normal text here.
Indent me! The quick brown fox jumps over the lazy dog. Now this the time for all good men to come to the aid of their country. Notice how we can continue the block-quote in the same "paragraph" by using a backslash at the end of the line.
Another block, leading to...
Second level of indenting. This second is indented even more than the previous one.

Back to normal text.


リンクと画像

URL

単にリモートのURLを入力することでリンクが作成できます。 例)http://hiroron.com/

ページが乱雑にならないよう、番号の参照リンクを作成する場合は角カッコでURLを囲みます。
[http://www.winkey.jp] と記述することで 1 が作成できます。

自分で好きなリンク名をつけたい場合は以下の記述で作成できます。

[http://pear.php.net PEAR]

PEAR

画像

画像のURL(jpg,gif,pngで終わってなければいけません)を入力してページに画像を置くことができます。

http://c2.com/sig/wiki.gif

http://c2.com/sig/wiki.gif画像にALTタグをつけたい場合は角括弧で囲み説明を記述します。

[http://en.wikipedia.org/wiki/File:Albert_Einstein_1979_USSR_Stamp.jpg Einstein]

Einstein画像に元画像へのリンクやサイズオプションをつけたい場合は角括弧2つで囲みimageで始めます。

[[image http://hiroron.com/images/library/Image/mhp3-quest-clear.jpg width="150" link="http://hiroron.com/images/library/Image/mhp3-quest-clear.jpg"]]

mhp3-quest-clear.jpg

コードブロック

コードブロックは<code>...</code>を使って作成できます。

This is an example code block!
PHPコードを自動的にカラー化するPHPブロックを作る場合は<code type="php">...</code>で囲んでください。

``<code type="php">``
// Set up the wiki options
$options = array();
$options['view_url'] = "index.php?page=";
 
// load the text for the requested page
$text = implode('', file($page . '.wiki.txt'));
 
// create a Wiki objext with the loaded options
$wiki = new Text_Wiki($options);
 
// transform the wiki text.
echo $wiki->transform($text);


<?php

// Set up the wiki options
$options = array();
$options['view_url'] = "index.php?page=";
 
// load the text for the requested page
$text = implode('', file($page . '.wiki.txt'));
 
// create a Wiki objext with the loaded options
$wiki = new Text_Wiki($options);
 
// transform the wiki text.
echo $wiki->transform($text);
?>

その他のコードタイプには<code type="html">...</code>があります。


テーブル

垂直バー2つで囲むことでテーブルを作成できます。

|| セル1 || セル2 ||
|||| 隣セルと合体 ||
|| セル4 || セル5 ||
|| セル6 || ここには長いテキストのセルをつくってみる ||

セル1 セル2
隣セルと合体
セル4 セル5
セル6 ここには長いテキストのセルをつくってみる

|| lines must start and end || with double vertical bars || nothing ||
|| cells are separated by || double vertical bars || nothing ||
|||| you can span multiple columns by || starting each cell ||
|| with extra cell |||| separators ||
|||||| but perhaps an example is the easiest way to see ||

lines must start and end with double vertical bars nothing
cells are separated by double vertical bars nothing
you can span multiple columns by starting each cell
with extra cell separators

``<code type="php">``
// Set up the wiki options
$options = array();
$options['view_url'] = "index.php?page=";
 
// load the text for the requested page
$text = implode('', file($page . '.wiki.txt'));
 
// create a Wiki objext with the loaded options
$wiki = new Text_Wiki($options);
 
// transform the wiki text.
echo $wiki->transform($text);


<?php

// Set up the wiki options
&#36;options = array();
&#36;options['view_url'] = "index.php?page=";
 
// load the text for the requested page
&#36;text = implode('', file(&#36;page . '.wiki.txt'));
 
// create a Wiki objext with the loaded options
&#36;wiki = new Text_Wiki(&#36;options);
 
// transform the wiki text.
echo &#36;wiki->transform(&#36;text);
?>

その他のコードタイプには<code type="html">...</code>があります。


テーブル

垂直バー2つで囲むことでテーブルを作成できます。

|| セル1 || セル2 ||
|||| 隣セルと合体 ||
|| セル4 || セル5 ||
|| セル6 || ここには長いテキストのセルをつくってみる ||

セル1 セル2
隣セルと合体
セル4 セル5
セル6 ここには長いテキストのセルをつくってみる

|| lines must start and end || with double vertical bars || nothing ||
|| cells are separated by || double vertical bars || nothing ||
|||| you can span multiple columns by || starting each cell ||
|| with extra cell |||| separators ||
|||||| but perhaps an example is the easiest way to see ||

lines must start and end with double vertical bars nothing
cells are separated by double vertical bars nothing
you can span multiple columns by

その他のコードタイプには<code type="html">...</code>があります。


テーブル

垂直バー2つで囲むことでテーブルを作成できます。

|| セル1 || セル2 ||
|||| 隣セルと合体 ||
|| セル4 || セル5 ||
|| セル6 || ここには長いテキストのセルをつくってみる ||

セル1 セル2
隣セルと合体
セル4 セル5
セル6 ここには長いテキストのセルをつくってみる

|| lines must start and end || with double vertical bars || nothing ||
|| cells are separated by || double vertical bars || nothing ||
|||| you can span multiple columns by || starting each cell ||
|| with extra cell |||| separators ||
|||||| but perhaps an example is the easiest way to see ||

lines must start and end with double vertical bars nothing
cells are separated by double vertical bars nothing
you can span multiple columns by starting each cell
with extra cell separators

テーブル

垂直バー2つで囲むことでテーブルを作成できます。

|| セル1 || セル2 ||
|||| 隣セルと合体 ||
|| セル4 || セル5 ||
|| セル6 || ここには長いテキストのセルをつくってみる ||

セル1 セル2
隣セルと合体
セル4 セル5
セル6 ここには長いテキストのセルをつくってみる

|| lines must start and end || with double vertical bars || nothing ||
|| cells are separated by || double vertical bars || nothing ||
|||| you can span multiple columns by || starting each cell ||
|| with extra cell |||| separators ||
|||||| but perhaps an example is the easiest way to see ||

lines must start and end with double vertical bars nothing
cells are separated by double vertical bars nothing
you can span multiple columns by starting each cell
with extra cell separators
but perhaps an example is the easiest way to see