DokuWiki 的基本使用

DokuWiki 语法

用 wiki 语法编辑,参见 DokuWiki 语法DokuWiki Syntax, 或安装后自带的 语法页面

您可以查看页面源码来学习 DoduWiki 的语法,方法是: 单击页面中的 显示源码

语法加亮

DokuWiki 可以将源代码作语法高亮以增加可读性。DokuWiki 使用 GeSHi 通用语法高亮工具(Generic Syntax Highlighter)—— 所有被 GeSHi 支持的语言都可以在 DokuWiki 中得到高亮。使用 code 标记时需要指定使用的语言,例如: <code java>

/**
 * The HelloWorldApp class implements an application that
 * simply displays "Hello World!" to the standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); //Display the string.
    }
}

当前 DokuWiki 可以支持的语言有: abap actionscript-french, actionscript, ada, apache, applescript, asm, asp, autoit, bash, basic4gl, blitzbasic, bnf, caddcl, cadlisp, cfdg, cfm, c_mac, c, cpp, cpp-qt, csharp, css, delphi, diff, div, dos, dot, d, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html, idl, ini, inno, io, java5, java, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, perl, per, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vbnet, vb, vhdl, visualfoxpro, winbatch, xml, xpp, z80

RSS/ATOM Feed Aggregation

DokuWiki 能使用外部 XML feeds 整合数据。 为了解析 XML feeds,使用了 SimplePie。 SimplePie 能认知的所有格式都能被 DokuWiki 使用。 你可以添加多个以空格间隔的参数来影响 SimplePie 的解析输出。

参数 说明
any number 指定显示条目的最大值, 默认值为 8
reverse 逆序输出,即将 XML feeds 中的第一个条目显示为最后一个
author 显示条目的作者名
date 显示条目的日期
description 显示条目的描述信息。若 HTML 没有开启,则 所有的 HTML 标签将被删除
n[dhm] 刷新周期,单位为 d=days, h=hours, m=minutes. (e.g. 12h = 12 hours)。

默认的说新周期是 4 小时。所有低于 10 分钟的周期均视为 10 分钟。DokuWiki 一般会生成页面的缓存版本。很明显,当页面包含外部动态内容时,缓存版本就不适用了。 此处指定的参数会告知 DokuWiki 重新生成页面——如果访问页面的时间与上一次页面生成的时间间隔大于指定的刷新周期。

Example:

{{rss>http://slashdot.org/index.rss 5 author date 1d }}

使用页面模版

DokuWiki 支持每个命名空间(namespace)的页面模版。namespace 映射到文件系统上就是目录,所以可以在 data/pages 下的每个目录中分别创建该 namespace 下所有页面的模版。页面模版的文件名称约定为 _template.txt

由于 DokuWiki 默认情况下不允许编辑以 _ 开头的文件,所以要在本地编辑该文件然后上传。

_template.txt 除了可以使用 wiki 语法之外,还支持如下的变量:

@ID@ full ID of the page
@NS@ namespace of the page
@PAGE@ page name (ID without namespace and underscores replaced by spaces)
@USER@ ID of user who is creating the page
@NAME@ name of user who is creating the page
@MAIL@ mail address of user who is creating the page
@DATE@ date and time when edit session started

参考

屏蔽默认特性

  • 默认情况下,DokuWiki 将在系统的 data/cache 目录下缓存页面。 若不缓存某页面,则需在编辑页面时将 ~~NOCACHE~~ 写入页首
  • 默认情况下,DokuWiki 将显示每页的目录。若不显示某页的目录,则需在编辑页面时将 ~~NOTOC~~ 写入页首
  • 有些字符或字符串是 Wiki 的语法字符,若只想显示其本身而不被 Wiki 引擎解析,有两种方法
    • 两端使用 %% 将内容括起来
    • 使用 <nowiki> 和 </nowiki> 将内容括起来
  • Bookmark at
  • Bookmark "DokuWiki 的基本使用" at del.icio.us
  • Bookmark "DokuWiki 的基本使用" at Digg
  • Bookmark "DokuWiki 的基本使用" at Furl
  • Bookmark "DokuWiki 的基本使用" at Reddit
  • Bookmark "DokuWiki 的基本使用" at Ask
  • Bookmark "DokuWiki 的基本使用" at BlinkList
  • Bookmark "DokuWiki 的基本使用" at blogmarks
  • Bookmark "DokuWiki 的基本使用" at Blogg-Buzz
  • Bookmark "DokuWiki 的基本使用" at Google
  • Bookmark "DokuWiki 的基本使用" at Ma.gnolia
  • Bookmark "DokuWiki 的基本使用" at Netscape
  • Bookmark "DokuWiki 的基本使用" at ppnow
  • Bookmark "DokuWiki 的基本使用" at Rojo
  • Bookmark "DokuWiki 的基本使用" at Shadows
  • Bookmark "DokuWiki 的基本使用" at Simpy
  • Bookmark "DokuWiki 的基本使用" at Socializer
  • Bookmark "DokuWiki 的基本使用" at Spurl
  • Bookmark "DokuWiki 的基本使用" at StumbleUpon
  • Bookmark "DokuWiki 的基本使用" at Tailrank
  • Bookmark "DokuWiki 的基本使用" at Technorati
  • Bookmark "DokuWiki 的基本使用" at Live Bookmarks
  • Bookmark "DokuWiki 的基本使用" at Wists
  • Bookmark "DokuWiki 的基本使用" at Yahoo! Myweb
  • Bookmark "DokuWiki 的基本使用" at BobrDobr
  • Bookmark "DokuWiki 的基本使用" at Memori
  • Bookmark "DokuWiki 的基本使用" at Faves
  • Bookmark "DokuWiki 的基本使用" at Favorites
  • Bookmark "DokuWiki 的基本使用" at Facebook
  • Bookmark "DokuWiki 的基本使用" at Newsvine
  • Bookmark "DokuWiki 的基本使用" at Yahoo! Bookmarks
  • Bookmark "DokuWiki 的基本使用" at Twitter
  • Bookmark "DokuWiki 的基本使用" at myAOL
  • Bookmark "DokuWiki 的基本使用" at Slashdot
  • Bookmark "DokuWiki 的基本使用" at Fark
  • Bookmark "DokuWiki 的基本使用" at RawSugar
  • Bookmark "DokuWiki 的基本使用" at LinkaGoGo
  • Bookmark "DokuWiki 的基本使用" at Mister Wong
  • Bookmark "DokuWiki 的基本使用" at Wink
  • Bookmark "DokuWiki 的基本使用" at BackFlip
  • Bookmark "DokuWiki 的基本使用" at Diigo
  • Bookmark "DokuWiki 的基本使用" at Segnalo
  • Bookmark "DokuWiki 的基本使用" at Netvouz
  • Bookmark "DokuWiki 的基本使用" at DropJack
  • Bookmark "DokuWiki 的基本使用" at Feed Me Links
  • Bookmark "DokuWiki 的基本使用" at funP
  • Bookmark "DokuWiki 的基本使用" at HEMiDEMi
guide/dokuwiki/dokuwiki_general_usage.txt · 最后更改: 2008/06/18 23:54 由 osmond
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki