目录
Blog Plugin
—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news
downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog
Description
The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.
Installation
| Download | plugin-blog.tgz |
|---|---|
| BundleHub | Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include: BlogSuite BundleHub Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features. |
| Tips | If you intend to use this plugin be sure to take a look at the blogging tips page |
Syntax
Blog
| [namespace] | namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the blog namespace set in the configuration |
|---|---|---|
| [number] | number of entries to show per page | optional; default is 5 |
| [flags] | flags are delimited by & | |
| all Include plugin flags are supported | optional | |
Form placement: topform/bottomform/noform | optional, default is topform |
|
Custom new-entry form title: newentrytitle=Custom title | optional, can also be set as a configuration option | |
Hide paging controls: nopagingcontrols | optional |
This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.
Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.
Archive
| [namespace] | the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the namespace specified in the configuration |
|---|---|---|
| [month] | the month for the archive list in YYYY-MM format; * for all pages | required |
| [flags] | pagelist flags delimited by &, see flags | optional |
| [username] | username of an author | optional |
Shows a table with all pages of the given namespace that were created in the specified month.
Creates an automatic archive.
Configuration and Settings
The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.
namespace | The default namespace which is used if no namespace was given in the syntax |
|---|---|
formposition | You can choose to display the new entry form either above or below the blog entries |
newentrytitle | Set a custom title for all new entry forms. This can also be set on individual blog forms. |
dateprefix | A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d |
sortkey | Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline) |
sortorder | Sort the blog entries ascending/descending |
excluded_pages | Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings. To exclude both start and rightsidebar directly below :blog use !(^|:)blog:(start|rightsidebar)$! |
showhistogram | Display a histogram in normal archive mode (not for autoarchive) |
max_months | Maximum number of months to show in the histogram |
histogram_height | Height of the histogram (in pixels) |
Changes
* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax
- the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
- the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the
~~NOCACHE~~macro can be used if this is needed.
Development
Change Log
- Merge pull request #126 from dokuwiki-translate/lang_update_848_17143… (2024/05/01 23:45)
- translation update (2024/04/29 14:20)
- Version upped (2023/10/25 05:50)
- Merge pull request #121 from fiwswe/fix_issue_120 (2023/10/25 01:51)
- Rename constructor (2023/10/24 18:10)
- Merge pull request #118 from dokuwiki-translate/lang_update_564_16764… (2023/02/17 03:25)
- translation update (2023/02/15 08:35)
- Merge pull request #117 from dokuwiki-translate/lang_update_551_16745… (2023/01/25 04:45)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
FAQ
Please also have a look at the blogging tips page!
My dates are shown wrong. What can I do?
Make sure you run the latest version of all required plugins and DokuWiki.
Is it possible to change the way the date is displayed?
Yes, the plugin uses the dformat option to format the date.
How can I alter the date of a blog post?
You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.
Is it possible to show table of contents?
The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.
The header is always a link to the page even though it's disabled in the include plugin settings
The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.
Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?
I think I solved myself.
In the blog mark, use the following flags
This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines
the excluded_pages does not work
In the blog mark ,use the following flags
备忘录
本站dokuwiki版本:dokuwiki-2018-04-22 3658kb
tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip
Helper plugin pagelist is not available or invalid.
blog版本 2013 by Michael Hamann,需要include插件
随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what
2026-2-5 08:25:31
安全
DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。
DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。
该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。
编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:
提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。
所有的以前的安全问题可以在这里找到。
根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。
你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。
编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。
如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。
以下目录不应该从网络直接访问:
data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。
如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。
编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。
编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。
打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法
打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码
web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>
<system.webServer>
<security>
<requestFiltering>
<filteringRules>
</filteringRules>
<alwaysAllowedUrls>
<add url="/data/media/" />
</alwaysAllowedUrls>
<denyUrlSequences>
<add sequence="/data/" />
<add sequence="/conf/" />
<add sequence="/bin/" />
<add sequence="/inc/" />
</denyUrlSequences>
</requestFiltering>
</security>
</system.webServer>
</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。
data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:
$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:
inc/preload.php <?php
define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。
inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。
编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。
allowdebug – 禁止调试输出,以避免系统信息泄露
fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。
fetchsize – 配置外部数据缓存
fullpath – 显示页面的完整路径名
所有的 验证设置
usewordblock – 通过黑名单,防止垃圾邮件
mailguard – 避免收集邮件地址的机器人
iexssprotect – 在 IE 中防范跨站脚本问题
htmlok – 开启 HTML
phpok – 开启 PHP
hidepages – 在索引和搜索中隐藏特定页面
safemodehack – 解决安全模式的限制
编辑
插件安全
DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。
这里有一些提示,帮助你选择你想要安装的插件。
如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读
https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。
设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.
2026-2-5 06:46:08
Tips and Tricks for DokuWiki
This is the place to collect all your Tips and Tricks for DokuWiki Usage.
Steps for reorganization:
- Add a description to each page, and categorize within this page. Almost done.
- Review external links to remove broken ones, maybe integrate external link to have all content on dokuwiki.org
If possible please rewrite content, and remove old things.
NOTE to translators: When updating your tips page, please use the index button to see what pages are within your locale :tips namespace. And please do include them into the tips page. Thank you.
Usage Tips
| Link | Short Description |
|---|---|
| TailorWikiRules | Best-practices to follow after installing DokuWiki |
| Syncing with Unison | Sync two wikis using unison |
| timezone | Set the server's Timezone |
| mailconfig | Tips on making mail work |
| commonlogin | Sharing authentication data between wikis on the same server |
| Displaying blank rows in tables | Displaying blank rows in tables |
| Good Style | Hints on how to have good styles on DokuWiki |
| Accessibility | Accessibility tips for editors |
| upgrading_old_versions | How to upgrade from old DokuWiki (2005-*) |
| ShowMediaFromExternalUpload | How to make files uploaded by other ways than mediamanager to appear |
Extending the Syntax
Most of these tips need to be adjusted for the new Parser and will not work out of the box. They may be better implemented by using the new plugin system though.
| Link | Short Description |
|---|---|
| magnet links | Show DC++ magnet links as external |
| links-to-dokuwiki-commands | Make links to “DokuWiki actions” (?do=) from within your wiki content, aka. Action Modes, aka. Action Links (in general, URL tags) |
| tex_howto | This patch (to 2005-05-07 version) add AMSLaTeX mathematical expression support to DokuWiki |
Extending Layout and Styling
Some of these tips may be implemented better by using the new template mechanism. You are encouraged to rewrite them accordingly.
| Link | Short Description |
|---|---|
| Top Bar | Add a topbar like on dokuwiki.org |
| CustomQuoting | Change the style of Quoting |
| format_user | Using CN from client certificate when displaying username |
| Disabling link icons | Disables interwiki and non-wiki link icons |
| Descriptions in RSS aggregator | Add the beginning of every RSS article in the list |
| Code CSS | CSS for use with Syntax Highlighting |
| geshi_style_builder | Geshi Style builder |
| XHTML5 | How to switch to XHTML 5 |
| XHTML Strict | How to switch to XHTML 1.0 Strict |
| Toc use position fixed | When the user scrolls the page, the TOC does not scroll with it, the TOC is fixed. |
| numbered headings | Numbered headings per CSS only |
| back to top | back to top before every header |
| Local links with icons | Local links with icons |
| Custom SVG icons | Create your custom multi-color SVG icons for your DokuWiki |
| image-in-the-upper-right-corner | replace top right DokuWiki logo by your own |
| code-in-ordered-lists | Including Code in Ordered Lists |
| tableswithrowspans2 | Tables with Rowspan Support |
| Tables with Rowspan | Another way of providing Rowspan support in tables. |
| rowspansfix | Yet another way to make rowspan possible |
| rowspansfix2 | Yet another way to make rowspan possible |
| Adjust iframe heights | An additional JavaScript for the iframe plugin to make iframes as high as needed for their content |
| Using CSS to Style Headers | General tips, case uses and structure info for styling headers with CSS. |
| Display the changes for each entry in the recent list | Display a diff of the last and the current version for each entry in the recent list]] |
| printpreview | Preview of the wiki body; Usage for printing or fullscreen-mode |
| double-click-to-edit | Double Click to Open a Section Edit (improved) |
| Simple Columns | Implementation of columns without plugins |
| Button Align | How to align a <button> element? |
| Additional InterWiki Shortcuts | Share Your InterWiki Shortcuts |
| Hyphenations within headings and link texts (sorry, German only | Hyphenations within headings and link texts (German: Worttrennungen innerhalb von Überschriften und Linktexten) |
Adding new Functionality
| Link | Short Description |
|---|---|
| Auto Subscribe a Mailinglist | Auto Subscribe a user to a mailinglist after registration |
| Better Email Notifications | Receive HTML-formatted email notifications for page changes |
| Clean Notification Scheme | Clarify notification scheme: namespace subscribers on new page, page subscribers on update |
| IP-based ACLs | Assign access rights based on IP or network of the connecting client. |
| BrowserLanguageDetection | Change the UI language automatically |
| transliteration | Transliterate Cyrillic texts to Latin |
| PDF Export | PDF export using html2ps and pstopdf |
Print View Button Login needed | make use of ?do=export_html |
| tpl_button for print view | Adds an tpl_button for print_view |
User Link Login needed | use an extra wiki-page for users |
| StickyExportHtml | Make do=export_html “sticky” for HTML-only browsing |
| Html only view | Similar to previous. uses .htaccess rewrite for that |
| discussion | Creates a link or button in your template that leads to a separate discussion-page (like e.g. Wikipedia does provide) |
| safely include php code | Allow PHP code to be included in pages created by superuser only |
| Page Statistics | Add page and media file logging to DokuWiki |
| Tiny Page Logging | Add simple logging to DokuWiki |
| NLS | Adding unofficial National Language Support (NLS) for DokuWiki |
| Summary Enforcement | Require the user to enter a summary (or check minor edit) |
| ToolbarButton | How to add your own button to the toolbar |
| homepages | Autocreate user homepages when add/modify user accounts |
| wordcounter | Add a word-/charcounter to the edit form |
| mediamanager and filesize | Append the size of the mediamanager selected file to the wikilink |
| media_attached | media upload is attached to each page |
| template_chooser | A simple dropdown box in editmode allows you to paste content from a template into the current document |
| login_instead_of_forbidden | Show the login form when accessing a restricted page |
| display_acls | Display ACLs in page footer |
| action_menu | Action menu like in MoinMoin Wiki |
| export_html | Export multiple pages to HTML |
| newssystem | A News System. Based on this a plugin was developed: a NEWS System. |
| subscription | Prevent Email Of Changes to Subscribed Author |
| phashLogin | Allows “GET” login with a phash password. Useful with RSS readers for example. |
| Integrate TinyURL | Automatically create a short URL for every page |
| Filter Recent Changes | Allows you to filter the list of 'Recent Changes' by username (for version 2009-02-14) |
| Separate Admin Login | Use a special admin login, which cannot read or edit pages |
| User Pages | Give everyone AUTH_EDIT on a page within a special namespace, where that page is their name |
| ClickNShow | Hide/Show Headers clicking on them |
| Minor Edit by default | Set the “Minor Edit” check mark by default |
| viewcounter | Adds a simple pageview counter |
| Make a book | How to make a book with DokuWiki |
| Namespace Clouds | DokuWiki Cloud Plugin Namespace Discrimination Patch |
| Copy Section Link | An easy way to copy each section link (with JavaScript) |
| pageaccueil | Creates a home page that lists categories of wiki to create a new page in the category chosen. Also allows to Create a new category. |
Integration with Other Software
Auth Plugins let you authenticate in DokuWiki with credentials of other software platforms. Look for available Auth Plugins in the plugin repository.
Others
| Link | Short Description |
|---|---|
| Synchronise with Tomboy | How to synchronize Tomboy with DokuWiki |
| Integrate DokuWiki to your website | As read-only pages |
| Edit DokuWiki with text editors using FUSE and Python | Untested and potentially buggy. |
Researchr (broken) | Framework for integrating DokuWiki with BibDesk and Skim for academic note taking and citation management |
Interacting scripts and tools
| Link | Short Description |
|---|---|
| DokuWiki Setup | Easy/automatic installation/upgrade - also fixing safe-mode issues |
| Maintenance | Cronjobs to keep your wiki clean |
| Backup Script | A small shellscript to backup your wiki data and media, including rotation. |
| BackupToS3 | A small ruby script to backup your wiki to Amazon's data storage system S3. |
| UpgradeScript | A small script to make DokuWiki updates simpler |
| Weblog bookmarklet | A JavaScript/PHP combination to post in DokuWiki like regular weblogs |
| imap2wiki | A small PHP script to give users the opportunity to post by email |
| DokuVimKi | VIM Plugin that allows editing of wiki pages over XML-RPC + Syntax highlighting for DokuWiki syntax |
| vimkeys | Key Bindings for [G]Vim |
| fixperms.php | make webserver created files writable by everyone |
| mail2page | create pages and upload media by email |
| romanize | romanize files in datadir |
| DokuWiki2HtmlHelp | Converts a DokuWiki website into a Compiled HTML Help file (.chm) complete with table of contents and index |
| jEdit | An edit mode for jEdit that does syntax highlighting for headlines, character formats, lists and links |
| CLI | DokuWiki command line utilities |
| recreate wiki change log | How to recreate your wiki change log from individual page change logs |
| readINIfile | How to solve problem with parse_ini_file disabled |
| fixmtime | Fix modification times based on timestamps (to avoid the external edit syndrome) |
| clean_acl | Clean up non-existing users and pages in the ACL |
| Clean Media Directory | A little Perl script to clean up orphaned files in the Media-Directory |
| Logging in to retrieve pages with cURL | Quick howto on retrieving pages that require logging in with curl. |
| Extract external links | A small PHP script to extract all external links (with surrounding context) from the wiki |
| Add an Autolink page | A small Perl Script to (re)builds link on chosen words each nights |
| Automatic build reports | A bash script that compiles/builds a project and reports the result to the wiki |
| GourceDoku | Picture of the edition of a wiki with Gource |
| topcontributors | A shell snippet to create a list of the top contributors to the wiki |
| locateorphanmedia | How to get a listing of all orphaned media ie.: media files that are not linked to in your wiki |
| Page Annotate | A script to give you idea who edited which line in page. Uses git as a tool to do the trick |
| Mysql For All | An off-wiki webpage script to provide users the ability to generate mysql queries for use in wiki plugins. Users do not need to know the database structure or mysql syntax. |
Dokuwiki orphans (broken) | Help you find pages with no links towards them and links to non existant pages in order to keep your Wiki clean. |
| User Maintenance | Maintain inactive accounts |
Importing from External Sources
Wikis
| Source Wiki | Description |
|---|---|
| ChuWiki | A Python script for ChuWiki conversion |
| ErfurtWiki | A PHP script for ewiki (ErfurtWiki) conversion |
| JSPWiki | A plugin to import JSPWiki pages |
| JSPWiki (again) | A pair of scripts to convert a directory of JSPWiki pages |
| MediaWiki | Converts MediaWiki to DokuWiki |
| MoinMoin | Python and PHP scripts for MoinMoin conversion. |
| Perspective | A python script, must be run from Windows |
| TikiWiki | A PHP script for TikiWiki conversion. |
| trac | A PHP script for trac's wiki conversion |
| TWiki | A TWiki to DokuWiki conversion script |
| Wakka Wiki | A Perl script for Wakka Wiki conversion |
| Zwiki | A Perl script for Zwiki conversion |
| docpdf2dokuwiki | A Perl script for importing pdf and doc |
| Atlassian Confluence | A Perl script for Atlassian Confluence conversion |
Other
| Link | Description |
|---|---|
| uploadcodedir | Uploading a directory of code to DokuWiki |
| table_editing | How to import your data into tables |
| Wikemail | a script to import email into DokuWiki |
| OpenOffice Macro | converts an OpenOffice document to DokuWiki format |
| OpenOffice v2 Macro | converts an OpenOffice document to DokuWiki format, adapted for OOo v2 |
| OpenOfficeMacro | both of the above macros do not convert embedded pictures - this one does |
| Writer2Dokuwiki | converts an OpenOffice document to DokuWiki format (doesnt fully support lists) |
| Writer2Dokuwiki (IT-Bayer's version) (in German) | converts an OpenOffice document to DokuWiki format |
| Calc2Dokuwiki | Exports selected ranges of cells from OpenOffice.org Calc into tables formatted in DokuWiki code. Tool available as an extension (OOo 2.1.x) and a macro (OOo 1.x-2.x) |
| HTMLtoWiki | How to convert HTML to DokuWiki Formatting Syntax |
| Excel to DokuWiki converter | This makro based tool contains parameters on first worksheet to allow the user some customization. Paste your table into another worksheet, select the cells as usual and run the makro to Export it as DW Syntax including styling. Information also available here within DokuWiki at: Excel Macro |
| csv2dwt | A script that converts Comma Separated Values (CSV) to DokuWiki's Table format (DWT) |
| csv2dokuwiki | Converts CSV input (tab separated) into DokuWiki's table syntax (in Java) |
| xls2wiki | A script that converts XLS copied data to DokuWiki's Table format (DWT) and vice versa |
| doc to wiki syntax | Convert folders with Ms Word Doc files to DokuWiki Syntax |
| Word to Dokuwiki converter | Here you can download the latest Version of this Doc containing the makro to Export it as DW Syntax. Some Information provided here within the DokuWiki at word makro. Former versions provided by Tania Hew ⇒ Word to DokuWiki Converter improves upon the two macros above as it is a Word template that allows one to click a button in MS Word to convert a Word document, including images, to DokuWiki format (see Portfolio section on website) |
| Word Macro adaptation | converts an MS Word document to DokuWiki format - improved conversion (for English Word) plus adaptation for German Word |
| word2wiki | Convert Microsoft Word document content to Wiki markup |
| google sheets macro | Google Apps Script for exporting a selected cell range to DokuWiki |
| wordpress user export | How to run a query to export users from Wordpress that can be imported in DokuWiki |
Miscellaneous
| Link | Description |
|---|---|
| blacklist_test | This little script helps to check a text against the blacklist |
| blogging | This page describes the steps necessary to get you started with blogging in DokuWiki |
| bookmarklets | JavaScript based wiki page editing helpers |
| default text search | Add default text for the search box |
| disabled_functions | Patch if your webhost doesn't support glob or readfile |
| DwExport | DokuWiki export to static HTML pages including images and CSS formatting. ⇒ http://sourceforge.net/projects/dwexport/ Only v0.2 |
| farm | How to make DokuWiki a wiki farm |
| simplegooglesearch | Replace DokuWiki internal search form with Google search |
| spell_checker_713 | Aspell Personal Wordlists and Release 2005-07-13 (seems old) |
| svg.php | This is a plugin to DokuWiki to allow collaborative generation of SVG images. (Make it a plugin if possible/useful) |
| utf8update | DokuWiki UTF8 conversion |
| export2twiki | Convert DokuWiki syntax into twiki format for exporting |
| phpwithgd | This page describes how to solve issues caused by missing gdlib support in PHP |
How To
No plugin or modifications needed.
| Link | Description |
|---|---|
| weather | Show weather info from https://wttr.in/ |
2026-2-5 06:44:55
DokuWiki 格式语法
DokuWiki 支持一些简单的标记语言, 以尽可能使源文件也具有可读性。本页面包含了所有您在编辑页面时可能用到的语法的说明。如果需要查看本页源码,只需要点击页面顶部或者底部的 编辑本页 按钮即可。 如果您是初尝维基,那么可以使用维基涂鸦板来尽情挥洒。通过工具条快捷按钮,您可以方便地使用这些标记。
基本文本格式
DokuWiki 支持 粗体, 斜体, 下划线 以及 等宽体 等格式。 当然,你也可以 混合使用 这些格式。
DokuWiki支持 **粗体**, //斜体//, __下划线__ 以及 ''等宽体'' 等格式。 当然,你也可以 **__//''混合使用''//__** 这些格式。
可以使用 下标 和 上标。
可以使用 <sub>下标</sub> 和 <sup>上标</sup>。
您也可以使用 删除线 标记某些信息。
您也可以使用 <del>删除线</del> 标记某些信息。
段落 是由空行所建立的。如果您想 强制建立新行 而不建立段落,您可以使用两个连续的反斜杠+空格或是回车作为标记。请看样例:
这是一些有着换行标记的文字。
请注意
反斜杠只在回车符之前
或者在
一个空格之前的时候才有效。 \\而这样就并不起作用。
这是一些有着换行标记的文字。\\ 请注意 反斜杠只在回车符之前\\ 或者在\\ 一个空格之前的时候才有效。 \\而这样就并不起作用。
请只在必须的时候才使用强制的换行标记。
链接
DokuWiki 支持多种形式的链接。
外部链接
外部链接会被自动地识别:http://www.google.com 或者简单地写作 www.google.com - 当然您也可以为链接设置名字:链接到google。类似这样的电子邮件地址: andi@splitbrain.org 也可以被识别。
DokuWiki支持多种形式的链接。外部链接会被自动地识别: http://www.google.com 或者简单地写作 www.google.com - 当然您也可以为链接设置名字: [[http://www.google.com|链接到google]]。 类似这样的电子邮件地址: <andi@splitbrain.org> 也可以被识别。
内部链接
内部链接可以用方括号创建。您可以只给出链接的地址:pagename,也可以附加上链接的名字:我的链接。
内部链接可以用方括号创建。您可以只给出链接的地址:[[pagename]], 也可以附加上链接的名字:[[pagename|我的链接]]。
维基页面名 将会被自动地识别为小写字母,并且不允许使用特殊字符。
您可以通过在页面名中使用冒号的方式来使用 命名空间。
您可以通过在页面名中使用冒号的方式来使用 [[wiki:namespaces|命名空间]]。
如果您需要关于命名空间(namespaces)的更详细的信息,请参见 命名空间。
您也可以链接到一个网页内部的某一节,只需要将该节书签的名称以一个#号分隔加在网页的地址后面即可。这是一个连向 本节 的链接。
这是一个指向 [[syntax#内部链接|本节]] 的链接。
注:
- 当一节的标题改变时,该节的书签也会改变,因此,请不要太依赖页面内的链接。
维基间链接
DokuWiki 支持维基间链接,即到其他维基的链接。例如,这是一个到维基百科上关于“维基”的一个页面链接: Wiki 。
DokuWiki 支持[[interwiki|维基间链接]],即到其他维基的链接。 例如,这是一个到维基百科上关于“维基”的一个页面链接: [[wp>Wiki]] 。
Windows 文件夹共享
Windows 文件夹共享,例如 this 也可以被识别。请注意,这只在内部 局域网 等环境中才可能被成功访问。
Windows共享文件夹,例如 [[\\server\share|this]] 也可以被识别。
注:
- 出于安全原因,只有在微软IE浏览器上才能够直接访问 Windows 文件夹共享。 (且只适用于局域网内部环境).
- Mozilla 和 Firefox 可采用 Mozilla 知识库 中提到的方法实现此功能. 但是,在打开 Windows 共享时仍然弹出 JavaScript 警告。如需为所有用户删除这个警告, 请将本行代码加入
conf/lang/en/lang.php中 (详情见 localization):- conf/lang/en/lang.php
<?php /** * Customization of the english language file * Copy only the strings that needs to be modified */ $lang['js']['nosmblinks'] = '';
图像链接
您也可以用图像来作为一个内部或者外部的链接,只需同时使用链接和图像的语法,如下所示:
[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
请注意:在链接名中使用语法,只有显示图像的语法会被识别,请不要使用其它语法。
DokuWiki 支持完整的图像及[#links|链接]]预发,包括调整图像大小、内部和外部的图像链接,以及wiki内链接。
脚注
您可以使用两个连续小括号来添加脚注1)。
您可以使用两个连续小括号来添加脚注((看这里,这是一个脚注))。
标题段落
您可以使用最多达5层的标题来使您的页面更富结构性。如果您使用了三个以上的标题,那么 DokuWiki 会自动在页面上生成一个名为“本页目录”的标题列表。当然,您也可以关闭这项特性,只需在编辑时在页面里加入 ~~NOTOC~~ 字样即可。
H3标题
H4标题
H5标题
==== H3标题 ==== === H4标题 === == H5标题 ==
您可以通过连续的4个以上“-”号来创建一条水平分割线:
图像和其它文件
您可以使用双大括号来在页面中加入 图像,视频及声音文件 。您还可以选择是否指定图像的显示大小。
指定宽度和高度(200×50)2):
原始大小: {{wiki:dokuwiki-128.png}}
指定宽度(50 pixel): {{wiki:dokuwiki-128.png?50}}
指定宽度和高度(200×50): {{wiki:dokuwiki-128.png?200*50}}
重新指定宽度和高度的外部图像(100x100): {{http://de3.php.net/images/php.gif?200x50}}
使用左方或者右方的空格,您可以选择对齐方式:
{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}
当然,您也可以指定一个图像的名字,将鼠标移到图像上可以看到效果。
{{ wiki:dokuwiki-128.png |这是图像的名字}}
如果您指定的文件名(无论是外部的还是内部的)不是一个图像(gif,jpeg,png),那么它将被显示为一个链接。
支持的媒体格式
DokuWiki 可以直接在页面中嵌入以下格式.
| 图像 | gif, jpg, png |
| 视频 | webm, ogv, mp4 |
| 音频 | ogg, mp3, wav |
| Flash | swf |
如果指定不支持的媒体格式的文件名,则它将作为链接显示。
加上 ?linkonly 就会在网页中只显示链接,不显示内容。
{{wiki:dokuwiki-128.png?linkonly}}
dokuwiki-128.png 这是一个图片的链接。
备用的文件格式
并非所有浏览器都支持所有的视频和音频格式,要解决这个问题,你可以上传不同的文件格式,以获得最大的浏览器兼容性。
例如有一个 mp4 的视频文件:
{{video.mp4|一个很有意思的视频}}
如果同时上传了 video.webm 和 video.ogv 到与 video.mp4 相同的命名空间的话, DokuWiki 会自动识别为备用的文件格式,并选择一个最适合当前浏览器的文件格式。
此外,DokuWiki 也支持“视频海报”,可以在视频播放前显示制定的图片。该图片必须与视频文件名相同,并且为 jpg 和 png格式。
列表
Dokuwiki 支持带编号或不带编号的列表。要使用列表,在文字前加入两个空格,然后使用*标志不带编号的列表,用-标志带编号的列表。
- 列表
- 第二项
- 下一层
- 第三项
- 带编号的列表
- 第二项
- 用缩进表示更深的层
- 完了
* 列表
* 第二项
* 下一层
* 第三项
- 带编号的列表
- 第二项
- 用缩进表示更深的层
- 完了
同时可以关注 列表项目常见问题解答.
文本转换
DokuWiki 可以将预定义的字符或者字符串转换成图片、其他文本或 HTML。
文本到图片的转换,主要用作表情符号。文本到 HTML 的转换,多用於显示符号替换,但也可以配置为使用其他 HTML。
表情符号
DokuWiki 会将一些常用的 表情符号 转换为图像。除了默认的表情符号以外,您也可以在 Smileys 文件夹中放入更多的表情图,然后在 conf/smileys.conf 中设置它们即可。下面是 Dokuwiki 包含了的表情图像:
8-)
8-O
:-(
:-)
=)
:-/
:-\
:-?
:-D
:-P
:-O
:-X
:-|
;-)
^_^
:?:
:!:
LOL
FIXME
DELETEME
印刷样式
DokuWiki 可以将特定字符转换为印刷时所用的样式。下面是可以识别的这类字符的列表:
→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® “He thought 'It's a man's world'…”
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..."
请注意:在配置文件中可以禁用这类自动转换。
层次显示
有时候(特别是讨论时)您想把某些文字(尤为各次的回复)标示作不同的层次,您可以使用下列的语法:
我认为我们应该一起行动 > 不行,不能一起行动 >> 嗯……,我感觉能行 > 真的吗? >> 是! >>> 那么,一起行动吧!
我认为我们应该一起行动
不行,不能一起行动
嗯……,我感觉能行
真的吗?
是!
那么,一起行动吧!
表格
DokuWiki 可以用简单的语法创建表格。
| 标题 1 | 标题 2 | 标题 3 |
|---|---|---|
| (WOK) | (1,2) | (1,3) |
| (2,1) | 展宽的单元格 | |
| (3,1) | (3,2) | (3,3) |
表格的每一行都以分隔符 | (普通行)或者 ^ (标题行)作为开头和结束。
^ 标题 1 ^ 标题 2 ^ 标题 3 ^ | (1,1) | (1,2) | (1,3) | | (2,1) | 展宽的单元格 || | (3,1) | (3,2) | (3,3) |
要水平合并单元格,只需要将后一个单元格设置为空即可,如上面演示的一样。请确保每一行有相同数量的单元格分隔符!
竖直的标题列也是可以实现的:
| 标题 1 | 标题 2 | |
|---|---|---|
| 标题 3 | (1,2) | (1,3) |
| 标题 4 | 不再合并单元格 | |
| 标题 5 | (2,2) | (2,3) |
可以看到,单元格前面的分隔符决定了单元格的格式。
| ^ 标题 1 ^ 标题 2 ^ ^ 标题 3 | (1,2) | (1,3) | ^ 标题 4 | 不再合并单元格 | | ^ 标题 5 | (2,2) | (2,3) |
您也可以垂直合并两格或多格。只要在下面的格内输入:::即可
| 标题 1 | 标题 2 | 标题 3 |
|---|---|---|
| (1,0) | 这次示范垂直合并 | (1,3) |
| (2,1) | (2,3) | |
| (3,1) | (3,3) |
除跨行合并语法:::外,单元格中不能包含其他内容。
^ 标题 1 ^ 标题 2 ^ 标题 3 ^ | (1,1) | 这次示范垂直合并 | (1,3) | | (2,1) | ::: | (2,3) | | (3,1) | ::: | (3,3) |
您可以对齐表格的文字。只需要添加多余两个的空格在您需要对齐的方向的反向即可:如果需要右对齐,在左边添加两个空格;反之,则在右边添加。在两边均添加空格可以实现中间对齐。
| 有对齐的表格 | ||
|---|---|---|
| 右对齐 | 居中 | 左对齐 |
| 左对齐 | 右对齐 | 居中 |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
下面是源文件中的格式:
^ 有对齐的表格 ^^^ | 右对齐| 居中 |左对齐 | |左对齐 | 右对齐| 居中 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
注意:不支持垂直对齐
无格式区块
若要略过某段内含维基语法,不对该段文字作任何处理, 可以使用 <nowiki> 标签或更简单一点用 2 个 %% 放在该段文字的前后,请参考下面例子:
正如本段示范里,本来包含了网址:http://www.splitbrain.org,以及**加上格式的文字**,但它没有给格式化。连表情符号;-)的转换,也与//__加上格式的文字__//一样,全都失效了。
使用百分号对 //__这段__ 文字// 可以达到同样的效果 ;-).
<nowiki>正如本段示范里,本来包含了网址:http://www.splitbrain.org,以及**加上格式的文字**,但它没有给格式化。连表情符号;-)的转换,也与//__加上格式的文字__//一样,全都失效了。</nowiki> 使用百分号对 %%//__这段__ 文字// 可以达到同样的效果 ;-)%%。
代码区块
在一段文字的最前面加上 2 个空白,来直接作为「文本框」不对它做加工处理(就像前面那些说明一样)。或者也可以用 <code> 或 <file> 这两个标签(tag)都可以达到类似效果。
这段是用 <code> 产生的,所有空格及所有原始格式都会照样显示,还其本色。
就像 <-这个
这段跟上段很像,但是改用 <file> ,可以把它用在「引述名言(Quote)」效果上。
remember, information is not knowledge,
knowledge is not wisdom
wisdom is not truth
truth is not beauty
beauty is not love
love is not music
music is the best
-- frank zappa
这些区域的源码如下:
这段是用 <code> 产生的,所有空格及所有原始格式都会照样显示,还其本色。
<code> 就像 <-这个 </code>
<file>
这段跟上段很像,但是改用 <file> ,可以把它用在「引述名言(Quote)」效果上。
remember, information is not knowledge,
knowledge is not wisdom
wisdom is not truth
truth is not beauty
beauty is not love
love is not music
music is the best
-- frank zappa
</file>
语法的高亮度显示
DokuWiki 可把原始码语法来做高亮度显示(Syntax Highlighting),来更加具可读性。 它采用的是 GeSHi Generic Syntax Highlighter —— 所以只要 GeSHi 有支持的,DokuWiki 亦可。
用法就类似前例的 <code> ,但要在标签(tag)内指定该原始码所使用的语言。比如 <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. } }
目前支持的语言有: actionscript, ada, apache, asm, asp, bash, caddcl, cadlisp, c, c_mac, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php-brief, php, python, qbasic, smarty, sql, vb, vbnet, visualfoxpro, xml
可下载的代码块
若您使用上述的 <code> 或 <file> 语法,您或許希望让浏览者直接下载该段代码。您可以在语言代码后方指定一個文件名,方便浏览者下载:
<file php myexample.php> <?php echo "hello world!"; ?> </file>
- myexample.php
<?php echo "hello world!"; ?>
若您不想把语法高亮显示出,但想方便浏览者下载,您可以用链接号 - 作语言代码。例如:<code – myfile.foo>。
在内容中嵌入HTML或PHP语法
可以在文件里透过加入 <html> or <php> 标签来使用HTML或PHP,比如:
这是一段用 <font color="red" size="+1">HTML 写的红色字(size=+1)</font>
<html> 这是一段用 <font color="red" size="+1">HTML 写的红色字(size=+1)</font> </html>
22
echo '由 PHP 所产生 Logo:';
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=
' . php_logo_guid() . '"
alt="PHP Logo !" />';
<php>
echo '由 PHP 所产生 Logo:';
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=
' . php_logo_guid() . '"
alt="PHP Logo !" />';
</php>
请特别注意:HTML 及 PHP 语法可以在设定选项中决定支持与否。若您的 DokuWiki 设定不打开这两项功能(可单独打开两者之一功能)那么上面的例子就不会被执行,而是直接显示出来原始写法。
RSS/ATOM Feed 聚合
DokuWiki 能從外部 XML feed 中聚合數據。為分析這些 XML feed,DokuWiki 使用了SimplePie。凡是 SimplePie 能理解的格式,都可用於 DokuWiki 中。您可以更改不同的參數,以改變其渲染。參數之間請用空格隔開:
| 參數 | 描述 |
|---|---|
| any number | 最多顯示多少項內容;預設值是8。 |
| reverse | 將最新條目顯示在前面。 |
| author | 顯示條目的作者名字。 |
| date | 顯示條目數據。 |
| description | 顯示條目的描述;如果 HTML 被禁用,所有標籤將被過濾掉 |
| n[dhm] | 刷新周期,其中,d=日數,h=小時數,m=分。例如,12h=12小時。 |
預設的刷新周期是 4 小時。小於 10 分鐘者亦視為 10 分鐘。DokuWiki 通常會提供頁面的暫存版,但這做法不適用於包含動態外部內容的頁面。上面的參數則告訴 DokuWiki:若對上一次渲染時間已經過了刷新周期,就要重新渲染頁面。
範例:
{{rss>http://slashdot.org/index.rss 5 author date 1h }}
- GameStop Is Preparing Offer For eBay 由 BeauHD (2026/05/02 19:00)
- New Lithium-Plasma Engine Passes Key Mars Propulsion Test 由 BeauHD (2026/05/02 15:00)
- Amazon Stuck With Months of Repairs After Drone Strikes On Data Centers 由 BeauHD (2026/05/02 11:30)
- Microsoft's Xbox Mode Is Now Available For All Windows 11 PCs 由 BeauHD (2026/05/02 07:00)
- AI Agent Designed To Speed Up Company's Coding Wipes Entire Database In 9 Seconds 由 BeauHD (2026/05/02 06:00)
控制宏
控制宏会影响 DokuWiki 对页面的渲染,而自身不输出任何內容。可用的控制宏如下:
| 宏 | 描述 |
|---|---|
| ~~NOTOC~~ | 如果页面中出现该控制宏,将不会为该页创建目录。 |
| ~~NOCACHE~~ | DokuWiki 默认会缓存所有的输出。有时您并不希望内容被缓存(例如您使用了上述的<php>语法,页面会动态生成),便可使用这个控制宏,强制 DokuWiki 在每次访问时都重新生成页面。 |
扩展插件
使用插件,可以扩充 DokuWiki 的语法。插件的的安装方法,请参见其他相应页面中的说明。
2026-2-5 06:43:58
dokuwiki Design Examples
DokuWiki's look can be customized through templates, either publicly available ones or ones custom built for your project. This page collects a few more interesting designs for inspiration.
Even though it is sometimes hard to tell, all of these sites are based on DokuWiki:
A – B
C – L
M – O
P – S
T – Z
In alphabetical order of the second-level domain name.
2026-2-5 06:42:36
备忘录
本站dokuwiki版本:dokuwiki-2018-04-22 3658kb
tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip
Helper plugin pagelist is not available or invalid.
blog版本 2013 by Michael Hamann,需要include插件
随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what
2026-2-5 08:25:31
安全
DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。
DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。
该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。
编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:
提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。
所有的以前的安全问题可以在这里找到。
根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。
你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。
编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。
如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。
以下目录不应该从网络直接访问:
data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。
如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。
编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。
编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。
打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法
打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码
web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>
<system.webServer>
<security>
<requestFiltering>
<filteringRules>
</filteringRules>
<alwaysAllowedUrls>
<add url="/data/media/" />
</alwaysAllowedUrls>
<denyUrlSequences>
<add sequence="/data/" />
<add sequence="/conf/" />
<add sequence="/bin/" />
<add sequence="/inc/" />
</denyUrlSequences>
</requestFiltering>
</security>
</system.webServer>
</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。
data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:
$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:
inc/preload.php <?php
define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。
inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。
编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。
allowdebug – 禁止调试输出,以避免系统信息泄露
fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。
fetchsize – 配置外部数据缓存
fullpath – 显示页面的完整路径名
所有的 验证设置
usewordblock – 通过黑名单,防止垃圾邮件
mailguard – 避免收集邮件地址的机器人
iexssprotect – 在 IE 中防范跨站脚本问题
htmlok – 开启 HTML
phpok – 开启 PHP
hidepages – 在索引和搜索中隐藏特定页面
safemodehack – 解决安全模式的限制
编辑
插件安全
DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。
这里有一些提示,帮助你选择你想要安装的插件。
如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读
https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。
设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.
2026-2-5 06:46:08
Tips and Tricks for DokuWiki
This is the place to collect all your Tips and Tricks for DokuWiki Usage.
Steps for reorganization:
- Add a description to each page, and categorize within this page. Almost done.
- Review external links to remove broken ones, maybe integrate external link to have all content on dokuwiki.org
If possible please rewrite content, and remove old things.
NOTE to translators: When updating your tips page, please use the index button to see what pages are within your locale :tips namespace. And please do include them into the tips page. Thank you.
Usage Tips
| Link | Short Description |
|---|---|
| TailorWikiRules | Best-practices to follow after installing DokuWiki |
| Syncing with Unison | Sync two wikis using unison |
| timezone | Set the server's Timezone |
| mailconfig | Tips on making mail work |
| commonlogin | Sharing authentication data between wikis on the same server |
| Displaying blank rows in tables | Displaying blank rows in tables |
| Good Style | Hints on how to have good styles on DokuWiki |
| Accessibility | Accessibility tips for editors |
| upgrading_old_versions | How to upgrade from old DokuWiki (2005-*) |
| ShowMediaFromExternalUpload | How to make files uploaded by other ways than mediamanager to appear |
Extending the Syntax
Most of these tips need to be adjusted for the new Parser and will not work out of the box. They may be better implemented by using the new plugin system though.
| Link | Short Description |
|---|---|
| magnet links | Show DC++ magnet links as external |
| links-to-dokuwiki-commands | Make links to “DokuWiki actions” (?do=) from within your wiki content, aka. Action Modes, aka. Action Links (in general, URL tags) |
| tex_howto | This patch (to 2005-05-07 version) add AMSLaTeX mathematical expression support to DokuWiki |
Extending Layout and Styling
Some of these tips may be implemented better by using the new template mechanism. You are encouraged to rewrite them accordingly.
| Link | Short Description |
|---|---|
| Top Bar | Add a topbar like on dokuwiki.org |
| CustomQuoting | Change the style of Quoting |
| format_user | Using CN from client certificate when displaying username |
| Disabling link icons | Disables interwiki and non-wiki link icons |
| Descriptions in RSS aggregator | Add the beginning of every RSS article in the list |
| Code CSS | CSS for use with Syntax Highlighting |
| geshi_style_builder | Geshi Style builder |
| XHTML5 | How to switch to XHTML 5 |
| XHTML Strict | How to switch to XHTML 1.0 Strict |
| Toc use position fixed | When the user scrolls the page, the TOC does not scroll with it, the TOC is fixed. |
| numbered headings | Numbered headings per CSS only |
| back to top | back to top before every header |
| Local links with icons | Local links with icons |
| Custom SVG icons | Create your custom multi-color SVG icons for your DokuWiki |
| image-in-the-upper-right-corner | replace top right DokuWiki logo by your own |
| code-in-ordered-lists | Including Code in Ordered Lists |
| tableswithrowspans2 | Tables with Rowspan Support |
| Tables with Rowspan | Another way of providing Rowspan support in tables. |
| rowspansfix | Yet another way to make rowspan possible |
| rowspansfix2 | Yet another way to make rowspan possible |
| Adjust iframe heights | An additional JavaScript for the iframe plugin to make iframes as high as needed for their content |
| Using CSS to Style Headers | General tips, case uses and structure info for styling headers with CSS. |
| Display the changes for each entry in the recent list | Display a diff of the last and the current version for each entry in the recent list]] |
| printpreview | Preview of the wiki body; Usage for printing or fullscreen-mode |
| double-click-to-edit | Double Click to Open a Section Edit (improved) |
| Simple Columns | Implementation of columns without plugins |
| Button Align | How to align a <button> element? |
| Additional InterWiki Shortcuts | Share Your InterWiki Shortcuts |
| Hyphenations within headings and link texts (sorry, German only | Hyphenations within headings and link texts (German: Worttrennungen innerhalb von Überschriften und Linktexten) |
Adding new Functionality
| Link | Short Description |
|---|---|
| Auto Subscribe a Mailinglist | Auto Subscribe a user to a mailinglist after registration |
| Better Email Notifications | Receive HTML-formatted email notifications for page changes |
| Clean Notification Scheme | Clarify notification scheme: namespace subscribers on new page, page subscribers on update |
| IP-based ACLs | Assign access rights based on IP or network of the connecting client. |
| BrowserLanguageDetection | Change the UI language automatically |
| transliteration | Transliterate Cyrillic texts to Latin |
| PDF Export | PDF export using html2ps and pstopdf |
Print View Button Login needed | make use of ?do=export_html |
| tpl_button for print view | Adds an tpl_button for print_view |
User Link Login needed | use an extra wiki-page for users |
| StickyExportHtml | Make do=export_html “sticky” for HTML-only browsing |
| Html only view | Similar to previous. uses .htaccess rewrite for that |
| discussion | Creates a link or button in your template that leads to a separate discussion-page (like e.g. Wikipedia does provide) |
| safely include php code | Allow PHP code to be included in pages created by superuser only |
| Page Statistics | Add page and media file logging to DokuWiki |
| Tiny Page Logging | Add simple logging to DokuWiki |
| NLS | Adding unofficial National Language Support (NLS) for DokuWiki |
| Summary Enforcement | Require the user to enter a summary (or check minor edit) |
| ToolbarButton | How to add your own button to the toolbar |
| homepages | Autocreate user homepages when add/modify user accounts |
| wordcounter | Add a word-/charcounter to the edit form |
| mediamanager and filesize | Append the size of the mediamanager selected file to the wikilink |
| media_attached | media upload is attached to each page |
| template_chooser | A simple dropdown box in editmode allows you to paste content from a template into the current document |
| login_instead_of_forbidden | Show the login form when accessing a restricted page |
| display_acls | Display ACLs in page footer |
| action_menu | Action menu like in MoinMoin Wiki |
| export_html | Export multiple pages to HTML |
| newssystem | A News System. Based on this a plugin was developed: a NEWS System. |
| subscription | Prevent Email Of Changes to Subscribed Author |
| phashLogin | Allows “GET” login with a phash password. Useful with RSS readers for example. |
| Integrate TinyURL | Automatically create a short URL for every page |
| Filter Recent Changes | Allows you to filter the list of 'Recent Changes' by username (for version 2009-02-14) |
| Separate Admin Login | Use a special admin login, which cannot read or edit pages |
| User Pages | Give everyone AUTH_EDIT on a page within a special namespace, where that page is their name |
| ClickNShow | Hide/Show Headers clicking on them |
| Minor Edit by default | Set the “Minor Edit” check mark by default |
| viewcounter | Adds a simple pageview counter |
| Make a book | How to make a book with DokuWiki |
| Namespace Clouds | DokuWiki Cloud Plugin Namespace Discrimination Patch |
| Copy Section Link | An easy way to copy each section link (with JavaScript) |
| pageaccueil | Creates a home page that lists categories of wiki to create a new page in the category chosen. Also allows to Create a new category. |
Integration with Other Software
Auth Plugins let you authenticate in DokuWiki with credentials of other software platforms. Look for available Auth Plugins in the plugin repository.
Others
| Link | Short Description |
|---|---|
| Synchronise with Tomboy | How to synchronize Tomboy with DokuWiki |
| Integrate DokuWiki to your website | As read-only pages |
| Edit DokuWiki with text editors using FUSE and Python | Untested and potentially buggy. |
Researchr (broken) | Framework for integrating DokuWiki with BibDesk and Skim for academic note taking and citation management |
Interacting scripts and tools
| Link | Short Description |
|---|---|
| DokuWiki Setup | Easy/automatic installation/upgrade - also fixing safe-mode issues |
| Maintenance | Cronjobs to keep your wiki clean |
| Backup Script | A small shellscript to backup your wiki data and media, including rotation. |
| BackupToS3 | A small ruby script to backup your wiki to Amazon's data storage system S3. |
| UpgradeScript | A small script to make DokuWiki updates simpler |
| Weblog bookmarklet | A JavaScript/PHP combination to post in DokuWiki like regular weblogs |
| imap2wiki | A small PHP script to give users the opportunity to post by email |
| DokuVimKi | VIM Plugin that allows editing of wiki pages over XML-RPC + Syntax highlighting for DokuWiki syntax |
| vimkeys | Key Bindings for [G]Vim |
| fixperms.php | make webserver created files writable by everyone |
| mail2page | create pages and upload media by email |
| romanize | romanize files in datadir |
| DokuWiki2HtmlHelp | Converts a DokuWiki website into a Compiled HTML Help file (.chm) complete with table of contents and index |
| jEdit | An edit mode for jEdit that does syntax highlighting for headlines, character formats, lists and links |
| CLI | DokuWiki command line utilities |
| recreate wiki change log | How to recreate your wiki change log from individual page change logs |
| readINIfile | How to solve problem with parse_ini_file disabled |
| fixmtime | Fix modification times based on timestamps (to avoid the external edit syndrome) |
| clean_acl | Clean up non-existing users and pages in the ACL |
| Clean Media Directory | A little Perl script to clean up orphaned files in the Media-Directory |
| Logging in to retrieve pages with cURL | Quick howto on retrieving pages that require logging in with curl. |
| Extract external links | A small PHP script to extract all external links (with surrounding context) from the wiki |
| Add an Autolink page | A small Perl Script to (re)builds link on chosen words each nights |
| Automatic build reports | A bash script that compiles/builds a project and reports the result to the wiki |
| GourceDoku | Picture of the edition of a wiki with Gource |
| topcontributors | A shell snippet to create a list of the top contributors to the wiki |
| locateorphanmedia | How to get a listing of all orphaned media ie.: media files that are not linked to in your wiki |
| Page Annotate | A script to give you idea who edited which line in page. Uses git as a tool to do the trick |
| Mysql For All | An off-wiki webpage script to provide users the ability to generate mysql queries for use in wiki plugins. Users do not need to know the database structure or mysql syntax. |
Dokuwiki orphans (broken) | Help you find pages with no links towards them and links to non existant pages in order to keep your Wiki clean. |
| User Maintenance | Maintain inactive accounts |
Importing from External Sources
Wikis
| Source Wiki | Description |
|---|---|
| ChuWiki | A Python script for ChuWiki conversion |
| ErfurtWiki | A PHP script for ewiki (ErfurtWiki) conversion |
| JSPWiki | A plugin to import JSPWiki pages |
| JSPWiki (again) | A pair of scripts to convert a directory of JSPWiki pages |
| MediaWiki | Converts MediaWiki to DokuWiki |
| MoinMoin | Python and PHP scripts for MoinMoin conversion. |
| Perspective | A python script, must be run from Windows |
| TikiWiki | A PHP script for TikiWiki conversion. |
| trac | A PHP script for trac's wiki conversion |
| TWiki | A TWiki to DokuWiki conversion script |
| Wakka Wiki | A Perl script for Wakka Wiki conversion |
| Zwiki | A Perl script for Zwiki conversion |
| docpdf2dokuwiki | A Perl script for importing pdf and doc |
| Atlassian Confluence | A Perl script for Atlassian Confluence conversion |
Other
| Link | Description |
|---|---|
| uploadcodedir | Uploading a directory of code to DokuWiki |
| table_editing | How to import your data into tables |
| Wikemail | a script to import email into DokuWiki |
| OpenOffice Macro | converts an OpenOffice document to DokuWiki format |
| OpenOffice v2 Macro | converts an OpenOffice document to DokuWiki format, adapted for OOo v2 |
| OpenOfficeMacro | both of the above macros do not convert embedded pictures - this one does |
| Writer2Dokuwiki | converts an OpenOffice document to DokuWiki format (doesnt fully support lists) |
| Writer2Dokuwiki (IT-Bayer's version) (in German) | converts an OpenOffice document to DokuWiki format |
| Calc2Dokuwiki | Exports selected ranges of cells from OpenOffice.org Calc into tables formatted in DokuWiki code. Tool available as an extension (OOo 2.1.x) and a macro (OOo 1.x-2.x) |
| HTMLtoWiki | How to convert HTML to DokuWiki Formatting Syntax |
| Excel to DokuWiki converter | This makro based tool contains parameters on first worksheet to allow the user some customization. Paste your table into another worksheet, select the cells as usual and run the makro to Export it as DW Syntax including styling. Information also available here within DokuWiki at: Excel Macro |
| csv2dwt | A script that converts Comma Separated Values (CSV) to DokuWiki's Table format (DWT) |
| csv2dokuwiki | Converts CSV input (tab separated) into DokuWiki's table syntax (in Java) |
| xls2wiki | A script that converts XLS copied data to DokuWiki's Table format (DWT) and vice versa |
| doc to wiki syntax | Convert folders with Ms Word Doc files to DokuWiki Syntax |
| Word to Dokuwiki converter | Here you can download the latest Version of this Doc containing the makro to Export it as DW Syntax. Some Information provided here within the DokuWiki at word makro. Former versions provided by Tania Hew ⇒ Word to DokuWiki Converter improves upon the two macros above as it is a Word template that allows one to click a button in MS Word to convert a Word document, including images, to DokuWiki format (see Portfolio section on website) |
| Word Macro adaptation | converts an MS Word document to DokuWiki format - improved conversion (for English Word) plus adaptation for German Word |
| word2wiki | Convert Microsoft Word document content to Wiki markup |
| google sheets macro | Google Apps Script for exporting a selected cell range to DokuWiki |
| wordpress user export | How to run a query to export users from Wordpress that can be imported in DokuWiki |
Miscellaneous
| Link | Description |
|---|---|
| blacklist_test | This little script helps to check a text against the blacklist |
| blogging | This page describes the steps necessary to get you started with blogging in DokuWiki |
| bookmarklets | JavaScript based wiki page editing helpers |
| default text search | Add default text for the search box |
| disabled_functions | Patch if your webhost doesn't support glob or readfile |
| DwExport | DokuWiki export to static HTML pages including images and CSS formatting. ⇒ http://sourceforge.net/projects/dwexport/ Only v0.2 |
| farm | How to make DokuWiki a wiki farm |
| simplegooglesearch | Replace DokuWiki internal search form with Google search |
| spell_checker_713 | Aspell Personal Wordlists and Release 2005-07-13 (seems old) |
| svg.php | This is a plugin to DokuWiki to allow collaborative generation of SVG images. (Make it a plugin if possible/useful) |
| utf8update | DokuWiki UTF8 conversion |
| export2twiki | Convert DokuWiki syntax into twiki format for exporting |
| phpwithgd | This page describes how to solve issues caused by missing gdlib support in PHP |
How To
No plugin or modifications needed.
| Link | Description |
|---|---|
| weather | Show weather info from https://wttr.in/ |
2026-2-5 06:44:55
DokuWiki 格式语法
DokuWiki 支持一些简单的标记语言, 以尽可能使源文件也具有可读性。本页面包含了所有您在编辑页面时可能用到的语法的说明。如果需要查看本页源码,只需要点击页面顶部或者底部的 编辑本页 按钮即可。 如果您是初尝维基,那么可以使用维基涂鸦板来尽情挥洒。通过工具条快捷按钮,您可以方便地使用这些标记。
基本文本格式
DokuWiki 支持 粗体, 斜体, 下划线 以及 等宽体 等格式。 当然,你也可以 混合使用 这些格式。
DokuWiki支持 **粗体**, //斜体//, __下划线__ 以及 ''等宽体'' 等格式。 当然,你也可以 **__//''混合使用''//__** 这些格式。
可以使用 下标 和 上标。
可以使用 <sub>下标</sub> 和 <sup>上标</sup>。
您也可以使用 删除线 标记某些信息。
您也可以使用 <del>删除线</del> 标记某些信息。
段落 是由空行所建立的。如果您想 强制建立新行 而不建立段落,您可以使用两个连续的反斜杠+空格或是回车作为标记。请看样例:
这是一些有着换行标记的文字。
请注意
反斜杠只在回车符之前
或者在
一个空格之前的时候才有效。 \\而这样就并不起作用。
这是一些有着换行标记的文字。\\ 请注意 反斜杠只在回车符之前\\ 或者在\\ 一个空格之前的时候才有效。 \\而这样就并不起作用。
请只在必须的时候才使用强制的换行标记。
链接
DokuWiki 支持多种形式的链接。
外部链接
外部链接会被自动地识别:http://www.google.com 或者简单地写作 www.google.com - 当然您也可以为链接设置名字:链接到google。类似这样的电子邮件地址: andi@splitbrain.org 也可以被识别。
DokuWiki支持多种形式的链接。外部链接会被自动地识别: http://www.google.com 或者简单地写作 www.google.com - 当然您也可以为链接设置名字: [[http://www.google.com|链接到google]]。 类似这样的电子邮件地址: <andi@splitbrain.org> 也可以被识别。
内部链接
内部链接可以用方括号创建。您可以只给出链接的地址:pagename,也可以附加上链接的名字:我的链接。
内部链接可以用方括号创建。您可以只给出链接的地址:[[pagename]], 也可以附加上链接的名字:[[pagename|我的链接]]。
维基页面名 将会被自动地识别为小写字母,并且不允许使用特殊字符。
您可以通过在页面名中使用冒号的方式来使用 命名空间。
您可以通过在页面名中使用冒号的方式来使用 [[wiki:namespaces|命名空间]]。
如果您需要关于命名空间(namespaces)的更详细的信息,请参见 命名空间。
您也可以链接到一个网页内部的某一节,只需要将该节书签的名称以一个#号分隔加在网页的地址后面即可。这是一个连向 本节 的链接。
这是一个指向 [[syntax#内部链接|本节]] 的链接。
注:
- 当一节的标题改变时,该节的书签也会改变,因此,请不要太依赖页面内的链接。
维基间链接
DokuWiki 支持维基间链接,即到其他维基的链接。例如,这是一个到维基百科上关于“维基”的一个页面链接: Wiki 。
DokuWiki 支持[[interwiki|维基间链接]],即到其他维基的链接。 例如,这是一个到维基百科上关于“维基”的一个页面链接: [[wp>Wiki]] 。
Windows 文件夹共享
Windows 文件夹共享,例如 this 也可以被识别。请注意,这只在内部 局域网 等环境中才可能被成功访问。
Windows共享文件夹,例如 [[\\server\share|this]] 也可以被识别。
注:
- 出于安全原因,只有在微软IE浏览器上才能够直接访问 Windows 文件夹共享。 (且只适用于局域网内部环境).
- Mozilla 和 Firefox 可采用 Mozilla 知识库 中提到的方法实现此功能. 但是,在打开 Windows 共享时仍然弹出 JavaScript 警告。如需为所有用户删除这个警告, 请将本行代码加入
conf/lang/en/lang.php中 (详情见 localization):- conf/lang/en/lang.php
<?php /** * Customization of the english language file * Copy only the strings that needs to be modified */ $lang['js']['nosmblinks'] = '';
图像链接
您也可以用图像来作为一个内部或者外部的链接,只需同时使用链接和图像的语法,如下所示:
[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
请注意:在链接名中使用语法,只有显示图像的语法会被识别,请不要使用其它语法。
DokuWiki 支持完整的图像及[#links|链接]]预发,包括调整图像大小、内部和外部的图像链接,以及wiki内链接。
脚注
您可以使用两个连续小括号来添加脚注4)。
您可以使用两个连续小括号来添加脚注((看这里,这是一个脚注))。
标题段落
您可以使用最多达5层的标题来使您的页面更富结构性。如果您使用了三个以上的标题,那么 DokuWiki 会自动在页面上生成一个名为“本页目录”的标题列表。当然,您也可以关闭这项特性,只需在编辑时在页面里加入 ~~NOTOC~~ 字样即可。
H3标题
H4标题
H5标题
==== H3标题 ==== === H4标题 === == H5标题 ==
您可以通过连续的4个以上“-”号来创建一条水平分割线:
图像和其它文件
您可以使用双大括号来在页面中加入 图像,视频及声音文件 。您还可以选择是否指定图像的显示大小。
指定宽度和高度(200×50)5):
原始大小: {{wiki:dokuwiki-128.png}}
指定宽度(50 pixel): {{wiki:dokuwiki-128.png?50}}
指定宽度和高度(200×50): {{wiki:dokuwiki-128.png?200*50}}
重新指定宽度和高度的外部图像(100x100): {{http://de3.php.net/images/php.gif?200x50}}
使用左方或者右方的空格,您可以选择对齐方式:
{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}
当然,您也可以指定一个图像的名字,将鼠标移到图像上可以看到效果。
{{ wiki:dokuwiki-128.png |这是图像的名字}}
如果您指定的文件名(无论是外部的还是内部的)不是一个图像(gif,jpeg,png),那么它将被显示为一个链接。
支持的媒体格式
DokuWiki 可以直接在页面中嵌入以下格式.
| 图像 | gif, jpg, png |
| 视频 | webm, ogv, mp4 |
| 音频 | ogg, mp3, wav |
| Flash | swf |
如果指定不支持的媒体格式的文件名,则它将作为链接显示。
加上 ?linkonly 就会在网页中只显示链接,不显示内容。
{{wiki:dokuwiki-128.png?linkonly}}
dokuwiki-128.png 这是一个图片的链接。
备用的文件格式
并非所有浏览器都支持所有的视频和音频格式,要解决这个问题,你可以上传不同的文件格式,以获得最大的浏览器兼容性。
例如有一个 mp4 的视频文件:
{{video.mp4|一个很有意思的视频}}
如果同时上传了 video.webm 和 video.ogv 到与 video.mp4 相同的命名空间的话, DokuWiki 会自动识别为备用的文件格式,并选择一个最适合当前浏览器的文件格式。
此外,DokuWiki 也支持“视频海报”,可以在视频播放前显示制定的图片。该图片必须与视频文件名相同,并且为 jpg 和 png格式。
列表
Dokuwiki 支持带编号或不带编号的列表。要使用列表,在文字前加入两个空格,然后使用*标志不带编号的列表,用-标志带编号的列表。
- 列表
- 第二项
- 下一层
- 第三项
- 带编号的列表
- 第二项
- 用缩进表示更深的层
- 完了
* 列表
* 第二项
* 下一层
* 第三项
- 带编号的列表
- 第二项
- 用缩进表示更深的层
- 完了
同时可以关注 列表项目常见问题解答.
文本转换
DokuWiki 可以将预定义的字符或者字符串转换成图片、其他文本或 HTML。
文本到图片的转换,主要用作表情符号。文本到 HTML 的转换,多用於显示符号替换,但也可以配置为使用其他 HTML。
表情符号
DokuWiki 会将一些常用的 表情符号 转换为图像。除了默认的表情符号以外,您也可以在 Smileys 文件夹中放入更多的表情图,然后在 conf/smileys.conf 中设置它们即可。下面是 Dokuwiki 包含了的表情图像:
8-)
8-O
:-(
:-)
=)
:-/
:-\
:-?
:-D
:-P
:-O
:-X
:-|
;-)
^_^
:?:
:!:
LOL
FIXME
DELETEME
印刷样式
DokuWiki 可以将特定字符转换为印刷时所用的样式。下面是可以识别的这类字符的列表:
→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® “He thought 'It's a man's world'…”
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..."
请注意:在配置文件中可以禁用这类自动转换。
层次显示
有时候(特别是讨论时)您想把某些文字(尤为各次的回复)标示作不同的层次,您可以使用下列的语法:
我认为我们应该一起行动 > 不行,不能一起行动 >> 嗯……,我感觉能行 > 真的吗? >> 是! >>> 那么,一起行动吧!
我认为我们应该一起行动
不行,不能一起行动
嗯……,我感觉能行
真的吗?
是!
那么,一起行动吧!
表格
DokuWiki 可以用简单的语法创建表格。
| 标题 1 | 标题 2 | 标题 3 |
|---|---|---|
| (WOK) | (1,2) | (1,3) |
| (2,1) | 展宽的单元格 | |
| (3,1) | (3,2) | (3,3) |
表格的每一行都以分隔符 | (普通行)或者 ^ (标题行)作为开头和结束。
^ 标题 1 ^ 标题 2 ^ 标题 3 ^ | (1,1) | (1,2) | (1,3) | | (2,1) | 展宽的单元格 || | (3,1) | (3,2) | (3,3) |
要水平合并单元格,只需要将后一个单元格设置为空即可,如上面演示的一样。请确保每一行有相同数量的单元格分隔符!
竖直的标题列也是可以实现的:
| 标题 1 | 标题 2 | |
|---|---|---|
| 标题 3 | (1,2) | (1,3) |
| 标题 4 | 不再合并单元格 | |
| 标题 5 | (2,2) | (2,3) |
可以看到,单元格前面的分隔符决定了单元格的格式。
| ^ 标题 1 ^ 标题 2 ^ ^ 标题 3 | (1,2) | (1,3) | ^ 标题 4 | 不再合并单元格 | | ^ 标题 5 | (2,2) | (2,3) |
您也可以垂直合并两格或多格。只要在下面的格内输入:::即可
| 标题 1 | 标题 2 | 标题 3 |
|---|---|---|
| (1,0) | 这次示范垂直合并 | (1,3) |
| (2,1) | (2,3) | |
| (3,1) | (3,3) |
除跨行合并语法:::外,单元格中不能包含其他内容。
^ 标题 1 ^ 标题 2 ^ 标题 3 ^ | (1,1) | 这次示范垂直合并 | (1,3) | | (2,1) | ::: | (2,3) | | (3,1) | ::: | (3,3) |
您可以对齐表格的文字。只需要添加多余两个的空格在您需要对齐的方向的反向即可:如果需要右对齐,在左边添加两个空格;反之,则在右边添加。在两边均添加空格可以实现中间对齐。
| 有对齐的表格 | ||
|---|---|---|
| 右对齐 | 居中 | 左对齐 |
| 左对齐 | 右对齐 | 居中 |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
下面是源文件中的格式:
^ 有对齐的表格 ^^^ | 右对齐| 居中 |左对齐 | |左对齐 | 右对齐| 居中 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
注意:不支持垂直对齐
无格式区块
若要略过某段内含维基语法,不对该段文字作任何处理, 可以使用 <nowiki> 标签或更简单一点用 2 个 %% 放在该段文字的前后,请参考下面例子:
正如本段示范里,本来包含了网址:http://www.splitbrain.org,以及**加上格式的文字**,但它没有给格式化。连表情符号;-)的转换,也与//__加上格式的文字__//一样,全都失效了。
使用百分号对 //__这段__ 文字// 可以达到同样的效果 ;-).
<nowiki>正如本段示范里,本来包含了网址:http://www.splitbrain.org,以及**加上格式的文字**,但它没有给格式化。连表情符号;-)的转换,也与//__加上格式的文字__//一样,全都失效了。</nowiki> 使用百分号对 %%//__这段__ 文字// 可以达到同样的效果 ;-)%%。
代码区块
在一段文字的最前面加上 2 个空白,来直接作为「文本框」不对它做加工处理(就像前面那些说明一样)。或者也可以用 <code> 或 <file> 这两个标签(tag)都可以达到类似效果。
这段是用 <code> 产生的,所有空格及所有原始格式都会照样显示,还其本色。
就像 <-这个
这段跟上段很像,但是改用 <file> ,可以把它用在「引述名言(Quote)」效果上。
remember, information is not knowledge,
knowledge is not wisdom
wisdom is not truth
truth is not beauty
beauty is not love
love is not music
music is the best
-- frank zappa
这些区域的源码如下:
这段是用 <code> 产生的,所有空格及所有原始格式都会照样显示,还其本色。
<code> 就像 <-这个 </code>
<file>
这段跟上段很像,但是改用 <file> ,可以把它用在「引述名言(Quote)」效果上。
remember, information is not knowledge,
knowledge is not wisdom
wisdom is not truth
truth is not beauty
beauty is not love
love is not music
music is the best
-- frank zappa
</file>
语法的高亮度显示
DokuWiki 可把原始码语法来做高亮度显示(Syntax Highlighting),来更加具可读性。 它采用的是 GeSHi Generic Syntax Highlighter —— 所以只要 GeSHi 有支持的,DokuWiki 亦可。
用法就类似前例的 <code> ,但要在标签(tag)内指定该原始码所使用的语言。比如 <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. } }
目前支持的语言有: actionscript, ada, apache, asm, asp, bash, caddcl, cadlisp, c, c_mac, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php-brief, php, python, qbasic, smarty, sql, vb, vbnet, visualfoxpro, xml
可下载的代码块
若您使用上述的 <code> 或 <file> 语法,您或許希望让浏览者直接下载该段代码。您可以在语言代码后方指定一個文件名,方便浏览者下载:
<file php myexample.php> <?php echo "hello world!"; ?> </file>
- myexample.php
<?php echo "hello world!"; ?>
若您不想把语法高亮显示出,但想方便浏览者下载,您可以用链接号 - 作语言代码。例如:<code – myfile.foo>。
在内容中嵌入HTML或PHP语法
可以在文件里透过加入 <html> or <php> 标签来使用HTML或PHP,比如:
这是一段用 <font color="red" size="+1">HTML 写的红色字(size=+1)</font>
<html> 这是一段用 <font color="red" size="+1">HTML 写的红色字(size=+1)</font> </html>
22
echo '由 PHP 所产生 Logo:';
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=
' . php_logo_guid() . '"
alt="PHP Logo !" />';
<php>
echo '由 PHP 所产生 Logo:';
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=
' . php_logo_guid() . '"
alt="PHP Logo !" />';
</php>
请特别注意:HTML 及 PHP 语法可以在设定选项中决定支持与否。若您的 DokuWiki 设定不打开这两项功能(可单独打开两者之一功能)那么上面的例子就不会被执行,而是直接显示出来原始写法。
RSS/ATOM Feed 聚合
DokuWiki 能從外部 XML feed 中聚合數據。為分析這些 XML feed,DokuWiki 使用了SimplePie。凡是 SimplePie 能理解的格式,都可用於 DokuWiki 中。您可以更改不同的參數,以改變其渲染。參數之間請用空格隔開:
| 參數 | 描述 |
|---|---|
| any number | 最多顯示多少項內容;預設值是8。 |
| reverse | 將最新條目顯示在前面。 |
| author | 顯示條目的作者名字。 |
| date | 顯示條目數據。 |
| description | 顯示條目的描述;如果 HTML 被禁用,所有標籤將被過濾掉 |
| n[dhm] | 刷新周期,其中,d=日數,h=小時數,m=分。例如,12h=12小時。 |
預設的刷新周期是 4 小時。小於 10 分鐘者亦視為 10 分鐘。DokuWiki 通常會提供頁面的暫存版,但這做法不適用於包含動態外部內容的頁面。上面的參數則告訴 DokuWiki:若對上一次渲染時間已經過了刷新周期,就要重新渲染頁面。
範例:
{{rss>http://slashdot.org/index.rss 5 author date 1h }}
- GameStop Is Preparing Offer For eBay 由 BeauHD (2026/05/02 19:00)
- New Lithium-Plasma Engine Passes Key Mars Propulsion Test 由 BeauHD (2026/05/02 15:00)
- Amazon Stuck With Months of Repairs After Drone Strikes On Data Centers 由 BeauHD (2026/05/02 11:30)
- Microsoft's Xbox Mode Is Now Available For All Windows 11 PCs 由 BeauHD (2026/05/02 07:00)
- AI Agent Designed To Speed Up Company's Coding Wipes Entire Database In 9 Seconds 由 BeauHD (2026/05/02 06:00)
控制宏
控制宏会影响 DokuWiki 对页面的渲染,而自身不输出任何內容。可用的控制宏如下:
| 宏 | 描述 |
|---|---|
| ~~NOTOC~~ | 如果页面中出现该控制宏,将不会为该页创建目录。 |
| ~~NOCACHE~~ | DokuWiki 默认会缓存所有的输出。有时您并不希望内容被缓存(例如您使用了上述的<php>语法,页面会动态生成),便可使用这个控制宏,强制 DokuWiki 在每次访问时都重新生成页面。 |
扩展插件
使用插件,可以扩充 DokuWiki 的语法。插件的的安装方法,请参见其他相应页面中的说明。
2026-2-5 06:43:58
dokuwiki Design Examples
DokuWiki's look can be customized through templates, either publicly available ones or ones custom built for your project. This page collects a few more interesting designs for inspiration.
Even though it is sometimes hard to tell, all of these sites are based on DokuWiki:
A – B
C – L
M – O
P – S
T – Z
In alphabetical order of the second-level domain name.
2026-2-5 06:42:36
all above flags does not work, the index pages in sub namespace is still included .
This is global configuration, you should configure it inConfiguration Manager. — Siyuan Liu 2023-08-17
Discussion
Please report bugs or feature requests at the Bug tracker.
Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33


