第38行: |
第38行: |
| try_files $uri $uri/ @rewrite; | | try_files $uri $uri/ @rewrite; |
| } | | } |
− |
| |
| location @rewrite { | | location @rewrite { |
| rewrite ^/wiki/(.*)$ /index.php?title=$1&$args; | | rewrite ^/wiki/(.*)$ /index.php?title=$1&$args; |
| + | } |
| + | location ^~ /maintenance/ { |
| + | return 403; |
| } | | } |
| | | |
| location ~ [^/]\.php(/|$) { | | location ~ [^/]\.php(/|$) { |
| fastcgi_param HTTP_PROXY ""; | | fastcgi_param HTTP_PROXY ""; |
− | fastcgi_pass unix:/run/php/php7.2-fpm.sock; | + | fastcgi_pass unix:/run/php/php-fpm.sock; |
| fastcgi_index index.php; | | fastcgi_index index.php; |
| include fastcgi_params; | | include fastcgi_params; |
第77行: |
第79行: |
| $wgGroupPermissions['*']['edit'] = false; | | $wgGroupPermissions['*']['edit'] = false; |
| $wgGroupPermissions['sysop']['interwiki'] = true; | | $wgGroupPermissions['sysop']['interwiki'] = true; |
| + | $wgGroupPermissions['sysop']['editinterface'] = true; |
| + | $wgGroupPermissions['sysop']['editsitecss'] = true; |
| + | $wgGroupPermissions['sysop']['editsitejs'] = true; |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
第84行: |
第89行: |
| $wgMFDefaultSkinClass = 'SkinMinerva'; | | $wgMFDefaultSkinClass = 'SkinMinerva'; |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | |
| + | == 笔记 == |
| + | |
| + | === 脚注 === |
| + | |
| + | 在正文中使用 <code><nowiki>{{ref|footnoteid}}</nowiki></code>,并在页面结尾增加「脚注」二级标题,将脚注内容用 <code><nowiki>{{note|footnoteid}} footnote text</nowiki></code> 写在有序列表中。<ref>[[metawikimedia:Help:Footnotes#Ref_and_note_template]]</ref> |
| + | |
| + | === 链接到分类 === |
| + | |
| + | <code><nowiki>[[:分类:分类名]]</nowiki></code> <ref>[[mw:Help:Categories#Linking_to_a_category]]</ref> |
| + | |
| + | === 可排序表格 === |
| + | |
| + | <ref>[[mw:Help:Tables/zh]]</ref> <ref>[[mw:Help:Sorting#Sorting_rows_of_a_table]]</ref> |
| + | <syntaxhighlight lang=text> |
| + | {| class="wikitable sortable" |
| + | ! 可排序列 |
| + | ! class="unsortable" | 不可排序列 |
| + | |- |
| + | | 单元格 || 单元格 |
| + | |- |
| + | | 单元格 || 单元格 |
| + | |} |
| + | </syntaxhighlight> |
| + | |
| + | === 中文页面在类别列表中的位置 === |
| + | |
| + | 默认情况下,类别页面下的页面是按照第一个字符排序的,使用 <code><nowiki>[[Category:ABC|Nihao]]</nowiki></code> 可将页面加入 ABC 类,并让它在 ABC 类下的位置排序时使用 Nihao 进行排序。<ref>[[mw:Help:Categories#Sort_key]]</ref> |
| + | |
| + | 或者可以直接设置该页面的默认排序关键词(default sort key),使用 <code><nowiki>{{DEFAULTSORT:Nihao}}</nowiki></code>。<ref>[[mw:Help:Magic_words#Miscellany]]</ref> |
| + | |
| + | === 清除页面缓存 === |
| + | |
| + | 在 URL 之后添加 <code>?action=purge</code>。 |
| | | |
| == 扩展 == | | == 扩展 == |
第97行: |
第136行: |
| === MobileFrontend === | | === MobileFrontend === |
| | | |
− | 移动版本。<ref>https://www.mediawiki.org/wiki/Extension:MobileFrontend</ref>下载 [[mw:Skin:Minerva_Neue|Minerva_Neue 皮肤]] 并安装到 <code>mediawiki/skins</code> 下。
| + | [[mw:Extension:MobileFrontend|移动版本前端]]。下载 [[mw:Skin:Minerva_Neue|Minerva_Neue 皮肤]] 并安装到 <code>mediawiki/skins</code> 下。 |
| | | |
| <syntaxhighlight lang=php> | | <syntaxhighlight lang=php> |
第104行: |
第143行: |
| wfLoadExtension('MobileFrontend'); | | wfLoadExtension('MobileFrontend'); |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | |
| + | === Gadgets === |
| + | |
| + | 在 MediaWiki 1.31 中已自带。启用的小工具见[[特殊:小工具]]。配置在 [[MediaWiki:Gadgets-definition]]。 |
| + | |
| + | 使用: |
| + | <syntaxhighlight lang=php> |
| + | wfLoadExtension('Gadgets'); |
| + | </syntaxhighlight> |
| + | |
| + | ==== [[mw:Reference Tooltips|Reference Tooltips]] ==== |
| + | |
| + | 鼠标移动到参考文献的方括号上时显示引用的内容。在 [[MediaWiki:Gadgets-definition]] 中加入 |
| + | |
| + | * ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css |
| | | |
| == 升级 == | | == 升级 == |