Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DocFX API and tutorial docs #31

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
docs/_build/_*/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down
Binary file added assets/icon_28h.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 added assets/icon_28h_5mr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
"metadata": [
{
"src": [{
"files": ["MTGOSDK/MTGOSDK.csproj"]
}],
"output": "docs/_build/_xmldoc/MTGOSDK",
"filter": "docs/_build/docfx/filters.yml",
"categoryLayout": "nested",
"namespaceLayout": "nested",
"enumSortOrder": "declaringOrder",
"memberLayout": "samePage",
"references": [
"dist/*/Reference/**/*.dll"
]
},
{
"src": [{
"files": ["MTGOSDK.MSBuild/MTGOSDK.MSBuild.csproj"]
}],
"output": "docs/_build/_xmldoc/MTGOSDK.MSBuild",
"filter": "docs/_build/docfx/filters.yml",
"categoryLayout": "nested",
"namespaceLayout": "nested",
"enumSortOrder": "declaringOrder",
"memberLayout": "samePage"
},
{
"src": [{
"files": ["MTGOSDK.Win32/MTGOSDK.Win32.csproj"]
}],
"output": "docs/_build/_xmldoc/MTGOSDK.Win32",
"filter": "docs/_build/docfx/filters.yml",
"categoryLayout": "nested",
"namespaceLayout": "nested",
"enumSortOrder": "declaringOrder",
"memberLayout": "samePage"
}
],
"build": {
"content": [
{
"files": ["**/*.{md,yml}"],
"src": "docs/_build/_xmldoc",
"dest": "docs/api"
},
{
"files": ["**/*.{md,yml}"],
"src": "docs",
"dest": "docs",
"exclude": ["_build/**"]
},
{
"files": ["index.md"],
"src": "docs/_build/docfx"
}
],
"resource": [
{
"files": ["assets/**"]
}
],
"output": "docs/_build/_site",
"template": [
"default",
"modern",
"docs/_build/docfx"
],
"globalMetadata": {
"_appName": "MTGOSDK",
"_appTitle": "MTGOSDK",
"_appLogoPath": "assets/icon_28h_5mr.png",
"_enableSearch": true
}
}
}
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
# _layout: landing
---

# MTGOSDK Codebase Documentation

This directory contains some documentation about the MTGOSDK codebase, aimed at readers who are interested in making code contributions. For more general information about the MTGOSDK, refer to the project [README](../README.md) or the [FAQ](FAQ.md).
Expand Down
9 changes: 9 additions & 0 deletions docs/_build/docfx/filters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiRules:
- exclude:
uidRegex: ^System\.Object
type: Type
- exclude:
uidRegex: ^MTGOSDK.API.Events\..*
- exclude:
hasAttribute:
uid: MTGOSDK.Core.Reflection.Attributes.RuntimeInternalAttribute
21 changes: 21 additions & 0 deletions docs/_build/docfx/head.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
<meta name="generator" content="docfx {{_docfxVersion}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
<meta property="docfx:navrel" content="{{_navRel}}">
<meta property="docfx:tocrel" content="{{_tocRel}}">
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
</head>
3 changes: 3 additions & 0 deletions docs/_build/docfx/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
redirect_url: /docs/README.html
---
183 changes: 183 additions & 0 deletions docs/_build/docfx/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700&display=swap');

:root {
--bs-font-sans-serif: 'Roboto';
--bs-border-radius: 10px;

--border-radius-button: 40px;
--card-box-shadow: 0 1px 2px 0 #3d41440f, 0 1px 3px 1px #3d414429;

--material-yellow-light: #e6dfbf;
--material-yellow-dark: #5a5338;

--material-blue-light: #c4d9f1;
--material-blue-dark: #383e5a;

--material-red-light: #f1c4c4;
--material-red-dark: #5a3838;

--material-warning-header: #f57f171a;
--material-warning-background: #f6e8bd;
--material-warning-background-dark: #57502c;

--material-info-header: #1976d21a;
--material-info-background: #e3f2fd;
--material-info-background-dark: #2c4557;

--material-danger-header: #d32f2f1a;
--material-danger-background: #ffebee;
--material-danger-background-dark: #572c2c;
}

/* HEADINGS */

h1 {
font-weight: 600;
font-size: 32px;
}

