自己動手架設wiki(9) - config檔

  1. 自己動手架設wiki(9) - config檔
    1. 前言
    2. 內容
      1. Gitit wiki configuration file

自己動手架設wiki(9) - config檔

原文連結: https://darkblack01.blogspot.com/2014/10/wiki9-config.html
移植時的最後更新日期: 2014-10-28T20:27:31.089+08:00

前言

此文件是由Gitit使用者手冊中的語法得到
~/wiki/$ gitit --print-default-config > wiki.conf

內容

Gitit wiki configuration file

設定web server觸發的IP
address: 0.0.0.0
設定web server執行的port
port: 5001
wiki系統的title(顯示在瀏覽器的標題列)
wiki-title: Wiki
指定用來儲存wiki內容的分散式版本控制系統,可設定成Git, Darcs, Mercurial。
repository-type: Git
指定repo(版本控制範圍根目錄)的路徑,如果它不存在gitit會在啟動時建立一個。
repository-path: wikidata
何時要求身份驗證的權限
設定none,允許使用者匿名編輯
設定modify,需登錄才可以修改wiki的頁面
設定read,需登入才可以讀取wiki頁面
require-authentication: modify
要求身份驗證的方式
form 意思是,使用者會透過gitit的web界面的表單(form)進行登錄。
http meansthat gitit will assume that HTTP authentication is inplace and take the logged in username from the “Authorization”field of the HTTP request header (in addition,the login/logout and registration links will besuppressed).
http 意思是,gitit會認為HTTP基本認證(HTTP authentication)是內建的並且從http request訊息開頭的“Authorization”取得使用者名稱來登錄(此外,登錄/登出和註冊連結將被隱藏)。
generic 意思是gitit會認為認證對應表內建的,會直接設定在REMOTE\_USER認證使用者的名稱。(e.g. mod_auth_cas on apache)。
rpx 意思是gitit 可以透過https://rpxnow.com.整合其它系統的帳密來登入。
This requires that ‘rpx-domain’, ‘rpx-key’, and ‘base-url’be set below, and that ’curl’ be in the system path.
若要用這個,使用下面的rpx-domain, rpx-key, and base-url要設定。curl要設定成系統路徑。
authentication-method: form
設定記錄使用者帳密資訊的檔案名稱。如果它不存在,gitit會建立一個(新的空白檔案)。如果authentication-method設定成http,這個檔案將不被使用。
user-file: gitit-users
number of minutes of inactivity before a session expires.
幾分鐘之後算愈時連線。
session-timeout: 60
指定static目錄(放置 javascript、css和圖片)。如果它不存在,gitit會建立一個,並且內建所需要的javascript、css和圖片。
static-dir: static
指定wiki頁面的預設標記方式。可以設定的值: Markdown, RST, LaTeX, HTML, Markdown+LHS, RST+LHS 和 LaTeX+LHS。(+LHS 可以處理Haskell語法輸入的變數。欲知詳情,請看pandoc的文件)。如果用Markdown,pandoc的語法擴充(footnotes、delimited code blocks等) ,會啟用。Note that pandoc’sreStructuredText parser is not complete, so some pages may not berendered correctly if RST is selected. The same goes for LaTeX andHTML.
default-page-type: Markdown
specifies how LaTeX math is to be displayed. Possible valuesare MathML, raw, mathjax, jsMath, and google. If mathml is selected,gitit will convert LaTeX math to MathML and link in a script,MathMLinHTML.js, that allows the MathML to be seen in Gecko browsers, IE +mathplayer, and Opera. In other browsers you may get a jumble of characters.If raw is selected, the LaTeX math will be displayed as raw LaTeX math.If mathjax is selected, gitit will link to the remote mathjax script.If jsMath is selected, gitit will link to the script /js/jsMath/easy/load.js,and will assume that jsMath has been installed into the js/jsMath directory.This is the most portable solution. If google is selected, the google chartAPI is called to render the formula as an image. This requires a connectionto google, and might raise a technical or a privacy problem.
math: MathML
specifies the path to MathJax rendering script.You might want to use your own MathJax script to render formulas withoutInternet connection or if you want to use some special LaTeX packages.Note: path specified there cannot be an absolute path to a script on your hdd, instead you should run your (local if you wish) HTTP server which will serve the MathJax.js script. You can easily (in four lines of code) serveMathJax.js using http://happstack.com/docs/crashcourse/FileServing.htmlDo not forget the “http://” prefix (e.g. http://localhost:1234/MathJax.js)
mathjax-script: https://d3eoax9i5htok0.cloudfront. net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
specifies whether to show Haskell code blocks in “bird style”,with “>” at the beginning of each line.
show-lhs-bird-tracks: no
指定放置模板的目錄路徑。如果它不存在gitit會建立一個有預設模板的資料夾。使用者可能希望透過自定模板來修改wiki外觀。模板檔案HStringTemplate模板。變數要用兩個Literal’s must be backslash-escaped.
templates-dir: templates
specifies the path of gitit’s log file. If it does not exist,gitit will create it. The log is in Apache combined log format.
log-file: gitit.log
determines how much information is logged.Possible values (from most to least verbose) are DEBUG, INFO,NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY.
log-level: WARNING
指定wiki首頁的頁面名稱。如果不存在Gitit在初始化時,會建立一個叫front page的頁面。
front-page: Front Page
指定無法用Web界面刪除的頁面。(它們仍然可以直接使用git或darcs刪除)指定多頁時用逗號分開,保持空白則可以刪除每一頁。
no-delete: Front Page, Help
指定無法透過Web界面編輯的頁面。保持空白則可以編輯每一頁。
no-edit: Help
specifies text to be used in the change description if the authorleaves the “description” field blank. If default-summary is blank(the default), the author will be required to fill in the descriptionfield.
default-summary:
specifies whether to print a tables of contents (with links tosections) on each wiki page.
table-of-contents: yes
specifies a list of plugins to load. Plugins may be specifiedeither by their path or by their module name. If the plugin namestarts with Gitit.Plugin., gitit will assume that the plugin isan installed module and will not try to find a source file.Examples:plugins: plugins/DotPlugin.hs, CapitalizeEmphasisPlugin.hsplugins: plugins/DotPluginplugins: Gitit.Plugin.InterwikiLinks
plugins:
specifies whether to cache rendered pages. Note that if use-feedis selected, feeds will be cached regardless of the value of use-cache.
use-cache: no
directory where rendered pages will be cached
cache-dir: cache
specifies an upper limit on the size (in bytes) of files uploadedthrough the wiki’s web interface.To disable uploads, set this to 0K.This will result in the uploads link disappearing and the _upload url becoming inactive.
max-upload-size: 100K
specifies an upper limit on the size (in bytes) of pages
max-page-size: 100K
if “yes”, causes debug information to be logged while gitit is running.
debug-mode: no
specifies whether HTTP responses should be compressed.
compress-responses: yes



