From 6e1dec892a6092c3b9afd204d248c3cdba78eb80 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 1 Aug 2020 22:45:00 +0100 Subject: [PATCH 1/2] Add details on how to contribute --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 491f01b2c..0ff42016b 100644 --- a/README.md +++ b/README.md @@ -2,27 +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 + +* Contribute to [the FSharp.Core directory ](https://github.com/dotnet/fsharp/tree/master/src/fsharp/FSharp.Core) + +* 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 -Then +* Once accepted your work will be published through a rebuild here, so submit a dummy pull request + +## Contributing to Layout and Design + +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) + +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: + +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 paket restore - dotnet fsdocs build --sourcefolder ../fsharp + dotnet fsdocs build -For iterative development use: +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: - dotnet fsdocs watch --sourcefolder ../fsharp --open reference/index.html + git clone https://github.com/dotnet/fsharp --depth 1 -b feature/docs + git clone https://github.com/dotnet/FSharp.Formatting --depth 1 + pushd fsharp + .\build -noVisualStudio + popd -Change the `TargetPath` in our local `FSharp.Core.fsproj` if needed to picl up a different build of FSHarp.Core. + pushd FSharp.Formatting + .\build + popd + +Then do iterative development using: - $(MSBuildThisFileDirectory)..\..\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.0\FSharp.Core.dll + dotnet tool restore + FSharp.Formatting\src\FSharp.Formatting.CommandTool\bin\Debug\netcoreapp3.1\fsdocs.exe watch --sourcefolder fsharp ## CI Pipeline From 361dbbec35973764f48f69f0b02df0298557a7f1 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 1 Aug 2020 22:50:50 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ff42016b..62e55e143 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Eventually the build will just be 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/dotnet/FSharp.Formatting --depth 1 + git clone https://github.com/fsprojects/FSharp.Formatting pushd fsharp .\build -noVisualStudio popd @@ -67,7 +67,6 @@ 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 This repo is published via GitHub Actions. On each push to master, the docs are built, and the outputs (which are written to the `output` directory by fsdocs) are pushed to the `gh-pages` branch. This repo is configured to host using GitHub Pages from this branch, so once the generated files are pushed the update is nearly-instant.