/// <summary>
        /// Specifies one or more configuration file(s) instead of using `_config.yml` automatically.
        /// Settings in later files override settings in earlier files.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="configurationFilePaths">One or more custom configuration file(s).</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="configurationFilePaths"/> provided.</returns>
        public static JekyllBuildSettings WithConfiguration(this JekyllBuildSettings settings, params FilePath[] configurationFilePaths)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Configuration = configurationFilePaths;

            return(settings);
        }
        /// <summary>
        /// Sets the Site Source directory, the directory where Jekyll will read files (defaults to `./`).
        /// -s, --source DIR
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="sourceDirectoryPath">The source directory (defaults to `./`).</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="sourceDirectoryPath"/> provided.</returns>
        public static JekyllBuildSettings SetSource(this JekyllBuildSettings settings, DirectoryPath sourceDirectoryPath)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Source = sourceDirectoryPath;

            return(settings);
        }
        /// <summary>
        /// Sets the log level which should be used to run the Jekyll command.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="logLevel">Log level which should be used to run the Jekyll command.</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="logLevel"/> provided.</returns>
        public static JekyllBuildSettings SetLogLevel(this JekyllBuildSettings settings, JekyllLogLevel?logLevel)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.LogLevel = logLevel;

            return(settings);
        }
        /// <summary>
        /// Specifies if Bundler should not be used to execute Jekyll.
        /// `jekyll` instead of `bundle exec`...
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="enable"><see langword="true"/> to use Bundler to execute Jekyll, otherwise <see langword="false"/>.</param>
        /// <exception cref="ArgumentNullException"/>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllSettings.DoNotUseBundler"/> property updated with the value provided in <paramref name="enable"/>.</returns>
        public static JekyllBuildSettings DoNotUseBundler(this JekyllBuildSettings settings, bool?enable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.DoNotUseBundler = enable;

            return(settings);
        }
        /// <summary>
        /// Sets the layout directory instead of using `_layouts/` automatically
        /// --layouts DIR
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="layoutsDirectory">The layouts directory (defaults to ./_layouts).</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="layoutsDirectory"/> provided.</returns>
        public static JekyllBuildSettings SetLayouts(this JekyllBuildSettings settings, DirectoryPath layoutsDirectory)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Layouts = layoutsDirectory;

            return(settings);
        }
        /// <summary>
        /// Sets if the full backtrace should be shown when an error occurs.
        /// -t, --trace
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="enable"><see langword="true"/> to show the full backtrace when an error occurs, otherwise <see langword="false"/>.</param>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllBuildSettings.Trace"/> property updated with the value provided in <paramref name="enable"/>.</returns>
        public static JekyllBuildSettings EnableTrace(this JekyllBuildSettings settings, bool enable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Trace = enable;

            return(settings);
        }
        /// <summary>
        /// Sets if the build should fail if there is a YAML syntax error in a page's front matter.
        /// --strict_front_matter
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="enable"><see langword="true"/> to fail if errors are present in front matter, otherwise <see langword="false"/>.</param>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllBuildSettings.StrictFrontMatter"/> property updated with the value provided in <paramref name="enable"/>.</returns>
        public static JekyllBuildSettings UseStrictFrontMatter(this JekyllBuildSettings settings, bool enable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.StrictFrontMatter = enable;

            return(settings);
        }
        /// <summary>
        /// Sets the Plugins directory instead of using `_plugins/` automatically.
        /// -p, --plugins DIR1[,DIR2,...]
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="pluginDirectoryPaths">One or more plugin directory path(s).</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="pluginDirectoryPaths"/> provided.</returns>
        public static JekyllBuildSettings WithPlugins(this JekyllBuildSettings settings, params DirectoryPath[] pluginDirectoryPaths)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Plugins = pluginDirectoryPaths;

            return(settings);
        }
        /// <summary>
        /// Sets if caching to disk in non-safe mode should be disabled.
        /// --disable-disk-cache
        ///
        /// Disable caching of content to disk in order to skip creating a `.jekyll-cache` or similar
        /// directory at the source to avoid interference with virtual environments and third-party
        /// directory watchers. Caching to disk is always disabled in safe mode.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="disable"><see langword="true"/> to disable caching to disk in non-safe mode, otherwise <see langword="false"/>.</param>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllBuildSettings.DisableDiskCache"/> property updated with the value provided in <paramref name="disable"/>.</returns>
        public static JekyllBuildSettings DisableDiskCache(this JekyllBuildSettings settings, bool disable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.DisableDiskCache = disable;

            return(settings);
        }
        /// <summary>
        /// Sets if posts that were marked as unpublished should be rendered.
        /// --unpublished
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="enable"><see langword="true"/> to render posts that were marked as unpublished, otherwise <see langword="false"/>.</param>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllBuildSettings.Unpublished"/> property updated with the value provided in <paramref name="enable"/>.</returns>
        public static JekyllBuildSettings RenderUnpublished(this JekyllBuildSettings settings, bool enable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Unpublished = enable;

            return(settings);
        }
        /// <summary>
        /// Sets if polling should be used when watching for changes.
        /// --force_polling
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="enable"><see langword="true"/> to force polling when watching for changes, otherwise <see langword="false"/>.</param>
        /// <returns>The <paramref name="settings"/> instance with the <see cref="JekyllBuildSettings.ForcePolling"/> property updated with the value provided in <paramref name="enable"/>.</returns>
        public static JekyllBuildSettings ForcePolling(this JekyllBuildSettings settings, bool enable = true)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.ForcePolling = enable;

            return(settings);
        }
        /// <summary>
        /// Sets the base URL to serve the website from.
        /// -b, --baseurl URL
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="baseUrl">The base URL to serve the website from.</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="baseUrl"/> provided.</returns>
        public static JekyllBuildSettings SetBaseUrl(this JekyllBuildSettings settings, string baseUrl)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.BaseUrl = baseUrl;

            return(settings);
        }
        /// <summary>
        /// Sets a limit to the number of posts to parse and publish.
        /// --limit_posts NUM
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="maxPosts">The maximum number of posts to parse and publish.</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="maxPosts"/> provided.</returns>
        public static JekyllBuildSettings LimitPosts(this JekyllBuildSettings settings, int?maxPosts)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.LimitPosts = maxPosts;

            return(settings);
        }
        /// <summary>
        /// Sets the Site Destination directory (defaults to `./_site`).
        /// -d, --destination DIR
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="destinationDirectoryPath">The destination directory (defaults to `./_site`).</param>
        /// <returns>The <paramref name="settings"/> instance with updated with the <paramref name="destinationDirectoryPath"/> provided.</returns>
        public static JekyllBuildSettings SetDestination(this JekyllBuildSettings settings, DirectoryPath destinationDirectoryPath)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            settings.Destination = destinationDirectoryPath;

            return(settings);
        }
        /// <summary>
        /// Sets the working directory which should be used to run the Jekyll command.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="path">Working directory which should be used to run the Jekyll command.</param>
        /// <exception cref="ArgumentNullException"/>
        /// <returns>The <paramref name="settings"/> instance with <see cref="Cake.Core.Tooling.ToolSettings.WorkingDirectory"/> set to <paramref name="path"/>.</returns>
        public static JekyllBuildSettings SetWorkingDirectory(this JekyllBuildSettings settings, DirectoryPath path)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (path is null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            settings.WorkingDirectory = path;

            return(settings);
        }