Ejemplo n.º 1
0
        public static void CompileFolder(string title, string fullPath, string outputPath)
        {
            var compiler = new Compiler(fullPath, outputPath);
            compiler.CompileFolder(compiler.RootFolder = new Folder { Title = title, Trail = string.Empty });

            var menuToc = Path.Combine(outputPath, "toc.html");
            var sb = new StringBuilder();
            CreateHtmlToc(compiler.RootFolder, sb);
            File.WriteAllText(menuToc, sb.ToString());
        }
Ejemplo n.º 2
0
        public static void CompileFolder(IDocsOutput output, string fullPath, string homeTitle, string versionUrl)
        {
            if (output == null)
                throw new ArgumentNullException("output");

            var compiler = new Compiler(Path.Combine(fullPath, "docs"))
                           	{
                           		Output = output,
                           		CodeSamplesPath = Path.Combine(fullPath, "code-samples")
                           	};

            compiler.CompileFolder(compiler.RootFolder = new Folder { Title = homeTitle, Trail = string.Empty }, versionUrl);

            compiler.Output.GenerateToc(compiler.RootFolder);
        }