Improve new docs site. (#2843)
* Improve parameter padding and add discord link. * Update xref service for docs. Reason: https://github.com/dotnet/docfx/issues/9659 * Update docs readme to specify docfx version. * Update to latest DocFX. * update action & add manual trigger
This commit is contained in:
3
.github/workflows/docs.yml
vendored
3
.github/workflows/docs.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -18,7 +19,7 @@ jobs:
|
|||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Setup DocFX
|
- name: Setup DocFX
|
||||||
run: dotnet tool install -g docfx --version 2.71.0
|
run: dotnet tool install -g docfx --version 2.75.2
|
||||||
|
|
||||||
- name: Build DNet docs
|
- name: Build DNet docs
|
||||||
run: docfx docs/docfx.json
|
run: docfx docs/docfx.json
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
The documentation for the Discord.Net library uses [DocFX][docfx-main].
|
The documentation for the Discord.Net library uses [DocFX][docfx-main].
|
||||||
Instructions for installing this tool can be found [here][docfx-installing].
|
Instructions for installing this tool can be found [here][docfx-installing].
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> You must use DocFX version **2.75.2** for everything to work.
|
||||||
|
|
||||||
1. Navigate to the root of the repository.
|
1. Navigate to the root of the repository.
|
||||||
2. Build the docs using `docfx docs/docfx.json`. Add the `--serve`
|
2. Build the docs using `docfx docs/docfx.json`. Add the `--serve`
|
||||||
parameter to preview the site locally. Some elements of the page
|
parameter to preview the site locally.
|
||||||
may appear incorrectly when hosted offline.
|
|
||||||
|
|
||||||
Please note that if you intend to target a specific version, ensure
|
Please note that if you intend to target a specific version, ensure
|
||||||
that you have the correct version checked out.
|
that you have the correct version checked out.
|
||||||
|
|
||||||
[docfx-main]: https://dotnet.github.io/docfx/
|
[docfx-main]: https://dotnet.github.io/docfx/
|
||||||
[docfx-installing]: https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html
|
[docfx-installing]: https://dotnet.github.io/docfx/index.html
|
||||||
|
|||||||
Binary file not shown.
13
docs/_template/material/public/main.css
vendored
13
docs/_template/material/public/main.css
vendored
@@ -183,12 +183,17 @@ code {
|
|||||||
box-shadow: var(--card-box-shadow);
|
box-shadow: var(--card-box-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MAKES DERIVED LIST READABLE */
|
/* MAKES PARAMETERS MORE SPACIOUS */
|
||||||
:is(dl.typelist.derived, dl.typelist.extensionMethods) > dd > div::after {
|
dl.parameters > dt > code {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MAKES INHERITANCE LIST READABLE */
|
||||||
|
:is(dl.typelist.inheritedMembers, dl.typelist.extensionMethods) > dd > div::after {
|
||||||
content: none !important;
|
content: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:is(dl.typelist.derived, dl.typelist.extensionMethods) > dd > div {
|
:is(dl.typelist.inheritedMembers, dl.typelist.extensionMethods) > dd > div {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +217,7 @@ article[data-uid="Root.Landing"] img[alt="logo"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
|
/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
|
||||||
.affix ul li a {
|
.affix ul li a:not(.link-body-emphasis) {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
margin-left: 8px !important;
|
margin-left: 8px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
5
docs/_template/material/public/main.js
vendored
5
docs/_template/material/public/main.js
vendored
@@ -4,6 +4,11 @@
|
|||||||
icon: 'github',
|
icon: 'github',
|
||||||
href: 'https://github.com/discord-net/Discord.Net',
|
href: 'https://github.com/discord-net/Discord.Net',
|
||||||
title: 'GitHub'
|
title: 'GitHub'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'discord',
|
||||||
|
href: 'https://discord.gg/dnet',
|
||||||
|
title: 'Discord'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
],
|
],
|
||||||
"postProcessors": [
|
"postProcessors": [
|
||||||
"ExtractSearchIndex",
|
"ExtractSearchIndex",
|
||||||
"DescriptionPostProcessor"
|
"DescriptionPostProcessor"
|
||||||
],
|
],
|
||||||
"overwrite": "_overwrites/**/**.md",
|
"overwrite": "_overwrites/**/**.md",
|
||||||
"globalMetadata": {
|
"globalMetadata": {
|
||||||
@@ -63,6 +63,6 @@
|
|||||||
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
|
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
|
||||||
"_appFaviconPath": "favicon.ico"
|
"_appFaviconPath": "favicon.ico"
|
||||||
},
|
},
|
||||||
"xrefService": ["https://learn.microsoft.com/api/xref/query?uid={uid}"]
|
"xref": ["https://github.com/dotnet/docfx/raw/main/.xrefmap.json"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user