Skip to content

Commit

Permalink
TASK: Remove generation of site.xml in ./flow kickstart:site
Browse files Browse the repository at this point in the history
As the `./flow site:import` command was removed we don't need to generate a `site.xml` anymore.
  • Loading branch information
ahaeslich committed Jun 10, 2024
1 parent 3450b04 commit d27a607
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class KickstartCommandController extends CommandController
/**
* Kickstart a new site package
*
* This command generates a new site package with basic Fusion and Sites.xml
* This command generates a new site package with basic Fusion
*
* @param string $packageKey The packageKey for your site
* @param string $siteName The siteName of your site
Expand Down
28 changes: 1 addition & 27 deletions Neos.SiteKickstarter/Classes/Generator/AfxTemplateGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Package\PackageManager;
use Neos\Kickstarter\Service\GeneratorService;
use Neos\SiteKickstarter\Service\FusionRecursiveDirectoryRenderer;
use Neos\SiteKickstarter\Service\SimpleTemplateRenderer;
use Neos\Utility\Files;
use Neos\SiteKickstarter\Service\FusionRecursiveDirectoryRenderer;

/**
* Service to generate site packages
Expand Down Expand Up @@ -63,39 +63,13 @@ public function generateSitePackage(string $packageKey, string $siteName) : arra
]
]);

$this->generateSitesXml($packageKey, $siteName);
$this->generateSitesFusionDirectory($packageKey, $siteName);
$this->generateNodeTypesConfiguration($packageKey);
$this->generateAdditionalFolders($packageKey);

return $this->generatedFiles;
}

/**
* Generate a "Sites.xml" for the given package and name.
*
* @param string $packageKey
* @param string $siteName
* @throws \Neos\Flow\Package\Exception\UnknownPackageException
* @throws \Neos\FluidAdaptor\Core\Exception
*/
protected function generateSitesXml(string $packageKey, string $siteName) : void
{
$templatePathAndFilename = $this->getResourcePathForFile('Content/Sites.xml');

$contextVariables = [
'packageKey' => $packageKey,
'siteName' => htmlspecialchars($siteName),
'siteNodeName' => $this->generateSiteNodeName($packageKey),
'dimensions' => 'wat' //$this->contentDimensionZookeeper->getAllowedDimensionSubspace()
];

$fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);

$sitesXmlPathAndFilename = $this->packageManager->getPackage($packageKey)->getResourcesPath() . 'Private/Content/Sites.xml';
$this->generateFile($sitesXmlPathAndFilename, $fileContent);
}

/**
* Generate basic root Fusion file.
*
Expand Down

This file was deleted.

0 comments on commit d27a607

Please sign in to comment.