protected function createSite($path, $themeName, $preferLock, $preferSource, $noScripts)
    {
        $this->checkRequirements($themeName);

        $themePair = new PackageNameVersion($themeName);
        $this->createBlankSite($path, $themePair);

        if ($themeName === self::BLANK_THEME) {
            return;
        }

        if ($this->packageManager->existPackage($themeName) === false) {
            throw new \RuntimeException(sprintf('The theme: "%s" does not exist at registered repositories.', $themeName));
        }

        if ($this->packageManager->isThemePackage($themeName) === false) {
            throw new \RuntimeException(sprintf('The theme: "%s" is not a Spress theme.', $themeName));
        }

        if ($this->packageManager->isPackageDependOn($themeName, $this->spressInstallerPackage) === false) {
            throw new \RuntimeException(sprintf(
                sprintf('This version of Spress requires a theme with "%s".', $this->spressInstallerPackage),
                $themeName
            ));
        }

        $this->updateDependencies($preferLock, $preferSource, $noScripts);

        $relativeThemePath = 'src/themes/'.$themePair->getName();
        $this->copyContentFromThemeToSite($path, $relativeThemePath);
        $this->setUpSiteConfigFile($path, $relativeThemePath, $themePair->getName());
    }