FAQ\Reference for MonoGame - Open Discussion

I have done further research on the use of Open Source tools to create a documentation site. The last one I tested was a Wiki still in popular use, Screw Turn Wiki. However, like the previous tools I have tinkered with, this too had compile issues.

As a software engineer, my standard when using such software has always been that if it doesnā€™t work correctly right out of the box, it is not worth your time trying to figure out the issues.

I know it has been suggested that we use the current documentation page within the MonoGame web site. However, doing so does not provide any guide as to how we may want to design the presentation of a full site to support good documentation for MonoGame.

For example, we would want to set up the following sections at the very leastā€¦

  • Basic Tutorials
  • Advanced Tutorials
  • FAQ by Category
  • Third Party Articles
  • Third Party Sites
  • Code Snippet Repository (compressed in zip-file format)
  • Project Repository (for those who want to contribute their projects / compressed in zip-file format)

This is tall order but one I believe can encompass everything people would require to do their research in a single place.

Since, the MonoGame Documentation Page has been rather poorly maintained, if we can get this up and running, the developers at MonoGame may want to consider simply putting a ā€œredirectā€ on their documentation page to this new site, which the entire community could then easily support.

Though I had been hoping that we could use Open Source software to quickly develop a basic system, it does not appear with what is available that this will be feasible. As a result, maybe we should consider the following factors for those who may be interested in pursuing such an endeavor.

  • We write our own Wiki-like system from scratch using ASP.NET WebForms (which is much faster to develop with and just as powerful as the MVC option).

  • Visual Studio Community Edition is an extremely powerful IDE (the latest is VS 2017, though I still prefer using VS 2015). VS Community Edition provides just about all the features of the Professional Edition for which I had a professional MSDN subscription license for many years; so I know the differences.

  • If we require a third-party suite of tools, Syncfusion also has a Community Edition which provides the entire line of all its platform tools absolutely free to developers. They are as good as any other tool suite so if needed, we can take advantage of it.

  • For a database I recommend either SQL Server or MySQL since both are commonly supported on hosting sites (I recommend WinHost for their excellent services and developer friendly infrastructure.).

To begin with, I have been researching database designs that could support such a project. It will provide enough information to get an idea as to how we should proceed with an interfaceā€¦

:relaxed:

1 Like

Youā€™re just moving the issue elsewhere. MGā€™s docs are easy to contribute to by anyone with a GitHub account and a web browser as stated in this document, but people donā€™t. I donā€™t see the benefit of hosting this documentation on another website and I donā€™t understand why you think it would be easier to maintain on a seperate website or why people would somehow be more inclined to contribute. Like you say, the official docs are poorly maintained. Why not just fix that and encourage other people to help out instead of starting a new documentation website that supposedly would be properly maintained and have the poor official docs link to it?

Everything needed to handle documentation like this is in place on this website, the only thing you need to contribute is a GitHub account. The official MG docs on this website use open source software and are automatically updated when a pull request modifies it. They allow to organise pages in a simple and intuitive hierarchical structure and have a consistent theme with the colors of MG.

There are a lot of third-party resources for XNA and MG and I think the effort of setting up another website with a wiki and all thatā€™s suggested here, would just add to that list.

Please explain to me what you mean by this, because I do not understand the argument.


Iā€™d love to hear some solid arguments for setting up a seperate website, because I really donā€™t see the point. Just to summarize, the arguments for adding to the docs here:

  • Easy to find. This place is where people will look and we donā€™t have to redirect them.
  • People know itā€™s official.
  • Makes MG looks more professional.
  • Anyone can contribute through a pull request without leaving the GitHub website, and all changes can be checked and commented on by anyone.
  • Thereā€™s a great pipeline for publishing the docs. Everything is automated. If a PR is merged the docs will be updated (I think daily, but might be immediate, Iā€™m not sure).
  • Markdown syntax is fully supported for easy formatting and nice looking pages.
  • Thereā€™s an intuitive hierarchical doc structure.
  • Everything is set up already, thereā€™s no extra work to do at all.
  • The doc system is very easy to understand, thereā€™s no investment needed to learn how to contribute except maybe for getting to now Markdown syntax (which is very simple to pick up).

