Dokuwiki: Difference between revisions

imported>Onny
mNo edit summary
imported>Onny
Better explanation for config examples
Line 18: Line 18:
== Configuration ==
== Configuration ==


=== Users and permissions ===
Besides several options which are exposed by the DokuWiki module in NixOS, you can also use <code>extraConfig</code> to add custom options to your DokuWiki configuration. See the [https://www.dokuwiki.org/config upstream documentation] for available options.


To disable the user permissions completely and make the Wiki editable by anyone (even anonymous users), you can use following configuration
=== Clean URLs ===
 
If supported by the webserver you've choosen (using the <code>webserver</code> option), you can enable clean urls or url rewriting by enabling the option [https://www.dokuwiki.org/config:userewrite userewrite]. This means you can access your sites with the simple URL scheme like http://localhost/my_project .


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
services.dokuwiki.sites."localhost" = {
services.dokuwiki.sites."localhost".extraConfig = ''
  aclUse = false;
  $conf['userewrite'] = 1;
  extraConfig = ''
'';
    $conf['userewrite'] = 1;
  '';
};
};
</nowiki>}}
Clean URLs are reported to work with the webserver [[Caddy]].
=== Anonymous editing ===
To disable the user authentication completely and make the Wiki editable by anyone (even anonymous users), you can disable the config [https://www.dokuwiki.org/config:useacl useacl] with the following option
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
services.dokuwiki.sites."localhost".aclUse = false;
</nowiki>}}
</nowiki>}}