Skip to content

Commit d6b46db

Browse files
committed
docs
1 parent 8cc8199 commit d6b46db

File tree

7 files changed

+135
-6
lines changed

7 files changed

+135
-6
lines changed

docs/apidocs.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
title: Generating API Docs
44
category: Documentation
55
categoryindex: 1
6-
index: 5
6+
index: 6
77
---
88
*)
99
(*** condition: prepare ***)

docs/content.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33
category: Documentation
44
categoryindex: 1
5-
index: 3
5+
index: 5
66
---
77
*)
88
(*** condition: prepare ***)

docs/evaluation.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33
category: Documentation
44
categoryindex: 1
5-
index: 6
5+
index: 7
66
---
77
*)
88
(*** condition: prepare ***)

docs/literate-notebook.ipynb

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {
6+
"dotnet_repl_cellExecutionStartTime": "2023-11-17T21:04:27.922626+00:00",
7+
"dotnet_repl_cellExecutionEndTime": "2023-11-17T21:04:27.9559602+00:00"
8+
},
9+
"source": [
10+
"---\n",
11+
"category: Documentation\n",
12+
"\n",
13+
"categoryindex: 1\n",
14+
"\n",
15+
"index: 4\n",
16+
"\n",
17+
"---\n",
18+
"\n",
19+
"# Literate Notebooks\n",
20+
"\n",
21+
"It is possible create content using [.NET interactive](https://github.com/dotnet/interactive/tree/main) polyglot notebooks as the input file. The notebooks are processed by converting the notebook to markdown and then passing the markdown through the markdown processing pipeline.\n",
22+
"\n",
23+
"The `fsdocs` tool uses [dotnet-repl](https://github.com/jonsequitur/dotnet-repl) to evaluate polyglot notebooks. You need this tool to evaluate notebooks using `dotnet fsdocs --eval`. It can be installed into your local tool manifest using the command `dotnet tool install dotnet-repl`.\n",
24+
"\n",
25+
"F# Formatting tries to faithfully reproduce a notebook's native appearance when generating documents. Notebook cell outputs are passed through unchanged to preserve the notebook's html output. The below snippet demonstrates a notebook's html output for F# records, which differs from the output you would get with literate scripts.\n"
26+
]
27+
},
28+
{
29+
"cell_type": "code",
30+
"execution_count": null,
31+
"metadata": {
32+
"dotnet_repl_cellExecutionStartTime": "2023-11-17T21:04:27.9577608+00:00",
33+
"dotnet_repl_cellExecutionEndTime": "2023-11-17T21:04:30.3608545+00:00",
34+
"dotnet_interactive": {
35+
"language": "fsharp"
36+
},
37+
"polyglot_notebook": {
38+
"kernelName": "fsharp"
39+
}
40+
},
41+
"outputs": [
42+
{
43+
"data": {
44+
"text/html": [
45+
"<details open=\"open\" class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>{ Name = &quot;Alf&quot;\\n Phone = &quot;(555) 555-5555&quot;\\n ZipCode = &quot;90210&quot; }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>&quot;Alf&quot;\r\n",
46+
"</pre></div></td></tr><tr><td>Phone</td><td><div class=\"dni-plaintext\"><pre>&quot;(555) 555-5555&quot;\r\n",
47+
"</pre></div></td></tr><tr><td>ZipCode</td><td><div class=\"dni-plaintext\"><pre>&quot;90210&quot;\r\n",
48+
"</pre></div></td></tr></tbody></table></div></details><style>\r\n",
49+
".dni-code-hint {\r\n",
50+
" font-style: italic;\r\n",
51+
" overflow: hidden;\r\n",
52+
" white-space: nowrap;\r\n",
53+
"}\r\n",
54+
".dni-treeview {\r\n",
55+
" white-space: nowrap;\r\n",
56+
"}\r\n",
57+
".dni-treeview td {\r\n",
58+
" vertical-align: top;\r\n",
59+
" text-align: start;\r\n",
60+
"}\r\n",
61+
"details.dni-treeview {\r\n",
62+
" padding-left: 1em;\r\n",
63+
"}\r\n",
64+
"table td {\r\n",
65+
" text-align: start;\r\n",
66+
"}\r\n",
67+
"table tr { \r\n",
68+
" vertical-align: top; \r\n",
69+
" margin: 0em 0px;\r\n",
70+
"}\r\n",
71+
"table tr td pre \r\n",
72+
"{ \r\n",
73+
" vertical-align: top !important; \r\n",
74+
" margin: 0em 0px !important;\r\n",
75+
"} \r\n",
76+
"table th {\r\n",
77+
" text-align: start;\r\n",
78+
"}\r\n",
79+
"</style>"
80+
]
81+
},
82+
"metadata": {},
83+
"output_type": "display_data"
84+
}
85+
],
86+
"source": [
87+
"type ContactCard =\n",
88+
" { Name: string\n",
89+
" Phone: string\n",
90+
" ZipCode: string }\n",
91+
"\n",
92+
"// Create a new record\n",
93+
"{ Name = \"Alf\"; Phone = \"(555) 555-5555\"; ZipCode = \"90210\" }"
94+
]
95+
}
96+
],
97+
"metadata": {
98+
"kernelspec": {
99+
"display_name": ".NET (F#)",
100+
"language": "F#",
101+
"name": ".net-fsharp"
102+
},
103+
"language_info": {
104+
"file_extension": ".fs",
105+
"mimetype": "text/x-fsharp",
106+
"name": "F#",
107+
"pygments_lexer": "fsharp",
108+
"version": "6.0"
109+
},
110+
"polyglot_notebook": {
111+
"defaultKernelName": "fsharp",
112+
"items": [
113+
{
114+
"name": "fsharp"
115+
}
116+
]
117+
},
118+
"dotnet_interactive": {
119+
"defaultKernelName": "fsharp",
120+
"items": [
121+
{
122+
"name": "fsharp"
123+
}
124+
]
125+
}
126+
},
127+
"nbformat": 4,
128+
"nbformat_minor": 5
129+
}

docs/styling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
category: Documentation
33
categoryindex: 1
4-
index: 7
4+
index: 8
55
---
66

77
# Customization and Styling

docs/users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
category: Documentation
33
categoryindex: 1
4-
index: 8
4+
index: 9
55
---
66
# Users of FSharp.Formatting
77

docs/zero-to-hero.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
category: Documentation
33
categoryindex: 1
4-
index: 9
4+
index: 10
55
---
66
# From zero to hero: deploying to GitHub Pages
77

0 commit comments

Comments
 (0)