Dokuwiki: Difference between revisions

imported>Onny
m Update example URL
imported>Onny
Add information about templates
Line 19: Line 19:


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.
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.
=== Templates ===
Unfortunately no templates are packaged yet in nixpkgs. It is possible to manually package a template and include it in your Dokuwiki instance. In the following example the tempalte [https://www.dokuwiki.org/template:mindthedark mindthedark] is packaged and enabled
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
let
  dokuwiki-template-mindthedark = pkgs.stdenv.mkDerivation {
    name = "mindthedark";
    src = pkgs.fetchurl {
      url = "https://github.com/MrReSc/MindTheDark/archive/2021-12-24.zip";
      sha256 = "12qwd8cz4ay4lzp69ra5cmpssqwav6nxn767l43s86ja2b7m7zia";
    };
    buildInputs = [ pkgs.unzip ];
    installPhase = "mkdir -p $out; cp -R * $out/";
  };
in {
  services.dokuwiki.sites."localhost".templates = [ dokuwiki-template-mindthedark ];
};
</nowiki>}}


=== Clean URLs ===
=== Clean URLs ===