mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Build docs in netlify with docfx
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.yml
|
||||
+5
-5
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+14
-14
@@ -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/**",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
uid: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction"
|
||||
---
|
||||
|
||||
Some test text
|
||||
@@ -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<T>"
|
||||
nameWithType: "ObjectAction<T>"
|
||||
fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction<T>"
|
||||
+53
@@ -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<T>"
|
||||
nameWithType: "ObjectAction<T>"
|
||||
fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction<T>"
|
||||
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<T>"
|
||||
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<T>.option"
|
||||
fullName: "org.apollo.game.plugin.kotlin.message.action.obj.ObjectAction<T>.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"
|
||||
@@ -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"
|
||||
@@ -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.}}
|
||||
|
||||
+5
-1
@@ -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
|
||||
Binary file not shown.
@@ -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/
|
||||
'''
|
||||
Reference in New Issue
Block a user