1= Adding plugin, theme or language =
2
3To extend the wordpressPackages set, add a new line to the corresponding json
4file with the codename of the package:
5
6- `wordpress-languages.json` for language packs
7- `wordpress-themes.json` for themes
8- `wordpress-plugins.json` for plugins
9
10The codename is the last part in the url of the plugin or theme page, for
11example `cookie-notice` in in the url
12`https://wordpress.org/plugins/cookie-notice/` or `twentytwenty` in
13`https://wordpress.org/themes/twentytwenty/`.
14
15In case of language packages, the name consists of country and language codes.
16For example `de_DE` for country code `de` (Germany) and language `DE` (German).
17For available translations and language codes see [upstream translation repository](https://translate.wordpress.org).
18
19To regenerate the nixpkgs wordpressPackages set, run:
20
21```
22./generate.sh
23```
24
25After that you can commit and submit the changes.
26
27= Usage with the Wordpress module =
28
29The plugins will be available in the namespace `wordpressPackages.plugins`.
30Using it together with the Wordpress module could look like this:
31
32```nix
33{
34 services.wordpress = {
35 sites."blog.${config.networking.domain}" = {
36 plugins = with pkgs.wordpressPackages.plugins; [
37 anti-spam-bee
38 code-syntax-block
39 cookie-notice
40 lightbox-with-photoswipe
41 wp-gdpr-compliance
42 ];
43 };
44 };
45}
46```
47
48The same scheme applies to `themes` and `languages`.