用户工具

站点工具


wiki:syntax

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
wiki:syntax [2023/07/06 03:39] – [Code Blocks] obwiki:syntax [2023/08/04 14:46] (当前版本) – 已恢复为旧版 (2023/07/06 06:52) 弘毅
行 376: 行 376:
   The same is true for %%//__this__ text// with a smiley ;-)%%.   The same is true for %%//__this__ text// with a smiley ;-)%%.
  
-===== Code Blocks =====+===== 代码块 =====
  
-您可以通过将代码块缩进至少两个空格(如前面的示例中使用的那样)或使用标签%%<code>%%%%<file>%%将代码块包含到文档中.+您可以通过将代码块缩进至少两个空格(如前面的示例中使用的那样)或使用标签''%%<code>%%''''%%<file>%%''将代码块包含到文档中.
  
   This is text is indented by two spaces.   This is text is indented by two spaces.
行 390: 行 390:
 </file> </file>
  
-Those blocks were created by this source:+看看代码长的样子:
  
     This is text is indented by two spaces.     This is text is indented by two spaces.
行 418: 行 418:
 </code> </code>
  
-以下的标识符会被识别为高亮: //4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot d ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml q racket rails rbs rebol reg rexx robots roff rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf xpp yaml z80 zxbasic//+以下的标识符会被识别为高亮: 4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfd cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcsDelphi diff div dos dot d ecmascript Eiffel email EPC e erlang Euphoria ezt F1 Falcon fo Fortran FreeBasic FreeSwitch Fsharp Gambas GDB Genero Genie Genie GetText GLSL GML gnuplot Go groovy GWbasic Haskell Haxe Hicest hq9plus HTML HTML4strict HTML5 icon idl ini inno intercal io ispfpanel Java5 Java JavaScript JCL j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematicaMatLab Mercury Metapost Mirc MK-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray Powerbuilder PowerShell proftPD Progress Prolog Properties ProvideX pureBasic Pycon PyS60 Python Qbasic QML Q Racket Rails RBS Rebol Reg Rexx Robots Roff rpmspec RSPLUS RubyRust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql SQL sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf XPP YAML Z80 ZXBASIC 
  
 点击[[doku>syntax_highlighting|这里]]了解更多高级的内容。 点击[[doku>syntax_highlighting|这里]]了解更多高级的内容。
行 430: 行 431:
 </file> </file>
 </code> </code>
 +
  
 <file php myexample.php> <file php myexample.php>
行 438: 行 440:
  
  
-===== 嵌入 HTML 和 PHP =====+ 
 +===== 嵌入 HTML和PHP  =====
  
 通过使用 ''%%<html>%%'' or ''%%<php>%%'' 标签来嵌入原始 HTML 和 PHP 代码。(如果想要包含块级元素,请使用大写的标签) 通过使用 ''%%<html>%%'' or ''%%<php>%%'' 标签来嵌入原始 HTML 和 PHP 代码。(如果想要包含块级元素,请使用大写的标签)
行 488: 行 491:
 **请注意**:嵌入的 HTML 与 PHP 默认只被显示源代码,并不被执行。 **请注意**:嵌入的 HTML 与 PHP 默认只被显示源代码,并不被执行。
  
-===== RSS/ATOM Feed Aggregation ===== +===== RSS/ATOM源聚合 ===== 
-[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is usedAll formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: +[[DokuWiki]] 以集成来自外部XML源的数据。为了解析XML源,使用了[[http://simplepie.org/|SimplePie]] . SimplePie理解的所有格式也可以在DokuWiki中使用。您可以通过多个额外的空格分隔参数来影响渲染:
- +
-^ Parameter  ^ Description ^ +
-| any number | will be used as maximum number items to show, defaults to 8 | +
-| reverse    | display the last items in the feed first | +
-| author     | show item authors names | +
-| date       | show item dates | +
-| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | +
-| nosort     | do not sort the items in the feed | +
-| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |+
  
-The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.+^ 参数  ^ 描述 ^ 
 +| any number | 将用作要显示的最大项目数,默认为 8 | 
 +| reverse    | 首先显示feed中的最后一项 | 
 +| author     | 显示项目作者姓名 | 
 +| date       | 显示项目日期 | 
 +| description| 显示项目描述。如果HTML不可用,那么所有HTML标签都将被去除 | 
 +| nosort     | 不 Feed 中的项目进行排序 | 
 +//n//[dhm] | 刷新周期,其中 d=天,h=小时,m=分钟。(例如 12 小时 = 12 小时)|
  
-By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''.+刷新周期默认为 4 小时,任何低于 10 分钟的值都将被视为 10 分钟。 [[wiki:DokuWiki]] 常会尝试提供页面的缓存版本,显然当页面包含动态外部内容时,这是不合适的。该参数告诉 [[wiki:DokuWiki]] 如果渲染页面的时间超过了刷新周期,则会重新渲染页面。 
 +默认情况下,Feed 将按日期排序,最新项目排在最前面。 你可以使用''reverse''参数按照最旧排序或者使用''nosort''按原样显示。
  
-**Example:**+**例子:**
  
   {{rss>http://slashdot.org/index.rss 5 author date 1h }}   {{rss>http://slashdot.org/index.rss 5 author date 1h }}
行 511: 行 513:
  
  
-===== 宏 =====+===== 控制宏 =====
  
 部分宏可以影响 DokuWiki 在页面中的渲染。例如: 部分宏可以影响 DokuWiki 在页面中的渲染。例如:
  
-Macro           ^ Description |+宏           ^ 描述 |
 | %%~~NOTOC~~%%   | 禁用表格 | | %%~~NOTOC~~%%   | 禁用表格 |
 | %%~~NOCACHE~~%% | 默认 DokuWiki 会缓存所有的页面输出。但有时候你可能并不想要这个特性(例如使用了%%<php>%%语法),引用此宏可以强制让 DokuWiki 在每次被调用时重新渲染页面 | | %%~~NOCACHE~~%% | 默认 DokuWiki 会缓存所有的页面输出。但有时候你可能并不想要这个特性(例如使用了%%<php>%%语法),引用此宏可以强制让 DokuWiki 在每次被调用时重新渲染页面 |
wiki/syntax.1688614788.txt · 最后更改: 2023/07/06 03:39 由 ob