dokuwiki 部署笔记
文章目录
- dokuwiki 是什么
- dokuwiki 在 Windows 上的安装
- 方法一:用 XAMPP
- 方法二:用 PHPstudy
- 创建目录和页面
- 修复不能显示以中文命名的页面
- 如何安装插件
- 插件推荐
- Add New Page
- indexmenu
- move
- imgpaste
- color
- syntaxhighlighter4
- discussion
- codemirror
- tag
- wrap
- edittable
- filelist
dokuwiki 是什么
任何 wiki 引擎(也称为 wiki 软件,以下简称引擎)都是用来支持创建、协同编辑、存储和使用超链接文档的软件。编辑通常通过网页浏览器进行。有时,引擎可以称为知识管理软件。
DokuWiki 是一个开源 wiki 引擎,运行于PHP环境下。DokuWiki 程序小巧而功能强大、灵活,适合中小团队和个人网站知识库的管理。
dokuwiki 在 Windows 上的安装
方法一:用 XAMPP
具体方法就不说了,网上很多教程
我遇到的麻烦是,网页上报了很多错误,且布局很奇怪。尝试各种方法都不行,比如换模板,改配置文件,不管怎么尝试,都是失败。
放几张失败的图:
我在想是不是工具的问题,能不能换一个可以代替 XAMPP 的工具?
方法二:用 PHPstudy
官网地址:https://www.xp.cn/
PHPStudy 支持一键 LAMP、LNMP、FTP 等 100 多项服务器管理功能(官网说的)。
下载后,傻瓜安装。
启动 Apache 或者 Nginx
点击左边的【网站】可以看端口,右边的【管理】–【修改】可以修改端口。
接着,进入网站根目录(WWW目录)右边的【管理】–【打开根目录】,把 dokuwiki 拷贝到 WWW 目录中,解压。
进入 dokuwiki 目录可以看到有一个 install.php
在浏览器中访问 localhost:8081/dokuwiki/install.php
,进行简单配置
填写完之后就可以进入 wiki 主页了
如果前面设置了中文,大概长这样
创建目录和页面
创建目录和页面。有两种方法,一种是直接在 pages 目录下创建文件夹和文本文件,一种是借助插件,在网页上操作。
我在 page 目录下创建了文件夹 “车子”,又在“车子”里面创建了一个文本文件:我是车子.txt
这时候点击网站地图,会发现车子下面什么都没有,看不到“我是车子.txt”
也就是说,中文命名空间(可以把命名空间理解为文件夹)下不能显示以中文命名的文本文件。
好在这个问题可以修复。
修复不能显示以中文命名的页面
进入 dokuwiki 安装目录下的 inc文件夹,打开 pageutils.php
把
utf8_encodeFN
函数中的 2 行注释掉function utf8_encodeFN($file,$safe=true){global $conf;if($conf['fnencode'] == 'utf-8') return $file;if($safe && preg_match('#^[a-zA-Z0-9/_\-\.%]+$#',$file)){return $file;}if($conf['fnencode'] == 'safe'){return SafeFN::encode($file);}// $file = urlencode($file);// $file = str_replace('%2F','/',$file); chezireturn $file; }
13-14 注释掉
修改
utf8_decodeFN
函数function utf8_decodeFN($file){global $conf;if($conf['fnencode'] == 'utf-8') return $file;if($conf['fnencode'] == 'safe'){return SafeFN::decode($file);}return $file;//return urldecode($file); cjy }
第 9 行注释掉,添加第 8 行
如何安装插件
安装插件的方法有 2 种,一种是在线安装;一种是先下载插件包,然后在本地安装。
先说第一种方法。
以管理员身份登录,点击右上角的管理,再点击扩展管理器。
输入插件的名字或者关键字,点击放大镜按钮。
如果有匹配的,就会显示出来,点击你要的进行安装。
不管安装成功与否,都有提示。比如一个失败的图片:
也有可能是下载不了,比如:
遇到这种情况,就要找到下载地址,想办法下载下来。
有了安装包后,手动安装。手动安装有 2 种方法,一种是直接解压到 dokuwiki\lib\plugins
目录,如果需要的话还要修改文件夹的名字(The base name of the plugin can be found in plugin.info.txt
);另一种是通过按钮来安装,如下图
点击手动安装,然后选择下载的安装包(不用解压),再点安装。
插件推荐
根据网友的推荐,七七八八装了好多,plugins 目录如下(里面有好多都是自带的):
对于每个文件夹,你都可以进去看看,能获得不少关于本插件的信息,比如下载地址,使用说明,配置文件等等。
Add New Page
# General Plugin Info
base addnewpage
author Benjamin Santalucia, Sam Wilson, Michael Braun, Gerrit Uitslag, Albert Chern
email
date 2015-11-02
name Add New Page
desc Adds a "new page form" to any wiki page.
url http://www.dokuwiki.org/plugin:addnewpage
下载地址:http://www.dokuwiki.org/plugin:addnewpage
安装了这个插件后,用户可以通过浏览器页面创建命名空间和页面。
如何设置呢?
点击 welcom 界面,再点击 sidebar
这时候会显示“该主题尚不存在”,点击右侧的“创建该页面”,输入 {{NEWPAGE}}
,再保存,就 OK 了。
indexmenu
base indexmenu
author Samuele Tognini
email samuele@samuele.netsons.org
date 2020-07-31
name Indexmenu Plugin
desc Show a customizable and sortable index for a namespace
url https://www.dokuwiki.org/plugin:indexmenu
下载地址: https://www.dokuwiki.org/plugin:indexmenu
此插件允许您插入一个完全可自定义的索引或从指定命名空间开始的页面列表。
我觉得这个插件最有用的地方是可以在边栏增加一个导航列表。
设置方法:
安装完之后,在 sidebar 页面的尾部添加
{{indexmenu>:}}
效果:
move
base move
author Michael Hamann, Gary Owen, Arno Puschmann, Christoph Jähnigen
email michael@content-space.de
date 2018-04-30
name Move plugin
desc Move and rename pages and media files whilst maintaining the links.
url http://www.dokuwiki.org/plugin:move
下载地址:http://www.dokuwiki.org/plugin:move
这个插件允许移动包含媒体文件的页面和名称空间,并自动调整指向这些页面的所有链接和媒体引用。
注意:这个插件将文件移动到 DokuWiki 数据目录中,并且可以自动更改很多页面。尽管插件已经被成功测试过,但是在你的情况下总是可能有些东西不能正常工作,而且你的 wiki 可能处于不一致的状态。这个插件还是相当新的,在某些情况下可能表现不正确。
Please make a backup before using this plugin, especially if you plan to make larger changes!
警告: 此插件不更新 ACL 规则。例如,如果您有一个 ACL 规则,该规则对某个 wiki 页面进行读保护,那么在移动该页面之后,该规则将不再有任何效果。
除了重命名一个页面外,该插件需要管理员特权才能使用。
使用方法:以管理员身份登录,点击右上角的“管理”
点击【页面移动/重命名】
点击树形移动
直接拖动目录。红框里的按钮是为重命名准备的。
imgpaste
base imgpaste
author Andreas Gohr
email dokuwiki@cosmocode.de
date 2018-05-03
name imgpaste plugin
desc Add images via cut'n'paste in Chrome
url http://www.dokuwiki.org/plugin:imgpaste
下载地址:http://www.dokuwiki.org/plugin:imgpaste
这个插件允许通过简单的粘贴图片到编辑器中来插入图片。这对插入截图特别有用。请注意这个插件工作在 Chrome 浏览器,Opera (从15版本开始) ,Firefox 52,Safari (iOS)。
可以指定图像名称的构造方式。您应该确保构造的名称是唯一的(通过使用当前时间)。除了 strftime 通配符,还可以使用以下占位符:
color
base color
author Harald Hanche-Olsen
email harald.hanche-olsen@ntnu.no
date 2018-10-12
name color syntax plugin
desc Write colored text in DokuWiki.
url https://www.dokuwiki.org/plugin:color
下载地址:https://www.dokuwiki.org/plugin:color
作用:可以显示出有颜色的字
例如编辑框输入:
<color green>text</color>
<color blue/lightgrey>text</color>
<color #FF0000>text</color>
<color /#FFff00>text</color>
<color rgb(80%,0%,0%)/rgb(100%,80%,100%)>text</color>
<color hsl(120,100%,30%)/hsl(180,50%,90%)>text</color><color #008080>葱绿色</color>、<color #ED6F00>橘橙色</color>、<color #BFAA15>蕉黄色</color>、
<color #FF00FF>桃红色</color>、<color #0000FF>蓝色</color>、<color #FF0000>红色</color>、
<color #008000>绿色</color>、<color #5F00BD>紫色</color>、<color #FF9900>橙黄色</color>、
<color #000000>黑色</color>、<color #808080>银色</color>、<color #FF8080>蟠桃色</color>、
<color #66CCFF>天蓝色</color>、<color #66FFCC>薄荷绿</color>、<color #BA0033>枣红色</color>、
<color #000080>海军蓝</color>、<color #FF4E00>橙红色</color>、<color #7FB80E>青绿色</color>、
<color #E54C4C>浅胭脂</color>、<color #D6006F>牡丹红</color>、<color #534948>鸽羽灰</color>、
<color #AE35FF>浅紫色</color>、<color #2A5CAA>琉璃蓝</color>、<color #800080>紫萝兰</color>、
<color #8567B6>江户紫</color>、<color #700000>棕色</color>、<color #897B52>褐金色</color>、
<color #FFCE00>金黄色</color>。您还可以自行塡入网页颜色的十六进制代码(Hex triplet),调配想要的文字色彩。例如:
<color #FF84BA>粉红色</color>、<color #58C3E0>水蓝色</color>、<color #E85700>大橙色</color>、
<color #EEDD65>奶油黄</color>、<color #983333>深胭脂</color>等。
效果:
syntaxhighlighter4
base syntaxhighlighter4
author CrazyMax
email contact@crazymax.dev
date 2020-05-13
name SyntaxHighlighter4 Plugin
desc Alternative to GeSHi server-side code highlighting with client-side SyntaxHighlighter 4 by Alex Gorbatchev
url http://www.dokuwiki.org/plugin:syntaxhighlighter4
下载地址:https://www.dokuwiki.org/plugin:syntaxhighlighter4
作用:代码高亮
作者还举了例子,在编辑栏输入
<sxh php; highlight: [11-15]>/*** [Custom event handler which performs action]** @param Doku_Event $event event object by reference* @param mixed $param [the parameters passed as fifth argument to register_hook() when this* handler was registered]* @return void*/public function handle_metaheader(Doku_Event &$event, $param) {// Add SyntaxHighlighter theme.$event->data['link'][] = array('rel' => 'stylesheet','type' => 'text/css','href' => DOKU_BASE . 'lib/plugins/syntaxhighlighter4/dist/'.$this->getConf('theme'),);// Register SyntaxHighlighter javascript.$event->data["script"][] = array("type" => "text/javascript","src" => DOKU_BASE . "lib/plugins/syntaxhighlighter4/dist/syntaxhighlighter.js","_data" => "");}
</sxh>
效果图:
discussion
base discussionauthor Michael Hamann, Gerrit Uitslag, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner, Matthias Schulteemail michael@content-space.dedate 2020-09-24name discussion plugindesc Provides discussion funtionality for wiki pagesurl https://dokuwiki.org/plugin:discussion
作用:为你的 Wiki 页面增加评论功能。如果你不想给普通用户编辑页面的权利,但仍然希望用户提供笔记,那么这样做可以将页面内容和讨论区分开来。
下载地址和使用方法: https://www.dokuwiki.org/plugin:discussion
在页面的最后,添加 ~~DISCUSSION~~
来开启讨论。
要关闭讨论,使用 ~~DISCUSSION:off~~
如果你想显示现有的讨论,但不想允许新的评论/回复,使用 ~~DISCUSSION:closed~~
我们动手试试。
保存后会看到:
使用 ~~DISCUSSION:off~~
关闭后,评论内容和评论框就不见了,好像什么都没有发生过。
使用 ~~DISCUSSION:closed~~
的情况:
codemirror
base codemirrorauthor Albert Gasset (fix by CosmoCode)email albertgasset@fsfe.orgdate 2020-09-05name CodeMirror plugindesc Editor with syntax highlightingurl https://github.com/albertgasset/dokuwiki-plugin-codemirror
下载地址:https://github.com/albertgasset/dokuwiki-plugin-codemirror
作用:对编辑框里面的文本做语法着色
例如:
tag
base tagauthor Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunneremail michael@content-space.dedate 2020-12-02name Tag Plugindesc tag wiki pagesurl https://www.dokuwiki.org/plugin:tag
作用:给页面添加标签。
用法举例:{{tag>温柔 美丽 智慧}}
另外还可以搜索标签,计数标签,显示包含某些标签的页面列表等等。
参考:https://www.dokuwiki.org/plugin:tag
这里要提醒大家:不推荐将 Tag 作为分类使用,而更多当做【印象】使用!
wrap
base wrap
author Anika Henke
email anika@selfthinker.org
date 2018-04-22
name Wrap Plugin
desc Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction.
url https://www.dokuwiki.org/plugin:wrap
#syntax See example.txt
通用插件,它结合了许多其他插件的功能。在容器中包装 wiki 文本(div 或 span)并给它们一个类(从各种预设类中选择)、一个宽度和/或一种带有相关文本方向的语言。
我看上它是因为可以让文本变得花哨一些,哈哈哈。
<WRAP tip>tip</WRAP>
<WRAP important>important</WRAP>
<WRAP alert>alert</WRAP>
<WRAP download>download</WRAP>
<WRAP todo> todo </WRAP>
效果:
edittable
base edittable
author Andreas Gohr
email dokuwiki@cosmocode.de
date 2020-11-09
name EditTable plugin
desc Provide a custom editor for tables
url https://www.dokuwiki.org/plugin:edittable
下载地址:https://www.dokuwiki.org/plugin:edittable
作用:可以在页面上友好地编辑表格。
例如:
点击“编辑”
对于不熟悉用文本编辑表格的小伙伴,是个好工具。
filelist
base filelist
author Gina Häußge, Dokufreaks
email gina@foosel.net, freaks@dokuwiki.org
date 2020-09-27
name Filelist Plugin
desc Lists files matching a given glob pattern.
url https://www.dokuwiki.org/plugin:filelist
作用:文件列表插件提供了一种语法,可以将基于通配符的 glob 模式选择的链接和排序的文件列表添加到 wiki 页面,从而允许动态地包含任意文件系统位置和媒体名称空间的文件列表。使用 additionalfilename 命令,用户还可以从文本中的任意位置添加一个文件链接,用于自动保存最新上传的软件版本的下载链接。
举例:输入 {{filelist>lib/images/*&style=list&direct=1}}
效果:
【End】
dokuwiki 部署笔记相关推荐
- 【Zookeeper】Zookeeper部署笔记
Zookeeper部署笔记 1.上传zk安装包2.解压3.配置(先在一台节点上配置)3.1添加一个zoo.cfg配置文件$ZOOKEEPER/confmv zoo_sample.cfg zoo.cfg ...
- Spark集群基于Zookeeper的HA搭建部署笔记(转)
原文链接:Spark集群基于Zookeeper的HA搭建部署笔记 1.环境介绍 (1)操作系统RHEL6.2-64 (2)两个节点:spark1(192.168.232.147),spark2(192 ...
- HappyAA服务器部署笔记1(nginx+tomcat的安装与配置)
这是本人的服务器部署笔记.文章名称叫"部署笔记1"的原因是之后我对这个进行了改进之后,会有"部署笔记2","部署笔记3"...循序渐进,估计 ...
- GLM联合go-cqhttp实现qq群GLM机器人服务器的本地化部署笔记
GLM qq群服务器的本地化部署笔记 一. 概述 1.1 整体结构 1.2 目标 1.3 需求 1.4 流程说明 二. 部署流程 2.1 使用GPT转发程序帮助文档 2.1.1 使用git安装GLM ...
- RocketMQ 简单梳理 及 集群部署笔记【转】
一.RocketMQ 基础知识介绍 Apache RocketMQ是阿里开源的一款高性能.高吞吐量.队列模型的消息中间件的分布式消息中间件. 上图是一个典型的消息中间件收发消息的模型,RocketMQ ...
- 凯图OA系统部署笔记
凯图OA系统部署笔记 RHEL5.3安装: 1.首先进行原电脑数据的备份: 2.系统序列号选择: 安装Advanced Platform版本的序列号:49af89414d147589,此序列号支持cl ...
- ATS6.2安装部署笔记
ATS6.2安装部署笔记 原文:http://www.safecdn.cn/ats/2018/12/ats6-2-install/1046.html 系统版本:CentOS 6.7 1.安装依赖包 y ...
- 【基于Selenium的发票查验-部署笔记】
基于Selenium的发票查验 前言 目录结构 验证码部分 部署笔记 1.Centos7将Python3.6升级至Python3.9 2.Centos7配置Chrome+Chromedriver环境 ...
- Dofbot机械臂从零部署笔记(1)——ROS之创建URDF模型、配置Moveit和MotionPlanning
文章目录 从零部署之创建URDF模型 0 创建新工作空间 1 创建URDF模型测试功能包 2 dofbot机械臂的urdf模型 3 meshes 4 launch文件 5 编译并运行 6 运行效果 7 ...
最新文章
- 与现代传感器的接口:轮询ADC驱动程序
- modbus调试时间超时_Java调试器和超时
- python模块用法教程_Python学习之asyncore模块用法实例教程
- 译文 | 与TensorFlow的第一次接触第二篇:线性回归
- java 遍历二进制_读取二进制文件并循环遍历每个字节
- C++ .template 关键字
- POST 一张 图像的调试来认识 http post
- 二级Visual Basic语言视频教程
- Python爬虫 - 02.实现贴吧签到
- GBIT51233-2016装配式木结构建筑技术标准
- windos 启动redis服务端与客户端
- 异步FIFO跨时钟域亚稳态如何解决?
- VIN码识别技术在移动端的应用
- SSL安全证书过期的原因及解决方法
- C# 使用Timer设置一个定时任务
- 快速排序——单边循环实现方式
- dw自动滚动图片_DW里怎么做图片自动播放
- url中的20%、22%、26%、7B%、%7D、28%、29%怎么解析还原成真实的字符
- C# 固高Jog运动
- 手把手的 git 降伏指南——阿龙咸鱼经