depot/third_party/nixpkgs/pkgs/servers/web-apps/wordpress/packages
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30
..
default.nix Project import generated by Copybara. 2024-02-06 17:22:34 -08:00
generate.sh Project import generated by Copybara. 2024-02-06 17:22:34 -08:00
languages.json Project import generated by Copybara. 2024-05-15 17:35:15 +02:00
plugins.json Project import generated by Copybara. 2024-06-20 20:27:18 +05:30
README.md Project import generated by Copybara. 2024-04-21 17:54:59 +02:00
themes.json Project import generated by Copybara. 2024-04-21 17:54:59 +02:00
thirdparty.nix Project import generated by Copybara. 2024-06-05 17:53:02 +02:00
wordpress-languages.json Project import generated by Copybara. 2024-02-06 17:22:34 -08:00
wordpress-plugins.json Project import generated by Copybara. 2024-05-15 17:35:15 +02:00
wordpress-themes.json Project import generated by Copybara. 2024-02-06 17:22:34 -08:00

= 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.

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:

{
  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.