作为构建我的项目的一部分,我希望Dokka的maven插件构建一个markdown wiki,我可以将其部署到github而无需修改。我没有问题构建markdown,并通过intellij查看文档,但我希望直接在我的项目的github wiki中托管它。如果有人有任何想法如何做到这一点,那将是伟大的。
这是我目前的Dokka配置
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>0.9.16</version>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>dokka</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Set to true to skip dokka task, default: false -->
<skip>false</skip>
<outputFormat>gfm</outputFormat>
<!-- Default: ${project.basedir}/target/dokka -->
<outputDir>${project.basedir}/docs/privateurl</outputDir>
<!-- Use default or set to custom path to cache directory to enable package-list caching. -->
<!-- When set to default, caches stored in $USER_HOME/.cache/dokka -->
<cacheRoot>default</cacheRoot>
<!-- List of '.md' files with package and module docs -->
<!-- http://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation -->
<includes>
<file>packages.md</file>
<file>extra.md</file>
</includes>
<!-- Used for linking to JDK, default: 6 -->
<jdkVersion>8</jdkVersion>
<!-- Do not output deprecated members, applies globally, can be overridden by packageOptions -->
<skipDeprecated>true</skipDeprecated>
<!-- Emit warnings about not documented members, applies globally, also can be overridden by packageOptions -->
<reportNotDocumented>false</reportNotDocumented>
<!-- Do not create index pages for empty packages -->
<skipEmptyPackages>true</skipEmptyPackages>
<!-- See platforms section of documentation -->
<impliedPlatforms>
<platform>JVM</platform>
</impliedPlatforms>
<!-- Short form list of sourceRoots, by default, set to ${project.compileSourceRoots} -->
<sourceDirectories>
<dir>src/main</dir>
</sourceDirectories>
<!-- Specifies the location of the project source code on the Web. If provided, Dokka generates "source" links
for each declaration. -->
<sourceLinks>
<link>
<!-- Source directory -->
<dir>${project.basedir}/src/main</dir>
<!-- URL showing where the source code can be accessed through the web browser -->
<url>https://github.com/privateurl</url>
<!--Suffix which is used to append the line number to the URL. Use #L for GitHub -->
<urlSuffix>#L</urlSuffix>
</link>
</sourceLinks>
<!-- No default documentation link to kotlin-stdlib -->
<noStdlibLink>true</noStdlibLink>
</configuration>
</plugin>
答案 0 :(得分:0)
这告诉dokka生成md文件而不是HTML:
jsonObject['list'][i]['anotherList'][j] = ...;
然后你可以将结果推送到github。