We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
另一种选择是
Another option will be to
我不熟悉您提到的工具,但我对您可能采用的一般策略有一些想法。
如果您对 DocuWiki 插件的输出感到满意,您可以用 perl、sh、ruby 等编写某种脚本来执行插件并存储将来静态提供的内容。
看来 DocuWiki 只是调用 xsltproc 程序并提供输出。 如果插件正常工作,那么您应该能够直接从命令行或您自己的脚本调用 xsltproc。 看看 DocuWiki 中的这些行
exec("$xsltproc -o $tmpXhtmlFile $docbookXsl $tmpDocbookFile 2>&1", $errors);
$returnXhtml = shell_exec("$xsltproc " . DOKU_PLUGIN . "/docbook/xhtmlCleaner.xsl $tmpXhtmlFile");
当选项 1 或 2 起作用后。 在修订控制系统中设置一个 cron 作业或挂钩,以监视对原始 docbook 源的更改,并调用脚本来重新生成静态版本。
I'm not familar with the tool you mentioned, but I have some thoughts on general strategies you might employ.
If you're happy with the output from the DocuWiki plugin you could write some sort of script in perl, sh, ruby, etc. that executes the plugin and stores the content to be served up statically in the future.
It appears that DocuWiki is simply calling the xsltproc program and serving up the output. If the plugin is working then you should be able to call xsltproc directly from the command line or your own script. Take a look at these lines from DocuWiki
exec("$xsltproc -o $tmpXhtmlFile $docbookXsl $tmpDocbookFile 2>&1", $errors);
$returnXhtml = shell_exec("$xsltproc " . DOKU_PLUGIN . "/docbook/xhtmlCleaner.xsl $tmpXhtmlFile");
Once you have option 1 or 2 working. Setup a cron job or hook in your revision control system to watch for changes to the original docbook source and call the script to regenerate the static version.
一个小(但可能很重要)注意事项:DokuWiki 包含一个缓存机制,用于保存输出的 HTML 文件。 这意味着通常该插件很少执行(即仅在第一次查看页面的特定修订版时)。
One small (but possibly important) note: DokuWiki contains a caching mechanism which saves the outputted HTML file. This means that normally the plugin would be executed very infrequently (ie. only the first time a particular revision of the page is viewed).