Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74ab8b4

Browse files
authored
Merge pull request #26 from fsharp/fix-search-url
use the site's known url base to prefix the url base for the search index
2 parents 59794b6 + ca1d66d commit 74ab8b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generators/lunr.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99

1010
open Apirefloader
1111
open FSharp.Formatting.ApiDocs
12-
1312
let generate (ctx : SiteContents) (projectRoot: string) (page: string) =
1413
let all = ctx.TryGetValues<AssemblyEntities>()
14+
let siteInfo = ctx.TryGetValue<SiteInfo>() |> Option.get
1515
let refs =
1616
match all with
1717
| None -> [| |]
1818
| Some all ->
1919
match List.ofSeq all with
2020
| [model] ->
2121
let model = { model.GeneratorOutput with
22-
CollectionRootUrl = "/reference/FSharp.Core" }
22+
CollectionRootUrl = siteInfo.root_url + "/reference/FSharp.Core" }
2323
ApiDocs.GenerateSearchIndexFromModel model
2424
| _ ->
2525
[| |]

0 commit comments

Comments
 (0)