Docnet.Config.CopyThemeToDestination C# (CSharp) Méthode

CopyThemeToDestination() private méthode

private CopyThemeToDestination ( ) : void
Résultat void
        internal void CopyThemeToDestination()
        {
            var sourceFolder = Path.Combine(this.ThemeFolder, "Destination");
            if(!Directory.Exists(sourceFolder))
            {
                Console.WriteLine("[WARNING] No theme content found! 'Destination' folder in theme folder '{0}' is missing.", this.ThemeFolder);
                return;
            }
            Utils.DirectoryCopy(sourceFolder, this.Destination, copySubFolders:true);
        }

Usage Example

Exemple #1
0
 /// <summary>
 /// Generates the pages from the md files in the source, using the page template loaded and the loaded config.
 /// </summary>
 /// <returns>true if everything went ok, false otherwise</returns>
 private void GeneratePages()
 {
     if (_input.ClearDestinationFolder)
     {
         Console.WriteLine("Clearing destination folder '{0}'", _loadedConfig.Destination);
         _loadedConfig.ClearDestinationFolder();
     }
     Console.WriteLine("Copying theme '{0}'", _loadedConfig.ThemeName);
     _loadedConfig.CopyThemeToDestination();
     Console.WriteLine("Copying source folders to copy.");
     _loadedConfig.CopySourceFoldersToCopy();
     Console.WriteLine("Generating pages in '{0}'", _loadedConfig.Destination);
     _loadedConfig.Pages.GenerateOutput(_loadedConfig, new NavigatedPath());
     Console.WriteLine("Generating search index");
     _loadedConfig.GenerateSearchData();
     Console.WriteLine("Done!");
 }