+
+Example
+-------
+
+This example demonstrates using a function defined in this sample library.
+
+*)
+#r "YC.QuickGraph.Query.dll"
+open YC.QuickGraph.Query
+
+printfn "hello = %i" <| Library.hello 0
+
+(**
+Some more info
+
+Samples & documentation
+-----------------------
+
+The library comes with comprehensible documentation.
+It can include tutorials automatically generated from `*.fsx` files in [the content folder][content].
+The API reference is automatically generated from Markdown comments in the library implementation.
+
+ * [Tutorial](tutorial.html) contains a further explanation of this sample library.
+
+ * [API Reference](reference/index.html) contains automatically generated documentation for all types, modules
+ and functions in the library. This includes additional brief samples on using most of the
+ functions.
+
+Contributing and copyright
+--------------------------
+
+The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
+the project and submit pull requests. If you're adding a new public API, please also
+consider adding [samples][content] that can be turned into a documentation. You might
+also want to read the [library design notes][readme] to understand how it works.
+
+The library is available under Public Domain license, which allows modification and
+redistribution for both commercial and non-commercial purposes. For more information see the
+[License file][license] in the GitHub repository.
+
+ [content]: https://github.com/fsprojects/YC.QuickGraph.Query/tree/master/docs/content
+ [gh]: https://github.com/fsprojects/YC.QuickGraph.Query
+ [issues]: https://github.com/fsprojects/YC.QuickGraph.Query/issues
+ [readme]: https://github.com/fsprojects/YC.QuickGraph.Query/blob/master/README.md
+ [license]: https://github.com/fsprojects/YC.QuickGraph.Query/blob/master/LICENSE.txt
+*)
diff --git a/docs/content/tutorial.fsx b/docs/content/tutorial.fsx
new file mode 100644
index 0000000..62fb0ad
--- /dev/null
+++ b/docs/content/tutorial.fsx
@@ -0,0 +1,19 @@
+(*** hide ***)
+// This block of code is omitted in the generated HTML documentation. Use
+// it to define helpers that you do not want to show in the documentation.
+#I "../../bin"
+
+(**
+Introducing your project
+========================
+
+Say more
+
+*)
+#r "YC.QuickGraph.Query.dll"
+open YC.QuickGraph.Query
+
+Library.hello 0
+(**
+Some more info
+*)
diff --git a/docs/files/img/logo-template.pdn b/docs/files/img/logo-template.pdn
new file mode 100644
index 0000000..52606f5
Binary files /dev/null and b/docs/files/img/logo-template.pdn differ
diff --git a/docs/files/img/logo.png b/docs/files/img/logo.png
new file mode 100644
index 0000000..8a2b81b
Binary files /dev/null and b/docs/files/img/logo.png differ
diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx
new file mode 100644
index 0000000..18dc8f2
--- /dev/null
+++ b/docs/tools/generate.fsx
@@ -0,0 +1,145 @@
+// --------------------------------------------------------------------------------------
+// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory
+// (the generated documentation is stored in the 'docs/output' directory)
+// --------------------------------------------------------------------------------------
+
+// Binaries that have XML documentation (in a corresponding generated XML file)
+// Any binary output / copied to bin/projectName/projectName.dll will
+// automatically be added as a binary to generate API docs for.
+// for binaries output to root bin folder please add the filename only to the
+// referenceBinaries list below in order to generate documentation for the binaries.
+// (This is the original behaviour of ProjectScaffold prior to multi project support)
+let referenceBinaries = []
+// Web site location for the generated documentation
+let website = "/YC.QuickGraph.Query"
+
+let githubLink = "https://github.com/YaccConstructor/YC.QuickGraph.Query"
+
+// Specify more information about your project
+let info =
+ [ "project-name", "YC.QuickGraph.Query"
+ "project-author", "YaccConstructor"
+ "project-summary", "Path query engine for QuickGraph"
+ "project-github", githubLink
+ "project-nuget", "http://nuget.org/packages/YC.QuickGraph.Query" ]
+
+// --------------------------------------------------------------------------------------
+// For typical project, no changes are needed below
+// --------------------------------------------------------------------------------------
+
+#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx"
+#I "../../packages/build/FAKE/tools/"
+#r "FakeLib.dll"
+open Fake
+open System.IO
+open Fake.FileHelper
+open FSharp.Literate
+open FSharp.MetadataFormat
+
+// When called from 'build.fsx', use the public project URL as
+// otherwise, use the current 'output' directory.
+#if RELEASE
+let root = website
+#else
+let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output")
+#endif
+
+// Paths with template/source/output locations
+let bin = __SOURCE_DIRECTORY__ @@ "../../bin"
+let content = __SOURCE_DIRECTORY__ @@ "../content"
+let output = __SOURCE_DIRECTORY__ @@ "../output"
+let files = __SOURCE_DIRECTORY__ @@ "../files"
+let templates = __SOURCE_DIRECTORY__ @@ "templates"
+let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
+let docTemplate = "docpage.cshtml"
+
+// Where to look for *.csproj templates (in this order)
+let layoutRootsAll = new System.Collections.Generic.Dictionary()
+layoutRootsAll.Add("en",[ templates; formatting @@ "templates"
+ formatting @@ "templates/reference" ])
+subDirectories (directoryInfo templates)
+|> Seq.iter (fun d ->
+ let name = d.Name
+ if name.Length = 2 || name.Length = 3 then
+ layoutRootsAll.Add(
+ name, [templates @@ name
+ formatting @@ "templates"
+ formatting @@ "templates/reference" ]))
+
+// Copy static files and CSS + JS from F# Formatting
+let copyFiles () =
+ CopyRecursive files output true |> Log "Copying file: "
+ ensureDirectory (output @@ "content")
+ CopyRecursive (formatting @@ "styles") (output @@ "content") true
+ |> Log "Copying styles and scripts: "
+
+let binaries =
+ let manuallyAdded =
+ referenceBinaries
+ |> List.map (fun b -> bin @@ b)
+
+ let conventionBased =
+ directoryInfo bin
+ |> subDirectories
+ |> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name))
+ |> List.ofArray
+
+ conventionBased @ manuallyAdded
+
+let libDirs =
+ let conventionBasedbinDirs =
+ directoryInfo bin
+ |> subDirectories
+ |> Array.map (fun d -> d.FullName)
+ |> List.ofArray
+
+ conventionBasedbinDirs @ [bin]
+
+// Build API reference from XML comments
+let buildReference () =
+ CleanDir (output @@ "reference")
+ MetadataFormat.Generate
+ ( binaries, output @@ "reference", layoutRootsAll.["en"],
+ parameters = ("root", root)::info,
+ sourceRepo = githubLink @@ "tree/master",
+ sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
+ publicOnly = true,libDirs = libDirs )
+
+// Build documentation from `fsx` and `md` files in `docs/content`
+let buildDocumentation () =
+
+ // First, process files which are placed in the content root directory.
+
+ Literate.ProcessDirectory
+ ( content, docTemplate, output, replacements = ("root", root)::info,
+ layoutRoots = layoutRootsAll.["en"],
+ generateAnchors = true,
+ processRecursive = false)
+
+ // And then process files which are placed in the sub directories
+ // (some sub directories might be for specific language).
+
+ let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.TopDirectoryOnly)
+ for dir in subdirs do
+ let dirname = (new DirectoryInfo(dir)).Name
+ let layoutRoots =
+ // Check whether this directory name is for specific language
+ let key = layoutRootsAll.Keys
+ |> Seq.tryFind (fun i -> i = dirname)
+ match key with
+ | Some lang -> layoutRootsAll.[lang]
+ | None -> layoutRootsAll.["en"] // "en" is the default language
+
+ Literate.ProcessDirectory
+ ( dir, docTemplate, output @@ dirname, replacements = ("root", root)::info,
+ layoutRoots = layoutRoots,
+ generateAnchors = true )
+
+// Generate
+copyFiles()
+#if HELP
+buildDocumentation()
+#endif
+#if REFERENCE
+buildReference()
+#endif
diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml
new file mode 100644
index 0000000..1ae4a1b
--- /dev/null
+++ b/docs/tools/templates/template.cshtml
@@ -0,0 +1,58 @@
+
+
+
+
+ @Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+