Utility to work with mkdocs config (mkdocs.yml).
| Constructor and description |
|---|
MkdocsConfig
(org.gradle.api.Project project, java.lang.String sourceDir) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.io.File |
backup()Backup configuration file. |
|
boolean |
contains(java.lang.String option)Searches for specified property. |
|
java.lang.String |
find(java.lang.String option)@param option config option to find |
|
java.io.File |
getConfig()@return mkdocs config file |
|
void |
restoreBackup(java.io.File backup)Replace current configuration file with provided backup. |
|
void |
set(java.lang.String option, java.lang.String value)Replace option value in mkdocks config. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), 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() |
Backup configuration file.
Searches for specified property. Supports nesting: if property contains dots then it will search for each property part sequentially (note that multiline list value also counted as property).
Looks only not commented lines. Counts hierarchy.
option - option (maybe composite: separated with dots) name to find
option - config option to findReplace current configuration file with provided backup.
backup - configuration backupReplace option value in mkdocks config.
option - option namevalue - new option value