diff --git a/README.md b/README.md index 491f01b2c..62e55e143 100644 --- a/README.md +++ b/README.md @@ -2,28 +2,70 @@ https://fsharp.github.io/fsharp-core-docs -## Build steps +## Contributing to Library Content -Have a build of https://github.com/dotnet/fsharp in a parallel directory, e.g. +To improve the content of the F# Core library documentation, contribute to the XML `///` documentation in the +signature files (`*.fsi`) in the FSharp.Core implementation. - git clone https://github.com/dotnet/fsharp --depth 1 - cd fsharp - .\build +* Fork and clone https://github.com/dotnet/fsharp locally, see below -Then +* Contribute to [the FSharp.Core directory ](https://github.com/dotnet/fsharp/tree/master/src/fsharp/FSharp.Core) - dotnet tool restore - dotnet paket restore - dotnet fsdocs build --sourcefolder ../fsharp +* Use a local build, see below + +* Submit work to `feature/docs` branch of https://github.com/dotnet/fsharp + +* Once accepted your work will be published through a rebuild here, so submit a dummy pull request + +## Contributing to Generation of API Docs + +The content is generated by using `fsdocs` tool from [FSharp.Formatting]. + +* Contribute to the API Docs model generator or HTML generator in [FSharp.Formatting.ApiDocs](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.ApiDocs) + +* Contribute to the [the `fsdocs` tool](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.CommandTool) + +* Use a local copy of these, see below + +* Submit work to the `master` branches of https://github.com/dotnet/fsharp + +* Once accepted your work will be published through a rebuild here, so submit a dummy pull request -For iterative development use: +## Contributing to Layout and Design - dotnet fsdocs watch --sourcefolder ../fsharp --open reference/index.html +These pages are currently using [the default template of the FSharp.Formatting tools](https://github.com/fsprojects/FSharp.Formatting/blob/master/docs/_template.html) +with its small amount of corresponding [CSS and JavaScript](https://github.com/fsprojects/FSharp.Formatting/tree/master/docs/content) -Change the `TargetPath` in our local `FSharp.Core.fsproj` if needed to picl up a different build of FSHarp.Core. +This template is *not* the long term plan (unless it is improved enough). We can and must improve the design. Please help with this, and please be bold. This can be done in two ways: - $(MSBuildThisFileDirectory)..\..\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.0\FSharp.Core.dll +1. Copy the template and/or any of the CSS or JavaScript to `docs/_template.html` and a new directory `docs/content`. Now make changes and rebuild as before. Your template will be used instead of the default template. +2. After you have identified fixes and improvements, contribute back to the default template of FSharp.Formatting, or submit your work here and we can assess that for you. If your design is good enough it might become the default design for all F# libraries. + + +## Build steps + +Eventually the build will just be + + dotnet tool restore + dotnet fsdocs build + +For now, we want to pick up the latest copies of FSharp.Formatting and FSharp.Core, and set you up to make contributions to these. So we ask you to clone local copies of these: + + git clone https://github.com/dotnet/fsharp --depth 1 -b feature/docs + git clone https://github.com/fsprojects/FSharp.Formatting + pushd fsharp + .\build -noVisualStudio + popd + + pushd FSharp.Formatting + .\build + popd + +Then do iterative development using: + + dotnet tool restore + FSharp.Formatting\src\FSharp.Formatting.CommandTool\bin\Debug\netcoreapp3.1\fsdocs.exe watch --sourcefolder fsharp ## CI Pipeline