Record Class SphinxIntegration.SphinxSettings
java.lang.Object
java.lang.Record
software.amazon.smithy.docgen.integrations.SphinxIntegration.SphinxSettings
- Record Components:
format
- The sphinx output format that will be built automatically during generation. The default is html. See sphinx docs for other output format options.theme
- The sphinx html theme to use. The default is alabaster. If your chosen theme requires a python dependency to be added, use theextraDependencies
setting.extraDependencies
- Any extra python dependencies that should be added to therequirements.txt
file for the sphinx project. These can be particularly useful for customtheme
s.extraExtensions
- Any extra sphinx extensions that should be added to theconf.py
file for the sphinx project.autoBuild
- Whether to automatically attempt to build the generated sphinx project. The default is true. This will attempt to discover Python 3 on the path, create a virtual environment inside the output directory, install all the dependencies into that virtual environment, and finally run sphinx-build.
- Enclosing class:
- SphinxIntegration
public static record SphinxIntegration.SphinxSettings(String format, String theme, List<String> extraDependencies, List<String> extraExtensions, boolean autoBuild)
extends Record
Settings for sphinx projects, regardless of their intermediate format.
These settings can be set in the smithy-build.json
file under the
sphinx
key of the doc generation plugin's integrations
config.
The following example shows a smithy-build.json
configuration that sets
the default sphinx output format to be dirhtml instead of html.
{
"version": "1.0",
"projections": {
"sphinx-markdown": {
"plugins": {
"docgen": {
"service": "com.example#DocumentedService",
"format": "sphinx-markdown",
"integrations": {
"sphinx": {
"format": "dirhtml"
}
}
}
}
}
}
}
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theautoBuild
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theextraDependencies
record component.Returns the value of theextraExtensions
record component.format()
Returns the value of theformat
record component.fromNode
(ObjectNode node) Load the settings from anObjectNode
.final int
hashCode()
Returns a hash code value for this object.theme()
Returns the value of thetheme
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SphinxSettings
public SphinxSettings(String format, String theme, List<String> extraDependencies, List<String> extraExtensions, boolean autoBuild) Creates an instance of aSphinxSettings
record class.- Parameters:
format
- the value for theformat
record componenttheme
- the value for thetheme
record componentextraDependencies
- the value for theextraDependencies
record componentextraExtensions
- the value for theextraExtensions
record componentautoBuild
- the value for theautoBuild
record component
-
-
Method Details
-
fromNode
Load the settings from anObjectNode
.- Parameters:
node
- theObjectNode
to load settings from.- Returns:
- loaded settings based on the given node.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
format
Returns the value of theformat
record component.- Returns:
- the value of the
format
record component
-
theme
Returns the value of thetheme
record component.- Returns:
- the value of the
theme
record component
-
extraDependencies
Returns the value of theextraDependencies
record component.- Returns:
- the value of the
extraDependencies
record component
-
extraExtensions
Returns the value of theextraExtensions
record component.- Returns:
- the value of the
extraExtensions
record component
-
autoBuild
public boolean autoBuild()Returns the value of theautoBuild
record component.- Returns:
- the value of the
autoBuild
record component
-