public abstract class AbstractDownloadableComponent<ComponentSrc, ResolvedComponent> extends Object
Base class for building extension which can allows styles and themes to be added to various Asciidoctor backends that may require them.
ComponentSrc - Source component typeResolvedComponent - Final comnponent type| Type Params | Return Type | Name and description |
|---|---|---|
|
public ResolvedComponent |
getByName(String name)Retrieve a component by name. |
|
public void |
github(String name, Action<AscGitHubArchive> githubConfig)Use a GitHub repository as a theme. |
|
public void |
gitlab(String name, groovy.lang.Closure<?> gitlabConfig)Use a GitLab repository as a theme. |
|
public void |
gitlab(String name, Action<AscGitLabArchive> gitlabConfig)Use a GitLab repository as a theme. |
|
public void |
local(String name, Action<ComponentSrc> localConfig)Adds a component source that is available on the local filesystem. |
Retrieve a component by name.
If the component has not already been resolved, it will be resolved by this call.
name - Name of the component.Use a GitHub repository as a theme.
name - Name of themegithubConfig - Action to configure a AscGitHubArchive.Use a GitLab repository as a theme.
name - Name of themegitlabConfig - Closure to configure a AscGitLabArchive.Use a GitLab repository as a theme.
name - Name of themegitlabConfig - Action to configure a AscGitLabArchive.Adds a component source that is available on the local filesystem.
By default, the styleName will match that of the theme.
If the name ends with .yml, it’s assumed to be the complete name of a file.
Otherwise, -theme.yml is appended to the name to make the file name (i.e., <name>-theme.yml).
name - Name of themelocalConfig - Configures an instance of ComponentSrc.