h2 {
font-weight: 600;
font-size: 24px;
line-height: 1.8;
}

h3 {
font-weight: 600;
font-size: 20px;
line-height: 1.8;
}

h5 {
font-size: 14px;
padding: 10px 0px;
}

article h2,
article h3,
article h4 {
margin-top: 15px;
margin-bottom: 15px;
}

article h4 {
padding-bottom: 8px;
border-bottom: 2px solid #ddd;
}

/** IMAGES **/
img {
border-radius: var(--bs-border-radius);
box-shadow: var(--card-box-shadow);
}

/** NAVBAR **/
.navbar-brand > img {
box-shadow: none;
color: var(--bs-nav-link-color);
margin-right: 5px;
}

[data-bs-theme='light'] nav.navbar {
background-color: var(--bs-primary-bg-subtle);
}

[data-bs-theme='dark'] nav.navbar {
background-color: var(--bs-tertiary-bg);
}

.navbar-nav > li > a {
border-radius: var(--border-radius-button);
transition: 200ms;
}

.navbar-nav a.nav-link:focus,
.navbar-nav a.nav-link:hover {
background-color: var(--bs-primary-border-subtle);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
color: var(--bs-link-hover-color);
}

/** SEARCH AND FILTER **/
input.form-control {
border-radius: var(--border-radius-button);
}

form.filter {
margin: 0.3rem;
}

/** ALERTS **/
.alert {
padding: 0;
border: none;
box-shadow: var(--card-box-shadow);
}

.alert > p {
padding: 0.2rem 0.7rem 0.7rem 1rem;
}

.alert > ul {
margin-bottom: 0;
padding: 5px 40px;
}

.alert > h5 {
padding: 0.5rem 0.7rem 0.7rem 1rem;
border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
font-weight: bold;
text-transform: capitalize;
}

.alert-info {
color: var(--material-blue-dark);
background-color: var(--material-info-background);
}

[data-bs-theme='dark'] .alert-info {
color: var(--material-blue-light);
background-color: var(--material-info-background-dark);
}

.alert-info > h5 {
background-color: var(--material-info-header);
}

.alert-warning {
color: var(--material-yellow-dark);
background-color: var(--material-warning-background);
}

[data-bs-theme='dark'] .alert-warning {
color: var(--material-yellow-light);
background-color: var(--material-warning-background-dark);
}

.alert-warning > h5 {
background-color: var(--material-warning-header);
}

.alert-danger {
color: var(--material-red-dark);
background-color: var(--material-danger-background);
}

[data-bs-theme='dark'] .alert-danger {
color: var(--material-red-light);
background-color: var(--material-danger-background-dark);
}

.alert-danger > h5 {
background-color: var(--material-danger-header);
}

/* CODE HIGHLIGHT */
code {
border-radius: var(--bs-border-radius);
margin: 4px 2px;
box-shadow: var(--card-box-shadow);
}
4 changes: 2 additions & 2 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Below is a list of sections in this directory:

| Section | Description |
| --- | --- |
| [Overview](docs/architecture/overview.md) | Provides an overview of the SDK and its components. |
| [Core Classes](docs/architecture/core-classes.md) | Describes the core classes of the SDK and their responsibilities. |
| [Overview](overview.md) | Provides an overview of the SDK and its components. |
| [Core Classes](core-classes.md) | Describes the core classes of the SDK and their responsibilities. |
24 changes: 24 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
items:
- name: Getting Started
href: getting-started.html
- name: API
href: api/index.html
items:
- name: MTGOSDK
href: api/MTGOSDK/MTGOSDK.html
- name: MTGOSDK.MSBuild
href: api/MTGOSDK.MSBuild/MTGOSDK.MSBuild.html
- name: MTGOSDK.Win32
href: api/MTGOSDK.Win32/MTGOSDK.Win32.html
expanded: true
- name: Architecture
href: architecture/README.html
items:
- name: Overview
href: architecture/overview.html
- name: Core Classes
href: architecture/core-classes.html
- name: FAQ
href: FAQ.html
- name: Changelog
href: CHANGELOG.html
6 changes: 6 additions & 0 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"commands": [
"nbgv"
]
},
"docfx": {
"version": "2.77.0",
"commands": [
"docfx"
]
}
}
}