diff --git a/docs/tools/build-docs.fsx b/docs/tools/build-docs.fsx index b3ebbe98..4ad602d6 100644 --- a/docs/tools/build-docs.fsx +++ b/docs/tools/build-docs.fsx @@ -7,28 +7,23 @@ let referenceBinaries = [ "MathNet.Numerics.dll"; "MathNet.Numerics.FSharp.dll" ] // Web site location for the generated documentation let website = "http://numerics.mathdotnet.com/docs" +let githubLink = "http://github.com/mathnet/mathnet-numerics" // Specify more information about your project let info = [ "project-name", "Math.NET Numerics" "project-author", "Christoph Ruegg, Marcus Cuda, Jurgen Van Gael" "project-summary", "Math.NET Numerics, providing methods and algorithms for numerical computations in science, engineering and every day use. .Net 4, .Net 3.5, SL5, Win8, WP8, PCL 47 and 136, Mono, Xamarin Android/iOS." - "project-github", "http://github.com/mathnet/mathnet-numerics" + "project-github", githubLink "project-nuget", "http://nuget.com/packages/MathNet.Numerics" ] // -------------------------------------------------------------------------------------- // For typical project, no changes are needed below // -------------------------------------------------------------------------------------- -#I "../../packages/FSharp.Formatting/lib/net40" -#I "../../packages/RazorEngine/lib/net40" -#I "../../packages/FSharp.Compiler.Service/lib/net40" -#r "../../packages/Microsoft.AspNet.Razor/lib/net40/System.Web.Razor.dll" +#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx" +#r "../../packages/FAKE/tools/NuGet.Core.dll" #r "../../packages/FAKE/tools/FakeLib.dll" -#r "RazorEngine.dll" -#r "FSharp.Literate.dll" -#r "FSharp.CodeFormat.dll" -#r "FSharp.MetadataFormat.dll" open Fake open System @@ -62,31 +57,39 @@ let layoutRoots = formatting @@ "templates/reference" ] // Copy static files and CSS + JS from F# Formatting -let copySupportFiles() = - CopyRecursive files output true |> Log "Copying file: " - ensureDirectory (output @@ "content") - CopyRecursive (formatting @@ "styles") (output @@ "content") true |> Log "Copying styles and scripts: " +let copyFiles() = + CopyRecursive files output true |> Log "Copying file: " + ensureDirectory (output @@ "content") + CopyRecursive (formatting @@ "styles") (output @@ "content") true + |> Log "Copying styles and scripts: " // Build API reference from XML comments -let buildReference() = - CleanDir(output @@ "reference") - for lib in referenceBinaries do - MetadataFormat.Generate - (bin @@ lib, output @@ "reference", layoutRoots, parameters = ("root", root) :: info, - sourceRepo = "https://github.com/mathnet/mathnet-numerics/tree/master/src", sourceFolder = @"..\..\src", - publicOnly = true, libDirs = [bin]) +let buildReference () = + CleanDir (output @@ "reference") + let binaries = + referenceBinaries + |> List.map (fun lib-> bin @@ lib) + MetadataFormat.Generate + ( binaries, output @@ "reference", layoutRoots, + parameters = ("root", root)::info, + sourceRepo = githubLink @@ "tree/master", + sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..", + publicOnly = true, libDirs = [bin] ) + // Build documentation from `fsx` and `md` files in `docs/content` let buildDocumentation() = - let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories) - for dir in Seq.append [ content ] subdirs do - let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "." - Literate.ProcessDirectory - (dir, docTemplate, output @@ sub, replacements = ("root", root) :: info, layoutRoots = layoutRoots, - references = false, lineNumbers = true, generateAnchors = true) + let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories) + for dir in Seq.append [content] subdirs do + let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "." + Literate.ProcessDirectory + ( dir, docTemplate, output @@ sub, replacements = ("root", root)::info, + layoutRoots = layoutRoots, + references = false, + lineNumbers = true, + generateAnchors = true ) // Generate -copySupportFiles() -buildDocumentation() +copyFiles() buildDocumentation() diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml index ffc1f438..315217af 100644 --- a/docs/tools/templates/template.cshtml +++ b/docs/tools/templates/template.cshtml @@ -1,16 +1,16 @@  - + @Title - - - + + + - - - - + + + +