Skip to content

Commit

Permalink
Improve and modernize docs. (#2882)
Browse files Browse the repository at this point in the history
* Add proper home landing page.

* Improve landing page considerably.

* Add navbar library name.

* Fix css rules.

* Update getting started images.

* Change favicon to the navbar's logo.

* Tiny change to docs index.

* Add title to home landing page.

* Tweak build overrides faq page.

* Fix FAQ article titles and headers.

* Fix FAQ article titles and headers.

* Replace channel 9 with the official .net course.
  • Loading branch information
AnalogFeelings authored Mar 18, 2024
1 parent 03402cd commit 473b13e
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 74 deletions.
11 changes: 8 additions & 3 deletions docs/_template/material/public/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ img {
border-radius: 0;
box-shadow: none;
color: var(--bs-nav-link-color);
margin-right: var(--bs-navbar-brand-margin-end);
}

[data-bs-theme='light'] nav.navbar {
Expand Down Expand Up @@ -215,19 +216,23 @@ ul:not(.navbar-nav) > li:not(:last-child) {
}

/* MAKES INDEX LOGO VISIBLE ON DIFFERENT THEMES */
article[data-uid="Root.Landing"] img[alt="logo"] {
article[data-uid="Home.Landing"] img[alt="logo"] {
height: 100pt !important;
box-shadow: none;
}

[data-bs-theme="light"] article[data-uid="Root.Landing"] img[alt="logo"] {
[data-bs-theme="light"] article[data-uid="Home.Landing"] img[alt="logo"] {
content: url('/marketing/logo/SVG/Combinationmark.svg') !important;
}

[data-bs-theme="dark"] article[data-uid="Root.Landing"] img[alt="logo"] {
[data-bs-theme="dark"] article[data-uid="Home.Landing"] img[alt="logo"] {
content: url('/marketing/logo/SVG/Combinationmark White.svg') !important;
}

article[data-uid="Home.Landing"] img {
border-radius: 0;
}

/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
.affix ul li a:not(.link-body-emphasis) {
display: block !important;
Expand Down
3 changes: 2 additions & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ uid: API.Docs

# API Documentation

This is where you will find documentation for all members and objects in Discord.Net.
This is where you will find documentation for all members and objects in Discord.Net.
This is automatically generated based on the [dev](https://github.com/discord-net/Discord.Net/tree/dev) branch.

# Commonly Used Entities

Expand Down
5 changes: 3 additions & 2 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"langwordMapping.yml",
"marketing/logo/**.svg",
"marketing/logo/**.png",
"favicon.ico",
"favicon.png",
"../src/Discord.Net.Examples/**.cs"
]
}
Expand All @@ -58,10 +58,11 @@
"overwrite": "_overwrites/**/**.md",
"globalMetadata": {
"_appTitle": "Discord.Net Documentation",
"_appName": "Discord.Net",
"_appFooter": "Discord.Net © 2015-2024 3.13.1",
"_enableSearch": true,
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
"_appFaviconPath": "favicon.ico"
"_appFaviconPath": "favicon.png"
},
"xref": ["https://github.com/dotnet/docfx/raw/main/.xrefmap.json"]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/basics/basic-operations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: FAQ.Basics.BasicOp
title: Questions about Basic Operations
title: Basic Operations Questions
---

# Basic Operations Questions
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/basics/client-basics.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: FAQ.Basics.ClientBasics
title: Basic Questions about Client
title: Client Basics Questions
---

# Client Basics Questions
Expand Down
4 changes: 2 additions & 2 deletions docs/faq/basics/dependency-injection.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
uid: FAQ.Basics.DI
title: Questions about Dependency Injection.
title: Questions about Dependency Injection
---

# Dependency-injection-related Questions
# Dependency Injection-related Questions

In the following section, you will find common questions and answers
to utilizing dependency injection with @Discord.Commands and @Discord.Interactions, as well as
Expand Down
12 changes: 6 additions & 6 deletions docs/faq/basics/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
uid: FAQ.Basics.GetStarted
title: Beginner Questions / How to Get Started
title: Getting Started
---

# Basic Concepts / Getting Started
# Getting Started

In this following section, you will find commonly asked questions and
answers about how to get started with Discord.Net, as well as basic
introduction to the Discord API ecosystem.

## How do I add my bot to my server/guild?
## How do I add my bot to my guild?

Inviting your bot can be done by using the OAuth2 url generator provided by the [Discord Developer Portal].

Expand Down Expand Up @@ -86,10 +86,10 @@ it will return the user ID of the aforementioned user.
> Right-clicking on the role and copying the ID will **not** work.
> This will only copy the message ID.
Several common ways to do this:
There are several common ways to do this:

1. (Easiest) Right click on the role either in the Server Settings
or in the user's role list.
1. Right click on the role either in the Server Settings
or in the user's role list (recommended).
![Roles](images/role-copy.png)
2. Make the role mentionable and mention the role, and escape it
using the `\` character in front.
Expand Down
Binary file modified docs/faq/basics/images/dev-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/faq/basics/images/permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/faq/basics/images/role-copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/faq/basics/images/scopes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/faq/build_overrides/what-are-they.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: FAQ.BuildOverrides.WhatAreThey
title: Build Overrides, What are they?
title: Build Overrides
---

# Build Overrides
Expand Down
4 changes: 2 additions & 2 deletions docs/faq/int_framework/general.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
uid: FAQ.Interactions.General
title: Interactions
title: Interaction Basics
---

# Interaction basics
# Interaction Basics

This chapter mostly refers to interactions in general,
and will include questions that are common among users of the Interaction Framework
Expand Down
4 changes: 2 additions & 2 deletions docs/faq/int_framework/manual.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
uid: FAQ.Interactions.Manual
title: Manual handling
title: Manual Handling
---

# Manually handing interactions.
# Manually Handling Interactions

This section talks about the manual building and responding to interactions.
If you are using the interaction framework (highly recommended) this section does not apply to you.
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/int_framework/respondings-schemes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: FAQ.Interactions.RespondingSchemes
title: Interaction response schemes
title: Interaction Response Schemes
---

# Interaction Response Schemes
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/misc/legacy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: FAQ.Legacy
title: Questions about Legacy Versions
title: Legacy Questions
---

# Legacy Questions
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
items:
- name: Text Command basics
topicUid: FAQ.TextCommands.General
- name: Legacy or Upgrade
- name: Legacy Questions
topicUid: FAQ.Legacy
- name: Build Overrides
topicUid: FAQ.BuildOverrides.WhatAreThey
Binary file removed docs/favicon.ico
Binary file not shown.
Binary file added docs/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/guides/introduction/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in [our GitHub repository].
[polymorphism]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/polymorphism
[interface]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/

## New to .NET/C#?
## New to .NET?

All examples or snippets featured in this guide and all API
documentation will be written in C#.
Expand All @@ -38,9 +38,9 @@ difficult, but don't worry! There are many resources online that can
help you get started in the wonderful world of .NET. Here are some
resources to get you started.

- [C# Programming Guide (MSDN/Microsoft, Free)](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/)
- [C# Fundamentals For Absolute Beginners (Channel9/Microsoft, Free)](https://channel9.msdn.com/Series/C-Fundamentals-for-Absolute-Beginners)
- [C# Path (Pluralsight, Paid)](https://www.pluralsight.com/paths/csharp)
- [C# Programming Guide](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/) (Microsoft, Free)
- [Learn .NET](https://dotnet.microsoft.com/en-us/learn) (Microsoft, Free)
- [C# Path](https://www.pluralsight.com/paths/csharp) (Pluralsight, Paid)

## Still have questions?

Expand Down
59 changes: 16 additions & 43 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
---
uid: Root.Landing
uid: Home.Landing
title: Home
_layout: landing
---

# Discord.NET Documentation

![logo](marketing/logo/SVG/Combinationmark%20White%20Border.svg)

[![GitHub](https://img.shields.io/github/last-commit/discord-net/Discord.Net?style=plastic)](https://github.com/discord-net/Discord.Net)
[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.svg?maxAge=2592000?style=plastic)](https://www.nuget.org/packages/Discord.Net)
[![GitHub](https://img.shields.io/github/last-commit/discord-net/Discord.Net)](https://github.com/discord-net/Discord.Net)
[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.svg?maxAge=2592000)](https://www.nuget.org/packages/Discord.Net)
[![MyGet](https://img.shields.io/myget/discord-net/vpre/Discord.Net.svg)](https://www.myget.org/feed/Packages/discord-net)
[![Build Status](https://dev.azure.com/discord-net/Discord.Net/_apis/build/status/discord-net.Discord.Net?branchName=dev)](https://dev.azure.com/discord-net/Discord.Net/_build/latest?definitionId=1&branchName=dev)
[![Discord](https://discord.com/api/guilds/848176216011046962/widget.png)](https://discord.gg/dnet)

## What is Discord.NET?

Discord.Net is an asynchronous, multi-platform .NET Library used to
Discord.Net is an unofficial asynchronous, multi-platform .NET library used to
interface with the [Discord API](https://discord.com/).

## Where to begin?
Expand All @@ -32,7 +31,13 @@ objects in the library.
## Nightlies

Nightlies are builds of Discord.NET that are still in an experimental phase, and have not been released.
They are available through Discord.NET's [MyGet feed](https://www.myget.org/F/discord-net/api/v3/index.json).
They are available through 3 different sources:
- [MyGet](https://www.myget.org/F/discord-net/api/v3/index.json)
- [BaGet](https://baget.discordnet.dev/)
- [GitHub Packages](https://github.com/orgs/discord-net/packages?repo_name=Discord.Net)

> [!NOTE]
> GitHub Packages requires authentication. You can find more information [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#authenticating-to-github-packages).
## Questions?

Expand All @@ -45,40 +50,8 @@ If you still have unanswered questions after reading the [FAQ](xref:FAQ.Basics.G
## Supporting Discord.Net

Discord.Net is an MIT-licensed open source project with its development made possible entirely by volunteers.
If you'd like to support our efforts financially, please consider:

- [Contributing on Open Collective](https://opencollective.com/discordnet).

## New in V3

#### Interaction Framework

A counterpart to the well-known command service of Discord.Net, the Interaction Framework implements the same
feature-rich structure to register & handle interactions like application commands & buttons.

- Read about the Interaction Framework
[here](xref:Guides.IntFw.Intro)

#### Slash Commands

Slash commands are purposed to take over the normal prefixed commands in Discord and comes with good functionality to serve as a replacement.
Being interactions, they are handled as SocketInteractions. Creating and receiving slash commands is covered below.

- Find out more about slash commands in the
[Slash Command Guides](xref:Guides.SlashCommands.Intro)

#### Context Message & User Commands

These commands can be pointed at messages and users, in custom application tabs.
Being interactions as well, they are able to be handled just like slash commands. They do not have options however.

- Learn how to create and handle these commands in the
[Context Command Guides](xref:Guides.ContextCommands.Creating)

#### Message Components

Components of a message such as buttons and dropdowns, which can be interacted with and responded to.
Message components can be set in rows and multiple can exist on a single message!
If you'd like to support our efforts financially, please consider contributing on:

- Explanation on how to add & respond to message components can be found in the
[Message Component Guides](xref:Guides.MessageComponents.Intro)
- [Open Collective](https://opencollective.com/discordnet)
- [GitHub Sponsors](https://github.com/sponsors/quinchs)
- [PayPal](https://paypal.me/quinchs)
8 changes: 5 additions & 3 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
- name: Home
href: index.md
- name: Documentation
href: api/
topicUid: API.Docs
- name: Guides
href: guides/
topicUid: Guides.Introduction
- name: FAQ
href: faq/
topicUid: FAQ.Basics.GetStarted
- name: API Documentation
href: api/
topicUid: API.Docs
- name: Changelog
href: ../CHANGELOG.md

0 comments on commit 473b13e

Please sign in to comment.