-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
End-User Documentation New Structure (WIP) #2336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Alan, you are on the right track here 😊!
Please don't commit any .css
file that we generate in F#.
/docs/content/fsdocs-custom.css
shouldn't be there.
We will need a couple of more rounds here before we can take this in.
That is why a draft PR can be insightful we proposing big changes.
You don't want to put too much effort into these things when the expected result isn't crystal clear.
Keep it up!
html, body | ||
@import "./global-config.sass" | ||
|
||
html, bod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html, body
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-{{fsdocs-theme}}.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 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this shim, IE is finally dead.
@@ -0,0 +1,10 @@ | |||
--- | |||
category: Documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use category End-user documentation
instead.
docs/docs/index.md
Outdated
Fantomas follows two F# style guides: the [F# code formatting guidelines](https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting) from Microsoft by default and the [G-Research F# code formatting guidelines](https://github.com/G-Research/fsharp-formatting-conventions) via various [settings](https://github.com/G-Research/fsharp-formatting-conventions/blob/master/.editorconfig). | ||
|
||
## Use cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this section, it most likely isn't up to date anymore and doesn't tell that much.
docs/docs/index.md
Outdated
For more complex examples, please take a look at F# outputs of [20 language shootout programs](tests/languageshootout_output) and [10 CodeReview.SE source files](tests/stackexchange_output). | ||
|
||
## Why the name "Fantomas"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move that one to the FAQ page. Is surely isn't necessary to answer on the first page.
docs/docs/GettingStarted.md
Outdated
|
||
The recommended way to use Fantomas is by using the [Ionide plugin](http://ionide.io/). Fantomas is integrated in [FSAutoComplete](https://github.com/fsharp/FsAutoComplete/) which is the language server used by Ionide. | ||
|
||
Alternatively, you can install the [fantomas-fmt](https://marketplace.visualstudio.com/items?itemName=paolodellepiane.fantomas-fmt) extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the line about fantomas-fmt
, this is no longer recommended.
> dotnet new tool-manifest | ||
|
||
Install the command line tool with: | ||
> dotnet tool install fantomas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some more styling to the blockquote, they don't really stand out right now.
docs/_template.html
Outdated
<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.6.0/materia/bootstrap.min.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses a lot of old bootstrap (probably how the default template works).
Throw this stuff out, we want to own the styling completely.
docs/_template.html
Outdated
|
||
<link rel="shortcut icon" type="image/x-icon" href="{{root}}img/favicon.ico"> | ||
<link type="text/css" rel="stylesheet" href="{{root}}content/navbar-{{fsdocs-navbar-position}}.css" /> | ||
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-{{fsdocs-theme}}.css" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are still using the default theme by using this.
Remove <link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-{{fsdocs-theme}}.css" />
and rely on your own styling.
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the right font isn't displaying.
You will need to add
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Reem+Kufi:wght@400;500;700&display=swap" rel="stylesheet">
at some point I believe.
docs/.style/fsdocs-custom.sass
Outdated
#fsdocs-content | ||
|
||
h1 a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe write this in one selector instead of repeating yourself.
Something like:
h1, h2, h3, h4, h5, h6
a
color: $black
docs/.style/style.fsx
Outdated
sassCompiler.CompileFile(inputFileTemplate, ?outputPath = Some outputTemplate) | ||
|
||
let globalConfig = | ||
sassCompiler.CompileFile(inputGlobalConfig, ?outputPath = Some outputGlobalConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the globalConfig should be compiled since it is only imported by the other files.
Making another note here, I think we currently have two limitations with using FsDoc.
For the first problem, I'd propose a two-folded workaround:
This will be fixing the same thing twice but all in all, it won't be that much effort to do this. The second problem is a lick more difficult. We will need to generate the API documentation outside of the #r "nuget: FSharp.Formatting, 15.0.1" // Grabs a NuGet package from the NuGet Gallery.
open FSharp.Formatting.ApiDocs
open System.IO
let model =
ApiDocs.GenerateModel(
// These are the project dll outputs that will be used to generate the API docs.
[ ApiDocInput.FromFile(@"C:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\bin\Debug\netstandard2.0\Fantomas.FCS.dll")
ApiDocInput.FromFile(@"C:\Users\nojaf\Projects\fantomas\src\Fantomas.Core\bin\Debug\netstandard2.0\Fantomas.Core.dll") ],
collectionName = "Fantomas.Core",
substitutions = []
)
#r "nuget: Fable.React"
open Fable.React
// TODO: transform the model into html
// Mapping each model/namespace to its own page.
let content = div [] [
str "hey some content"
]
open Fable.ReactServer
renderToString(content) Using something like We can discuss this further during a call @yisusalanpng. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good initial progress @yisusalanpng!
Keep it up!
@@ -0,0 +1,8198 @@ | |||
@charset "UTF-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this generated? If so don't commit it.
to customize template
to customize template
- Add new FAQ section - Changed contributors list - Cleanup template unused statements - Change section name from Documentation to End-user documentation
- Add new FAQ section - Change contributors list - Cleanup template unused statements - Change section name from Documentation to End-user documentation - Delete styleguide to build a new one - Getting Started section divided in multiple pages - Remove fantomas-fmt from recommended - Remove default stylings
- Create new benchmarks page - Add basic styling for main theme (WIP)
- Tweak fsdocs-custom.sass to add common selector for headers
- Temporal script to modify fs-docs default stylings - Add coloring styling for F# code - Add logo and searchbar for namespaces
Added proposal for a couple of documentation sections: index.md, Configuration.md, FormattingCheck.md, GettingStarted.md, GitHooks.md, IgnoreFile.md, StyleGuide.md
Please do let me know if any comments !