diff --git a/docs/Dockerfile b/docs/Dockerfile index 94c4d78f..b3ca3592 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,10 +1,10 @@ FROM mono:latest -RUN apt-get update -y && apt-get install -y unzip +RUN apt-get update -y && apt-get install -y unzip git RUN mkdir -p /docfx WORKDIR /docfx -RUN curl -L https://github.com/dotnet/docfx/releases/download/v2.43.3/docfx.zip -O \ +RUN curl -L https://github.com/dotnet/docfx/releases/download/v2.44/docfx.zip -O \ && unzip docfx.zip \ && chmod +r /docfx diff --git a/docs/api/core/.gitignore b/docs/api/core/.gitignore new file mode 100644 index 00000000..ad30bfec --- /dev/null +++ b/docs/api/core/.gitignore @@ -0,0 +1 @@ +*.yml \ No newline at end of file diff --git a/docs/build.gradle b/docs/build.gradle index afb41f98..34a4926f 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -8,18 +8,18 @@ dependencies { doclet files("vendor/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar") } -gradle.projectsEvaluated { +gradle.projectsEvaluated { task generateApiDocs(type: Javadoc) { - source = project(":game").sourceSets.main.java.sourceDirectories - classpath = project(":game").configurations.runtimeClasspath + project(":game").sourceSets.main.output + source = project(":game").sourceSets.main.java.sourceDirectories + classpath = project(":game").configurations.runtimeClasspath + project(":game").sourceSets.main.output + dependsOn(project(":game").assemble) options.encoding 'UTF-8' destinationDir = file("build/generated-files") options.addStringOption("doclet", "com.microsoft.doclet.DocFxDoclet") options.docletpath = configurations.doclet.toList() - dependsOn(project(":game").assemble) } -} +} \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json index 29bb2e37..b9a48121 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -1,18 +1,12 @@ { - "metadata": [ - { - "src": [ - { - "files": [ - ] - } - ], - "dest": "api", - "disableGitFeatures": false, - "disableDefaultFilter": false - } - ], "build": { + "globalMetadata": { + "_appTitle": "Apollo Documentation", + "_gitContribute": { + "repo": "https://github.com/apollo-rsps/apollo", + "branch": "kotlin-experiments" + } + }, "content": [ { "files": [ @@ -27,6 +21,12 @@ "toc.yml", "*.md" ] + }, + { + "files": [ + "plugin-api/toc.yml", + "plugin-api/spec/**.yml" + ] } ], "resource": [ @@ -39,7 +39,7 @@ "overwrite": [ { "files": [ - "apidoc/**.md" + "plugin-api/overwrites/**.md" ], "exclude": [ "obj/**", diff --git a/docs/plugin-api/index.md b/docs/plugin-api/index.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/plugin-api/overwrites/ObjectAction.md b/docs/plugin-api/overwrites/ObjectAction.md new file mode 100644 index 00000000..50eebc74 --- /dev/null +++ b/docs/plugin-api/overwrites/ObjectAction.md @@ -0,0 +1,5 @@ +--- +uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" +--- + +Some test text \ No newline at end of file diff --git a/docs/plugin-api/spec/org.apollo.game.plugin.action.yml b/docs/plugin-api/spec/org.apollo.game.plugin.action.yml new file mode 100644 index 00000000..dd825161 --- /dev/null +++ b/docs/plugin-api/spec/org.apollo.game.plugin.action.yml @@ -0,0 +1,21 @@ +### YamlMime:ManagedReference +items: + - uid: "org.apollo.game.plugin.action" + id: "action" + children: + - "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + langs: + - "java" + - "kotlin" + name: "org.apollo.game.plugin.action" + nameWithType: "org.apollo.game.plugin.action" + fullName: "org.apollo.game.plugin.action" + type: "Namespace" + summary: "Contains action types that can be listened on by plugin scripts." + syntax: + content: "package org.apollo.game.plugin.action" +references: + - uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + name: "ObjectAction" + nameWithType: "ObjectAction" + fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" \ No newline at end of file diff --git a/docs/plugin-api/spec/org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.yml b/docs/plugin-api/spec/org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.yml new file mode 100644 index 00000000..c758c126 --- /dev/null +++ b/docs/plugin-api/spec/org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.yml @@ -0,0 +1,53 @@ +### YamlMime:ManagedReference +items: + - uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + id: "ObjectAction" + parent: "org.apollo.game.plugin.action" + children: + - "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.option" + langs: + - "java" + - "kotlin" + name: "ObjectAction" + nameWithType: "ObjectAction" + fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + type: "Class" + package: "org.apollo.game.plugin.action" + summary: | + An object action is sent when a user interacts with a game object in the workd by using one of + the options presented when the context menu for the object is available. + syntax: + content: "class ObjectAction" + typeParameters: + - id: "T" + - uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.option" + id: "mob" + parent: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + langs: + - "java" + name: "mob" + nameWithType: "ObjectAction.option" + fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction.option" + type: "Field" + package: "org.apollo.game.plugin.action" + summary: "The option selected when performing the action." + syntax: + content: "val option: String" + return: + type: "String" +references: + - uid: "int" + spec.java: + - uid: "int" + name: "int" + fullName: "int" + - uid: "boolean" + spec.java: + - uid: "boolean" + name: "boolean" + fullName: "boolean" + - uid: "T" + spec.java: + - uid: "T" + name: "T" + fullName: "T" \ No newline at end of file diff --git a/docs/plugin-api/toc.yml b/docs/plugin-api/toc.yml new file mode 100644 index 00000000..df1000a5 --- /dev/null +++ b/docs/plugin-api/toc.yml @@ -0,0 +1,6 @@ +### YamlMime:TableOfContent +- uid: "org.apollo.game.plugin.action" + name: "Actions" + items: + - uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction" + name: "ObjectAction" \ No newline at end of file diff --git a/docs/templates/material/partials/logo.tmpl.partial b/docs/templates/material/partials/logo.tmpl.partial new file mode 100644 index 00000000..59403bc6 --- /dev/null +++ b/docs/templates/material/partials/logo.tmpl.partial @@ -0,0 +1,2 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + diff --git a/docs/toc.yml b/docs/toc.yml index a6cc65d6..f796f9f9 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1,6 +1,10 @@ - name: Guide href: guide/ -- name: Api Documentation +- name: Core API Documentation href: api/ homepage: api/index.md + +- name: Plugin API Documentation + href: plugin-api/ + homepage: plugin-api/index.md \ No newline at end of file diff --git a/docs/vendor/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar b/docs/vendor/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar new file mode 100644 index 00000000..ed39cb2e Binary files /dev/null and b/docs/vendor/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar differ diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..c0518171 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,15 @@ +[build] + # Directory to change to before starting a build. + # This is where we will look for package.json/.nvmrc/etc. + + # Directory (relative to root of your repo) that contains the deploy-ready + # HTML files and assets generated by the build. If a base directory has + # been specified, include it in the publish directory path. + publish = "doc/_site" + + # Default build command. + command = ''' + ./gradlew generateApiDocs && \ + docker build -t docfx -f docs/Dockerfile && + docker run -v `pwd`:/srv/project docfx:latest -- docs/ + '''