mime-types-file: /etc/mime.types
specifies the path of a file containing mime type mappings.Each line of the file should contain two fields, separated bywhitespace. The first field is the mime type, the second is afile extension.
For example:video/x-ms-wmx wmxIf the file is not found, some simple defaults will be used. if “yes”, causes gitit to use the reCAPTCHA service(http://recaptcha.net) to prevent bots from creating accounts.
use-recaptcha: no
recaptcha-private-key: specifies the public and private keys for the reCAPTCHA service.To get these, you need to create an account at http://recaptcha.net.
recaptcha-public-key:
註冊必答的問題
設定問題給想要建立帳號的使用者,此問題必答,問題和答案列表用逗號隔開。這可以用來當作是建立帳號的許可密碼,或者是代替驗證碼。
例如:
access-question: What is the code given to you by Ms. X?
access-question-answers: RED DOG, red dog
access-question-answers:
rpx-domain: Specifies the domain and key of your RPX account. The domain isjust the prefix of the complete RPX domain, so if your full domainis ‘https://foo.rpxnow.com/’, use ‘foo’ as the value of rpx-domain.
rpx-key:
specifies the command to use to send notification emails.‘%s’ will be replaced by the destination email address.The body of the message will be read from stdin.If this field is left blank, password reset will not be offered.
mail-command: sendmail %s
gives the text of the message that will be sent to the user should shewant to reset her password, or change other registration info.The lines must be indented, and must begin with ‘>’. The initialspaces and ‘>’ will be stripped off. username will be replacedby the user’s username, useremail by her email address,hostname by the hostname on which the wiki is running (asreturned by the hostname system call), port by the port onwhich the wiki is running, and resetlink by therelative path of a reset link derived from the user’s existinghashed password. If your gitit wiki is being proxied to a locationother than the root path of port, you should change the link toreflect this: for example, tohttp://hostname/path/to/wikiresetlink orhttp://gitit.hostnameresetlink
reset-password-message: > From: nobody@hostname > To: useremail > Subject: Wiki password reset > > Dear username: > > To reset your password, please follow the link below: > http://hostname:portresetlink > > Yours sincerely, > The Wiki Master
specifies whether an ATOM feed should be enabled (for the site and forindividual pages)
use-feed: no
the base URL of the wiki, to be used in constructing feed IDsand RPX token_urls. Set this if use-feed is ‘yes’ orauthentication-method is ‘rpx’.
base-url:
make wikilinks absolute with respect to the base-url.So, for example, in a wiki served at the base URL ‘/wiki’, on a pageSub/Page, the wikilink ‘Cactus’ will produce a link to’/wiki/Cactus’ if absolute-urls is ‘yes’, and a relative link to ‘Cactus’(referring to ‘/wiki/Sub/Cactus’) if absolute-urls is ‘no’.
absolute-urls: no
number of days to be included in feeds.
feed-days: 14
number of minutes to cache feeds before refreshing
feed-refresh-time: 60
if yes, PDF will appear in export options. PDF will be created usingpdflatex, which must be installed and in the path. Note that PDFexports create significant additional server load.
pdf-export: no
if a directory is specified, this will be searched for pandoccustomizations. These can include a templates/ directory for customtemplates for various export formats, an S5 directory for customS5 styles, and a reference.odt for ODT exports. If no directory isspecified, $HOME/.pandoc will be searched. See pandoc’s README formore information.
pandoc-user-data:
if yes, all HTML (including that produced by pandoc) is filteredthrough xss-sanitize. Set to no only if you trust all of your users.