Mkdocs plugin extension.
If extra python packages are required, use python extension: python.pip 'module:version', 'module2:version'.
To override default package version: python.pip 'mkdocs:17.0' (even downgrade is allowed).
See gradle-use-python-plugin for details.
Publishing to github pages is implemented with mkdocs site
| Modifiers | Name | Description |
|---|---|---|
static class |
MkdocsExtension.Publish |
Publication configuration. |
| Type | Name and description |
|---|---|
static java.lang.String[] |
DEFAULT_MODULESThese are default modules required to use mkdocs and mkdocs material. |
java.lang.String |
buildDirDocumentation build directory root. |
MkdocsExtension.Publish |
publishPublication configuration. |
java.lang.String |
sourcesDirDocumentation sources folder (mkdocs sources root folder). |
boolean |
strictCause mkdocs to abort build on any warning (--strict option of build and serve commands). |
boolean |
updateSiteUrl'site_url' configuration in mkdocs.yml declares full site url. |
| Constructor and description |
|---|
MkdocsExtension
(org.gradle.api.Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.String |
resolveComment() |
|
java.lang.String |
resolveDocPath() |
|
void |
setPublish(groovy.lang.Closure config) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
These are default modules required to use mkdocs and mkdocs material.
Always applied. Module version could be overridden by python pip configuration
python.pip 'mkdocs:0.18.0' (note that version could be also downgraded).
Documentation build directory root. Folder structure is different from usual mkdocs because multi-version
publishing is expected. Mkdocs build task will actually build into '$buildDir/$publish.docPath/'.
If root redirect is enabled (publish as default version) then index.html (with redirect) will be
automatically added at the root folder during the build.
Publication configuration.
Documentation sources folder (mkdocs sources root folder).
Cause mkdocs to abort build on any warning (--strict option of build and serve commands). Disabled by default.
'site_url' configuration in mkdocs.yml declares full site url. Configuration affects meta tag and generated sitemap.xml. With multi-version publication, different site url's must be used for each generated version.
Set root site url into 'site_url' and mkdocsBuild will update mkdocs.yml by adding correct folder to the root path. This way generated site will contain correct urls. After the build original config is reverted (so config will always contain the root url).
Note that config will not be touched if site_url is not defined or multi-version publishing not used. Config will not be changed for mkdocsServe task because it is not important for general documentation development (you can always build final version (with mkdocsBuild) and verify generated urls).
Set to false to disable mkdocs.yml config modification.
Groovy Documentation