Esempio n. 1
0
        static void Main(string[] args)
        {
            const string basePath = @"z:\Projects\RavenDB\RavenDB-docs\";

            IDocsOutput output = new HtmlDocsOutput
                                    {
                                        OutputPath = Path.Combine(basePath, "html-compiled"),
                                        PageTemplate = File.ReadAllText(Path.Combine(basePath, @"Tools\html-template.html")),
                                    };

            try
            {
                Compiler.CompileFolder(output, basePath, "Home");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Esempio n. 2
0
        private static void Generate(string rootPath, string version)
        {
            var docsPath = Path.Combine(rootPath, version);

            IDocsOutput output = new HtmlDocsOutput
            {
                OutputPath = Path.Combine(docsPath, "html-compiled"),
                PageTemplate = File.ReadAllText(Path.Combine(rootPath, @"Tools\html-template.html")),
                RootUrl = "http://ravendb.net/docs/",
            };

            try
            {
                Compiler.CompileFolder(output, docsPath, "Home", "2.0");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Esempio n. 3
0
	    /// <summary>
	    /// Create documentation output specification.
	    /// </summary>
	    /// <param name="rootPath">
	    /// The root path.
	    /// </param>
	    /// <param name="outputPath">
	    /// The output path.
	    /// </param>
	    /// <param name="outputType">
	    /// The output type.
	    /// </param>
	    /// <param name="debugMode"></param>
	    /// <returns>
	    /// The <see cref="IDocsOutput"/>.
	    /// </returns>
	    private static IDocsOutput CreateDocumentationOutputSpecification(string rootPath, string outputPath, OutputType outputType, bool debugMode)
        {
            if (outputType == OutputType.Markdown)
            {
                return new MarkdownDocsOutput
                           {
                               ContentType = OutputType.Markdown,
                               OutputPath = outputPath,
                               RootUrl = "http://ravendb.net/docs/",
                           };
            }

            if (outputType == OutputType.Html)
            {
                IDocsOutput output = new HtmlDocsOutput
                                         {
                                             ContentType = OutputType.Html,
                                             OutputPath = outputPath,
                                             PageTemplate =
                                                 File.ReadAllText(
                                                     Path.Combine(rootPath, @"Tools\html-template.html")),
                                             RootUrl = "http://ravendb.net/docs/",
											 ImagesPath = debugMode ? "images/" : null
                                         };
                return output;
            }

            return null;
        }