help:dokuwikisetting
DokuWiki 常用设置
安装
从DokuWiki官网下载安装包
- Download DokuWiki!https://download.dokuwiki.org/
解压到相应目录后,在浏览器中访问 http://sitename/install.php
常用的站点设置
设置项 | 设置值 |
---|---|
标题(title) | Site Title |
副标题(tagline) | Site Tagline |
开始页面(start) | home |
侧边栏(sidebar) | sidebar |
目录的最顶层(toptoclevel) | 2 |
使用“标题 H1”作为页面名称(useheading) | true |
使用更整洁的 URL(userewirte) | .htaccess (tip:需要伪静态规则支持) |
在 URL 中使用斜杠作为命名空间的分隔符(useslash) | true |
常用编写说明
完整版请查看 DokuWiki格式语法说明
标题可通过文本编辑器的按钮快速插入标题
一级标题(不在目录中出现。目录从二级标题开始。) 6个=
====== 一级标题 ======
二级标题 5个=
===== 二级标题 =====
三级标题 4个=
==== 三级标题 ====
链接
[[wiki:syntax]]
加入一行代码(空两行开始)
the code
加入一坨代码 使用 code 或 file 标记。输入文档格式与文档名称(若要显示文件,则需制定文档格式)。
只显示代码 code 标记
<code php> <?php echo "hello world!"; ?> </code>
<?php echo "hello world!"; ?>
显示代码与文件 file 标记
<file php thecode.php> <?php echo "hello world!"; ?> </file>
- thecode.php
<?php echo "hello world!"; ?>
显示代码与文件 code标记
<file php thecode.php> <?php echo "hello world!"; ?> </file>
- thecode.php
<?php echo "hello world!"; ?>
升级
定位到网站上级
cd /var/www/
备份
cp -Ra colinol.com colinol.com.bak
下载升级包
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
解压升级包
tar -xzvf dokuwiki-stable.tgz
复制上传
cp -rf dokuwiki-xxxx-xx-xx/* colinol.com/
或者强制复制
yes | cp -rf dokuwiki-xxxx-xx-xx/* colinol.com/
至此,网站已升级完成,可以访问验证有没有问题
从备份文件夹中恢复数据文件
cd /colinol.com.bak
yes|cp -rf conf/* ../colinol.com/conf/ yes|cp -rf data/* ../colinol.com/data/ yes|cp -rf lib/* ../colinol.com/lib/
备份
tar -zcvf colinol.com.tar.gz colinol.com
安全设置
#data和conf目录需要写权限 sudo chown -R www-data:www-data data conf
按照经验:升级时,最好先下载最新安装包,全新安装。再将旧的数据拷贝到新网站程序中。 数据存储在 data/pages 主要备份目录应为 conf data lib
伪静态规则
适用于 Apache
- .htaccess
RewriteEngine on RewriteBase / RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] RewriteRule ^$ doku.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) doku.php?id=$1 [QSA,L]
适用于 Nginx
rewrite ^(/)_media/(.*) $1lib/exe/fetch.php?media=$2 last; rewrite ^(/)_detail/(.*) $1lib/exe/detail.php?media=$2 last; rewrite ^(/)_export/([^/]+)/(.*) $1doku.php?do=export_$2&id=$3 last; location / { if (!-f $request_filename) { rewrite ^(/)(.*)?(.*) $1doku.php?id=$2&$3 last; rewrite ^(/)$ $1doku.php last; } }
help/dokuwikisetting.txt · 最后更改: 2023/01/03 15:25 由 127.0.0.1
评论
Wonderful write-up… I completely agree with your points. Thanks for sharing
Wonderful write-up… I completely agree with your points. Thanks for sharing
Excellent content. You've made some excellent observations. Keep up the good work
Excellent content. You've made some excellent observations.
Keep up the good work
Great article. You've made some excellent observations. Keep up the good work
Great article. You've made some excellent observations. Keep up the good work