WordPress: Difference between revisions

imported>Onny
mNo edit summary
imported>Onny
Notes on configure default theme
Line 58: Line 58:


# For shits and giggles, let's package the responsive theme
# For shits and giggles, let's package the responsive theme
responsiveTheme = pkgs.stdenv.mkDerivation {
responsive = pkgs.stdenv.mkDerivation {
   name = "responsive-theme";
   name = "responsive";
   # Download the theme from the wordpress site
   # Download the theme from the wordpress site
   src = pkgs.fetchurl {
   src = pkgs.fetchurl {
Line 72: Line 72:


# Wordpress plugin 'akismet' installation example
# Wordpress plugin 'akismet' installation example
akismetPlugin = pkgs.stdenv.mkDerivation {
akismet = pkgs.stdenv.mkDerivation {
   name = "akismet-plugin";
   name = "akismet";
   # Download the theme from the wordpress site
   # Download the theme from the wordpress site
   src = pkgs.fetchurl {
   src = pkgs.fetchurl {
Line 88: Line 88:
{
{
   services.wordpress.sites."localhost" = {
   services.wordpress.sites."localhost" = {
     themes = [ responsiveTheme ];
     themes = [ responsive ];
     plugins = [ akismetPlugin ];
     plugins = [ akismet ];
     virtualHost.adminAddr = "hello@example.org";
     virtualHost.adminAddr = "hello@example.org";
    extraConfig = ''
      // Activate and enable theme responsive as default
      define ('WP_DEFAULT_THEME', 'responsive');
    '';
   };
   };
}
}