If anyone can think of downsides to this current approach, please state them so we can discuss ways to work around them.

1 Like

If this is the case Jjagg, than you make a valid point.

So what you are saying is that we can organize the sections as needed?

How do we get a GitHub account that would allow us to work with the MG Documentation Page(s)?

1 Like

You sign up at Github, then you fork MonoGame

Alternatively, once youā€™ve signed up you can use the ā€œCreate new fileā€ and pencil (ā€œFork this project and edit this fileā€) to have github do the forking work for you. All you do at that point is create a pull-request and your changes get gathered up into the pull-request.

You can get by with the web-based tools when youā€™re making basic edits. But any structural changes (new pages, etc) should be done properly with a fork checked out on your machine and then syncā€™ed back to your fork on github.com. (It might be viable through the web interface, but I donā€™t trust web-apps to show text, let alone change it)

ALWAYS fill out the commit message box, itā€™s the nice thing to do.


If itā€™s initially daunting you can always post your copy-text and ask someone to do the work and link the pull-request so you can see how it all happens.

Itā€™s really just 2 basic steps removed from working with a Wiki and includes a mandatory review (the acceptance of the pull-request).


Using the existing documentation in github for this sort of thing guarantees that your material will have eyes looking at it and if itā€™s wrong/inaccurate itā€™ll be much more likely to get caught.

It should also help to prevent it from turning into a rewrite of the GL extension documents mess or such, as more knowledgeable eyes means more ā€œno, thatā€™s how things are everywhere, link these references here.ā€

1 Like

Lone Wolf it isā€¦

I detest using GHā€¦

EDIT

The only reason I have a GH account is because it was the only thing that worked to get me on this forumā€¦ otherwise I was purposefully avoiding itā€¦

I think you might be confusing Git and GitHub. Or is it the actual web interface that you dislike?
For the purposes of adding to the documentation, the steps outlined by @AcidFaucent above let you bypass all of Gitā€™s intricacies.

Please motivate your hatred, because Iā€™m fairly confident itā€™s founded on misconceptions. I think itā€™s very hard to set up a custom website that gives us tools and mechanisms as good as GitHubā€™s.

To get this going I think we should open an issue on GitHub first, so this discussion is in the most relevant place and can be seen and commented on by the maintainers. We can discuss the basic structure and someone can set up a pull request to set it up. After that anyone can send pull requests with whatever they think should be in the docs. I think weā€™ll figure out guidelines for what fits and does not fit along the way, increasing efficiency as we go.

1 Like

Iā€™ll admit that I hate Git. So much so that Iā€™ve feigned blind-rage and nuked entire projects / forks / PRs rather than deal with Git (or MingW sometimes, MingW is bile). Even the really cool ones, and Iā€™ve made some pretty awesome things over the years.

My dislike of Git doesnā€™t change that MonoGameā€™s existing documentation which is on Github is the right place for the information in question, especially given the relative sparsity of genuine MonoGame related gotchas (Iā€™d suspect that easily at least 90% of all gotchaā€™s have nothing to do with MonoGame beyond happened while using MonoGame).


Thereā€™s even the MonoGame FAQ which is exactly where warnings about the reach profile belongs.

In addition to the MGCB page and the Pipeline Tool page there really should be a page talking about the different files that are handled and such, for all of those ā€œColorā€ vs ā€œCompressedā€ etc consequences that are mostly undocumented.

1 Like

I donā€™t hate it, I just really do not like it at allā€¦ :stuck_out_tongue:

I am not sure why people are complaining about Git or GitHub. Git It is just a version control system and all of them work basically in the same manner, while GitHub is a web-based interface to it for remote collaboration processes.

Seems to me that if we can modify the documentation page(s) to promote better in-depth documentation, this would be the easiest way to go and as Jjagg has stated would provide for a maintenance of a uniform experience for MonoGame developers.

I only made my own suggestions as I always thought the MonoGame site was completely privately controlled and we wouldnā€™t have access to the formats that may be required.

Besides, my suggestions would entail a lot of work taking away from the primary goal of this endeavor.

2 Likes

Kind of the issue :stuck_out_tongue:

