about summary refs log tree commit diff
path: root/pkgs/servers/web-apps/wordpress/packages/README.md
blob: 814ed8d0468ebdda8657fda58ea304c4b11211b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
= Adding plugin, theme or language =

To extend the wordpressPackages set, add a new line to the corresponding json
file with the codename of the package:

- `wordpress-languages.json` for language packs
- `wordpress-themes.json` for themes
- `wordpress-plugins.json` for plugins

The codename is the last part in the url of the plugin or theme page, for
example `cookie-notice` in in the url
`https://wordpress.org/plugins/cookie-notice/` or `twentytwenty` in
`https://wordpress.org/themes/twentytwenty/`.

In case of language packages, the name consists of country and language codes.
For example `de_DE` for country code `de` (Germany) and language `DE` (German).
For available translations and language codes see [upstream translation repository](https://translate.wordpress.org).

To regenerate the nixpkgs wordpressPackages set, run:

```
./generate.sh
```

After that you can commit and submit the changes.

= Usage with the Wordpress module =

The plugins will be available in the namespace `wordpressPackages.plugins`.
Using it together with the Wordpress module could look like this:

```nix
{
  services.wordpress = {
    sites."blog.${config.networking.domain}" = {
      plugins = with pkgs.wordpressPackages.plugins; [
        anti-spam-bee
        code-syntax-block
        cookie-notice
        lightbox-with-photoswipe
        wp-gdpr-compliance
      ];
    };
  };
}
```

The same scheme applies to `themes` and `languages`.