Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ Target "Nuget.AddNetStd" (fun _ ->
// Generate the documentation

Target "GenerateDocsEn" (fun _ ->
executeFSIWithArgs "docsrc/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
)

Target "GenerateDocsJa" (fun _ ->
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" ["--define:RELEASE"] [] |> ignore
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
)

// --------------------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions fcs/docsrc/tools/generate.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
let layoutRoots =
[ templates; formatting @@ "templates"
[ templates;
formatting @@ "templates"
formatting @@ "templates/reference" ]

// Copy static files and CSS + JS from F# Formatting
Expand Down Expand Up @@ -84,12 +85,11 @@ let buildReference () =

// Build documentation from `fsx` and `md` files in `docsrc/content`
let buildDocumentation () =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
for dir in Seq.append [content] subdirs do
for dir in [content] 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, generateAnchors = true )
layoutRoots = layoutRoots, generateAnchors = true, processRecursive=false )

// Generate
copyFiles()
Expand Down
14 changes: 5 additions & 9 deletions fcs/docsrc/tools/generate.ja.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ open FSharp.MetadataFormat

// When called from 'build.fsx', use the public project URL as <root>
// otherwise, use the current 'output' directory.
#if RELEASE
let root = website
#else
let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output/ja")
#endif
let root = "."

// Paths with template/source/output locations
let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45"
Expand All @@ -56,15 +52,15 @@ let docTemplate = formatting @@ "templates/docpage.cshtml"
// Where to look for *.csproj templates (in this order)
let layoutRoots =
[ templates
formatting @@ "templates"]
formatting @@ "templates"
formatting @@ "templates/reference"]

// Copy static files and CSS + JS from F# Formatting
// Build documentation from `fsx` and `md` files in `docsrc/content`
let buildDocumentation () =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
|> Seq.filter (fun x -> x.Contains "ja")
for dir in Seq.append [content] subdirs do
for dir in [content] do
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
printfn "root = %s" root
Literate.ProcessDirectory
( dir, docTemplate, outputJa @@ sub, replacements = ("root", root)::info,
layoutRoots = layoutRoots, generateAnchors = true )
Expand Down
2 changes: 1 addition & 1 deletion fcs/paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
frameworks: net45
framework: net45

source https://www.nuget.org/api/v2/

Expand Down