Skip to content

Commit

Permalink
Use fsdoc cli tool
Browse files Browse the repository at this point in the history
 * Copy current template from fsdocs to docsr/_template.html
 * Move docsrc/content and docsrc/files to root of docsrc
 * Update paths to suit that move
 * Remove unused docsrc/tools/templates
  • Loading branch information
adz committed Oct 10, 2020
1 parent a860a6f commit f26a359
Show file tree
Hide file tree
Showing 91 changed files with 657 additions and 2,205 deletions.
8 changes: 4 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"paket"
]
},
"FSharp.Formatting.CommandTool":{
"version": "4.0.0-alpha03",
"fsharp.formatting.commandtool": {
"version": "7.2.9",
"commands": [
"fsformatting"
"fsdocs"
]
}
}
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ docs/
# Temp folder used for publishing docs
temp/

# FSDocs cache and watch
.fsdocs/
tmp/watch

# Test results produced by build
TestResults.xml
TestResult.xml
Expand Down
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<VersionSuffix></VersionSuffix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(VersionSuffix)' == '' ">$(VersionPrefix)</Version>

<FsDocsNavBarPosition>fixed-left</FsDocsNavBarPosition>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -45,4 +47,4 @@
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net472'">$(MonoLibFolder)/4.7.2-api</FrameworkPathOverride>
</PropertyGroup>

</Project>
</Project>
95 changes: 95 additions & 0 deletions docsrc/_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>{{fsdocs-page-title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="{{fsdocs-authors}}">

<link rel="stylesheet" id="theme_link" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.3.1/materia/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script> -->

<link type="text/css" rel="stylesheet" href="{{root}}content/navbar-fixed-left.css" />
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-default.css" />
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-custom.css" />
<script type="text/javascript" src="{{root}}content/fsdocs-tips.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
<!-- END SEARCH BOX: this adds support for the search box -->

</head>

<body>
<nav class="navbar navbar-expand-md navbar-light bg-secondary fixed-left" id="fsdocs-menu">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<a href="{{fsdocs-logo-link}}"><img id="fsdocs-logo" src="{{fsdocs-logo-src}}" /></a>
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<div id="header">
<div class="searchbox" id="fsdocs-searchbox">
<label for="search-by">
<i class="fas fa-search"></i>
</label>
<input data-search-input="" id="search-by" type="search" placeholder="Search..." />
<span data-search-clear="">
<i class="fas fa-times"></i>
</span>
</div>
</div>

<!-- END SEARCH BOX: this adds support for the search box -->
<ul class="navbar-nav">
<li class="nav-header">Links</li>
<li class="nav-item" id="fsdocs-license-link"><a class="nav-link" href="{{fsdocs-license-link}}">License (Apache 2.0)</a></li>
<li class="nav-item" id="fsdocs-release-notes-link"><a class="nav-link" href="{{fsdocs-release-notes-link}}">Release Notes</a></li>
<li class="nav-item" id="fsdocs-repository-link"><a class="nav-link" href="{{fsdocs-repository-link}}">Source Repository</a></li>

<!-- Do not use 'fsdocs-list-of-documents' which currently cannot be ordered, and dumps all files in docsrc/ -->
<li class="nav-header" style="padding-top: 10px">Documentation</li>
<li class="nav-item"><a class="nav-link" href="{{root}}/tutorial.html">Tutorial</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/extensions.html">Extensions</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/generic-doc.html">Functions &amp; Operators</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/types.html">Data Types</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/abstractions.html">Abstractions</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/computation-expressions.html">Computation Expressions</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/lens.html">Lens</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/parsing.html">Parsing</a></li>
<li class="nav-item"><a class="nav-link" href="{{root}}/numerics.html">Numerics</a></li>

{{fsdocs-list-of-namespaces}}
</ul>
</div>
</nav>
<div class="container">
<div class="masthead">
<h3 class="muted"><a href="{{fsdocs-collection-name-link}}">{{fsdocs-collection-name}}</a></h3>
</div>
<hr />
<div class="container" id="fsdocs-content">
{{fsdocs-content}}
{{fsdocs-tooltips}}
</div>

<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
<script type="text/javascript">var fsdocs_search_baseurl = '{{root}}'</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.8/lunr.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.min.js"></script>
<script type="text/javascript" src="{{root}}content/fsdocs-search.js"></script>
<!-- END SEARCH BOX: this adds support for the search box -->
</div>
</body>

</html>

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Alternative
Expand Down Expand Up @@ -77,7 +77,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Applicative
Expand Down Expand Up @@ -110,7 +110,7 @@ Examples
*)


#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Arrow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Bifoldable
Expand Down Expand Up @@ -94,7 +94,7 @@ Examples
--------
*)

#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Control
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Bifunctor
Expand Down Expand Up @@ -85,7 +85,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Bitraversable
Expand Down Expand Up @@ -71,7 +71,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Category
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Comonad
Expand Down Expand Up @@ -84,7 +84,7 @@ Examples
*)


#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Contravariant
Expand Down Expand Up @@ -68,7 +68,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open System
open FSharpPlus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Foldable
Expand Down Expand Up @@ -81,7 +81,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Functor
Expand Down Expand Up @@ -107,7 +107,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Math.Generic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Other abstractions
Expand All @@ -17,7 +17,7 @@ Here are some other abstractions, not present in the diagram.



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open System
open FSharpPlus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Monad
Expand Down Expand Up @@ -107,7 +107,7 @@ Examples
*)


#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Monoid
Expand Down Expand Up @@ -94,7 +94,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open FSharpPlus
open FSharpPlus.Math.Generic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*** 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"
#I "../bin"

(**
Profunctor
Expand Down Expand Up @@ -81,7 +81,7 @@ Examples



#r @"../../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"
#r @"../src/FSharpPlus/bin/Release/net45/FSharpPlus.dll"

open System
open FSharpPlus
Expand Down
Loading

0 comments on commit f26a359

Please sign in to comment.