Dokuwiki: Difference between revisions
imported>Onny mNo edit summary |
m explained the „no need for databases" |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[https://www.dokuwiki.org DokuWiki] is a web application and simple Wiki software for creating documentation and editable pages in markdown language. Compared to other Wikis, it is more minimal and only depends on PHP and file access without any need for databases. | [https://www.dokuwiki.org DokuWiki] is a web application and simple Wiki software for creating documentation and editable pages in markdown language. Compared to other Wikis, it is more minimal and only depends on PHP and file access without any need for databases. It stores all information in plain text files to be available even without the DokuWiki software (e.g. to read directly from backup). | ||
== Installation == | == Installation == | ||
Line 8: | Line 8: | ||
services.dokuwiki.sites."localhost" = { | services.dokuwiki.sites."localhost" = { | ||
enable = true; | enable = true; | ||
settings.title = "My Wiki"; | |||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
Line 18: | Line 16: | ||
== Configuration == | == Configuration == | ||
Besides several options which are exposed by the DokuWiki module in NixOS, you can also use <code> | Besides several options which are exposed by the DokuWiki module in NixOS, you can also use <code>settings</code> option to add custom options to your DokuWiki configuration. See the [https://www.dokuwiki.org/config upstream documentation] for available options. | ||
=== Templates === | === Templates === | ||
Line 27: | Line 25: | ||
let | let | ||
dokuwiki-template-mindthedark = pkgs.stdenv.mkDerivation { | dokuwiki-template-mindthedark = pkgs.stdenv.mkDerivation rec { | ||
name = "mindthedark"; | name = "mindthedark"; | ||
src = pkgs. | version = "2021-12-24"; | ||
src = pkgs.fetchFromGitHub { | |||
sha256 = " | owner = "MrReSc"; | ||
repo = "MindTheDark"; | |||
rev = version; | |||
sha256 = "sha256-8wWwwAYYQcUYzHpnSKOubZh7UzwfxvWXXNU7CUAiS3o="; | |||
}; | }; | ||
installPhase = "mkdir -p $out; cp -R * $out/"; | installPhase = "mkdir -p $out; cp -R * $out/"; | ||
}; | }; | ||
Line 40: | Line 40: | ||
services.dokuwiki.sites."localhost" = { | services.dokuwiki.sites."localhost" = { | ||
templates = [ dokuwiki-template-mindthedark ]; | templates = [ dokuwiki-template-mindthedark ]; | ||
settings = { | |||
template = "mindthedark"; | |||
tpl.mindthedark.autoDark = true; | |||
}; | |||
}; | }; | ||
}; | }; | ||
Line 59: | Line 59: | ||
dokuwiki-plugin-edittable = pkgs.stdenv.mkDerivation { | dokuwiki-plugin-edittable = pkgs.stdenv.mkDerivation { | ||
name = "edittable"; | name = "edittable"; | ||
src = pkgs. | src = pkgs.fetchzip { | ||
url = "https://github.com/cosmocode/edittable/archive/master.zip"; | url = "https://github.com/cosmocode/edittable/archive/master.zip"; | ||
sha256 = "sha256-l+GZdFGp6wyNuCbAZB9IbwpY5c/S4vSW12VP0mJHKXs="; | sha256 = "sha256-l+GZdFGp6wyNuCbAZB9IbwpY5c/S4vSW12VP0mJHKXs="; | ||
}; | }; | ||
sourceRoot = "."; | sourceRoot = "."; | ||
installPhase = "mkdir -p $out; cp -R edittable-master/* $out/"; | installPhase = "mkdir -p $out; cp -R edittable-master/* $out/"; | ||
}; | }; | ||
Line 82: | Line 81: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
services.dokuwiki.sites."localhost". | services.dokuwiki.sites."localhost".settings = { | ||
userewrite = true; | |||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
Line 95: | Line 93: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
services.dokuwiki.sites."localhost". | services.dokuwiki.sites."localhost".settings = { | ||
acluse = false; | |||
}; | |||
</nowiki>}} | </nowiki>}} | ||
Line 105: | Line 105: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
services.dokuwiki.sites."localhost". | services.dokuwiki.sites."localhost".settings = { | ||
baseurl = "https://example.org"; | |||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
== See also == | |||
* [[Mediawiki]], PHP- and web-based wiki software. | |||
* [[Outline]], a modern web based wiki and knowledge base for teams. | |||
[[Category:Server]] | |||
[[Category:Web Applications]] | [[Category:Web Applications]] |