I do like the idea of the MG team or validated/approved moderators having an eyes on approachā€¦ though this adds rather than detracts effortā€¦

Hi AcidFaucentā€¦

I have followed your notes in order to create a fork of the MonoGame website project.

I have also submitted a pull request in order to generate a copy of the project for our use for modifying the documentation section.

Since I have never used Git before, would you mind checking to see if I have understood your notes correctly?

The name of the fork is MonoGame Documentation Modifications

Thank youā€¦

:relaxed:

@SNaidamast You misunderstood. You do not need to fork the project and let people modify your fork. Anyone that wants to add/modify docs should fork MG and modify their own fork. Then they can set up a pull request to allow MG maintainers to accept the changes into the main project. Send me a PM if you have any questions regarding the workflow :slight_smile:

Thanks, Jjaggā€¦

I just took a look at the documentation sub-directory and saw what you meanā€¦

:relaxed:

1 Like

Iā€™ve ported the MG docs to use docfx as the documentation generator in response to this thread. It has some cool features and is way more popular than SharpDoc, so should be more stable too. The website looks a lot nicer and has ā€œImprove this docā€ links on every page to make contributing more accessible. The config syntax is also easier than SharpDocā€™s. Iā€™ll post back updates here :slight_smile:

1 Like

Jjaggā€¦

How do I set up the MG documentation files so that I can work with it using DocFx?

Do we do this using DocFx against a Git repository?

Sorry for the confusion :stuck_out_tongue: Currently the docs are still using the old doc generation system. Iā€™m pushing to switch to docfx instead, but for now things have not changed. Docfx uses markdown, just like the current system, so things wonā€™t change as to how to contribute anyway.

So to edit the docs, you still:

  • Fork MonoGame
  • Edit documentation pages in your fork (which you can do by navigating to the relevant docs page on GitHub in your fork in the browser and clicking the edit button)
  • Set up a pull request to merge your changes into the MonoGame repo

Iā€™ll post an in-depth guide with images once I have some spare time :slight_smile:

Iā€™m hosting the new docs on GitHub with GitHub Pages. Check it out: https://jjagg.github.io/MonoGame-docfx/
If thereā€™s anything about the design youā€™d like to be changed, let me know by opening an issue.

There are ā€œImprove this Docā€ links on most pages, but you should not use those yet, since they link to the doc pages on my fork of MG instead of the actual doc pages (I can probably make them link to the official MG repo, will look into it).

The idea is that those pages are embedded in the docs on this website. Will look something like this:

2 Likes

Looks great, Jjaggā€¦

Is this the set of documentation that we can work with using DocFx?

I have used quite a few source-control systems and currently have a version of Subversion set up on my own server. However, I have never had the opportunity of working with a document system outside of SharePoint, which I did some development for a number of years ago.

Any guide or information you can provide me with will be greatly appreciatedā€¦

:relaxed:

Thanks!

Docfx doesnā€™t handle sharing the docs. I used Git for that.

Docfx generates HTML pages from markdown files and table of content (toc) files that specify the structure. The toc files are similar to the config.xml file used by SharpDoc.
As a preprocessor step, it can extract the public API given .csproj files and source files and turn it into markdown and toc files (that will in turn be used to generate the HTML for the final web pages).

To actually host these pages somewhere, you need to get the files generated by docfx on your server. Hereā€™s how I did it for the MG docs:

  • let docfx generate the HTML pages in the _site folder. This folder is not added to the MG repo (I added _* to the .gitignore file). We donā€™t have to have it in source control because it is all generated from files that are in version control.
  • The _site folder now contains the HTML, css and JavaScript files that make up the entire website. In the root of that folder thereā€™s an index.html file that is the landing page of the website.
  • To set up GitHub pages, all you need is a repo with the HTML/CSS/JS files and an index.html file in the project root for the landing page.
  • The next step is quite obvious. I Initialized a Git repo in the _site folder and pushed it to a new repo I created on GitHub. Then I enabled GitHub pages. Thatā€™s all there is to it.

The documentation on the docfx website is pretty extensive. I recommend the articles on there for more information. Or just ask of course :slight_smile: