Remora / Remora.Discord

A data-oriented C# Discord library, focused on high-performance concurrency and robust design.
GNU Lesser General Public License v3.0
242 stars 46 forks source link

[Discussion] Guides/Documentation Improvements #216

Open Hamsterland opened 2 years ago

Hamsterland commented 2 years ago

Description

Why This is Needed

To make Remora.Discord more approachable to new users who don't neccessarily have the time to slowly learn how it works like most of us have.

Alternatives Considered

N/A

Additional Details

I'd more like to help by writing the guides themselves, I am not really opinionated on which host to use.

MazeXP commented 2 years ago

Possible documentation tools

AraHaan commented 2 years ago

that is ok to use docfx with github actions on Windows, for pull requests it could also act as an documentation verifier as well which could verify that the docs do not have common errors / issues.

Nihlus commented 2 years ago

This is something that's sorely needed, and I really appreciate it!

As for the tools of choice, I'm fine with whatever as long as it's open-source and cross-platform. No Windows-only stuff, please.

Hamsterland commented 2 years ago

I was a huge advocate for GitBook, but that did not support auto-generation of documention. However, I found this, which is very modern and looks promising!

https://github.com/webmaster442/BookGen

I'll play around with it a little and see how it works out.

Hamsterland commented 2 years ago

Scrap the above idea... That project looks promising but has a long way to go.

Hamsterland commented 2 years ago

@MazeXP @Jax I think DocFX is the sensible choice here. Other options we've explored are either dead/deprecated (Sandcastle, Wyam) or too premature (Bookgen, Statiq).

What do you think of DocFX? The honest truth is that its very mature and has appealing out-of-the-box themes. I particularly like material.

VelvetToroyashi commented 2 years ago

No Windows-only stuff, please.

Isn't DocFX based on .NETFX as well

VelvetToroyashi commented 2 years ago

Though, that Discord theme is pretty appealing...

Hamsterland commented 2 years ago

No Windows-only stuff, please.

Isn't DocFX based on .NETFX as well

It's apparantly cross-platform https://dotnet.github.io/docfx/

VelvetToroyashi commented 2 years ago

Heck. I'd love to write some articles then.

Hamsterland commented 2 years ago

That would be pretty great. You could really just start writing anywhere and we can import it later as DocFX uses markdown.

VelvetToroyashi commented 2 years ago

Aye. I've written articles for D#+.

Hamsterland commented 2 years ago

Sweet. Let's just get @Nihlus final approval before jumping the gun.

MazeXP commented 2 years ago

DocFX 2.0 runs on NetFX. One can run it with Mono on Linux basically

Nihlus commented 2 years ago

I was looking at DocFx in the past and really wanted to use it, but the framework-only builds were a blocker. I was mainly waiting for the 3.0 release which would address this, but perhaps we can start using it anyway. There are released preview versions - worth checking out!

Nihlus commented 2 years ago

Also, we should totally use the Discord theme.

MazeXP commented 2 years ago

DocFX 3,0 does not have the API reference generation inbuilt. That's the most recent branch of 3.0 that has some external reference generation: https://github.com/dotnet/docfx/tree/v3-template

Nihlus commented 2 years ago

So assuming we use DocFx (which I really would like), the next step really needs to be a project plan - what goals do we have for the documentation, what do we want to document, in what format, etc etc - would you be willing to take the lead on that, @Hamsterland?

MazeXP commented 2 years ago

For setting up DocFX in GitHub Actions it would be best to have it run on a windows machine. Alternatively we could also set it up for Linux by using Mono with DocFX.

But as GitHub Actions does also provide Windows machines I do not see a problem about just using Windows for the GitHub Action. As I think the docs should actually be built by CI tasks.

As an alternative to GitHub Action it would also be possible to use AppVeyor for the docs generation. (Free for public projects, 1 concurrent job, no limited usage time per month)

I did already some experiments with DocFX and Remora.Discord:

Nihlus commented 2 years ago

I would prefer the use of a Linux machine; that way, it's more or less guaranteed to work on other OS's as well.

MazeXP commented 2 years ago

Well, is it useful to be able to build docs locally? For preview locally, as the articles would be written in markdown and most editors support previewing markdown.

Nihlus commented 2 years ago

I think so; testing a failing action is way faster if you can do it locally, as is experimenting with new features.

MazeXP commented 2 years ago

Would Mono be an option for you locally as DocFX 2 is written in NetFX? DocFX 3 is sadly not making any progress regarding API Reference generation.

The only alternative would be Statiq.Docs when following issue gets fixed: https://github.com/statiqdev/Statiq.Framework/issues/244

Nihlus commented 2 years ago

Yeah, I'm fine using Mono; that said, if DocFX 3 doesn't seem like an option in the future, perhaps we should look elsewhere.

MazeXP commented 2 years ago

By new feature you mean a new article in the docs context, i guess?

Nihlus commented 2 years ago

Either a new article or the use of a new or different feature in DocFX itself, such as different themes or page generations.

MazeXP commented 1 year ago

Just came across https://docusaurus.io/. It looks good and easy to setup. Maybe we could use it for Remora. It does not support API reference generation at all for .NET. But to my extent I think it is not required for the beginning of a documentation.

Nihlus commented 1 year ago

I think I tried Docusaurus in the past with pretty good results. The lack of .NET API reference generation is a shame, though - we could, of course, always roll our own from the generated XML files and spit out a format Docusaurus recognizes.

MazeXP commented 1 year ago

How do you think about a separate branch that is then added via git worktree for documentation building.