Comments (4)
If i understand the current system correctly, there is no default _template.html file provided by the tool, and users are expected to create their own.
That is incorrect if you don't create a _template.html
file, https://github.com/fsprojects/FSharp.Formatting/blob/main/docs/_template.html will be used by the tool.
We could incorporate these SEO tags in the default template and add some more substitution parameters if necessary.
As for fsdocs init
I do like that idea. It could scaffold the right files if you have absolutely nothing in your repository.
from fsharp.formatting.
Available in https://www.nuget.org/packages/fsdocs-tool/20.0.0-alpha-015
from fsharp.formatting.
If i understand the current system correctly, there is no default _template.html
file provided by the tool, and users are expected to create their own. I think a fsdocs init
command that provides a html template that contains the seo tags would be nice, but to make this automated, a lot of parameters have to be supplied by the user.
Example:
This is how i try to do automatic seo tags for each documentation page on plotly.net:
<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}}">
<meta name="description" content="Plotly.NET is an Interactive charting library for .NET programming languages. This page contains the documentation for: {{fsdocs-page-title}}">
<!-- Opengraph properties (https://ogp.me/) -->
<meta property="og:title" content="Plotly.NET documentation for: {{fsdocs-page-title}}" />
<meta property="og:url" content="{{root}}{{fsdocs-source-basename}}.html">
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Plotly.NET" />
<meta property="og:description" content="Plotly.NET is an Interactive charting library for .NET programming languages. This page contains the documentation for: {{fsdocs-page-title}}">
<meta property="og:image" content="{{root}}img/logo_meta_tags.png">
<!-- Twitter cards -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="{{root}}{{fsdocs-source-basename}}.html">
<meta property="twitter:url" content="https://plotly.net">
<meta name="twitter:title" content="Plotly.NET documentation for: {{fsdocs-page-title}}">
<meta name="twitter:description" content="Plotly.NET is an Interactive charting library for .NET programming languages. This page contains the documentation for: {{fsdocs-page-title}}">
<meta name="twitter:image" content="{{root}}img/logo_meta_tags.png">
As you see, this is done via the substitution parameters, but if the user does not supply these, the meta tags are rubbish.
from fsharp.formatting.
That is incorrect if you don't create a _template.html file
I see, sorry has been a long time since i did set up from scratch
We could incorporate these SEO tags in the default template and add some more substitution parameters if necessary.
These are always known to the tool right?
- {{root}}
- {{fsdocs-source-basename}}
- {{fsdocs-page-title}}
If that is the case, most of the tags can be reliably created, while i think {{fsdocs-authors}} must be provided by the user, and therefore could just be left out of the template, preventing people from ending up with '{{fsdocs-authors}}' as their author tag.
from fsharp.formatting.
Related Issues (20)
- Add how-to for the most typical scenario HOT 2
- List users of this tool HOT 1
- CSharp library not used for generating API docs HOT 7
- Function signature tooltips include attributes for arguments that make the tooltip unreadable HOT 5
- Directory.Build.props is ignored if there are no projects or solutions HOT 3
- Suggestion: init command
- Dark mode borders: too much contrast?
- Namespace description overflows content box
- Output font size on mobile safari is too big HOT 6
- Using testcontainers in a fsx script gives wrong output HOT 7
- Create a keyword/glossary site map
- add .dib notebook support HOT 6
- --watch expectation HOT 1
- Suggestion: auto-expansion of `<details>…</details>` for direct links HOT 12
- Can FSharp.Formatting support documenting programs? HOT 1
- Enable `watch` server from arbitrary host HOT 4
- Is it possible to generate an HTML AST from Markdown? HOT 1
- Nesting Document Categories HOT 1
- Include images in documentation in generated content HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.formatting.