laika.directive.std.NavigationTreeDirectives
NavigationBuilderConfig
Companion object NavigationBuilderConfig
case class NavigationBuilderConfig(entries: Seq[NavigationNodeConfig], source: SourceFragment, defaultDepth: Int = Int.MaxValue, itemStyles: Set[String] = Set(), excludeRoot: Boolean = false, excludeSections: Boolean = false, excludeSelf: Boolean = false, options: Options = NoOpt) extends Element with BlockResolver with Product with Serializable
A block resolver that replaces itself with a navigation list according to this instances configuration. The resulting navigation tree can either be automatically generated from specified root nodes of the input tree or by specifying entries manually (or a combination of both).
Serves as the implementation for the navigationTree directive, but can also be inserted into the AST manually.
- entries
the list of manual and automatic entries to insert into the navigation tree
- source
the source fragment that produced this navigation builder, for error reporting
- defaultDepth
the depth for automatically generated entries (unless overridden in the entries' config)
- itemStyles
the styles to apply to all navigation items in the list as a render hint
- excludeRoot
indicates whether the root node should be excluded in automatic entries (may be overridden in the entries' config)
- excludeSections
indicates whether sections within documents should be excluded in automatic entries (may be overridden in the entries' config)
- excludeSelf
indicates whether the current document should be included
- options
optional styles and/or an id for the final navigation list
- Alphabetic
- By Inheritance
- NavigationBuilderConfig
- BlockResolver
- Unresolved
- Block
- Element
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
NavigationBuilderConfig(entries: Seq[NavigationNodeConfig], source: SourceFragment, defaultDepth: Int = Int.MaxValue, itemStyles: Set[String] = Set(), excludeRoot: Boolean = false, excludeSections: Boolean = false, excludeSelf: Boolean = false, options: Options = NoOpt)
- entries
the list of manual and automatic entries to insert into the navigation tree
- source
the source fragment that produced this navigation builder, for error reporting
- defaultDepth
the depth for automatically generated entries (unless overridden in the entries' config)
- itemStyles
the styles to apply to all navigation items in the list as a render hint
- excludeRoot
indicates whether the root node should be excluded in automatic entries (may be overridden in the entries' config)
- excludeSections
indicates whether sections within documents should be excluded in automatic entries (may be overridden in the entries' config)
- excludeSelf
indicates whether the current document should be included
- options
optional styles and/or an id for the final navigation list
Type Members
-
type
Self = NavigationBuilderConfig
- Definition Classes
- NavigationBuilderConfig → Block → Element
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val defaultDepth: Int
- val entries: Seq[NavigationNodeConfig]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
eval(cursor: DocumentCursor): Either[String, NavigationList]
Creates a navigation list for the specified document based on this instances configuration.
Creates a navigation list for the specified document based on this instances configuration.
In case of configuration errors or references to non-existing documents an error message will be returned as a
Left
. - val excludeRoot: Boolean
- val excludeSections: Boolean
- val excludeSelf: Boolean
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hasId: Boolean
Indicates whether this element has an id assigned.
Indicates whether this element has an id assigned.
- Definition Classes
- Element
-
def
hasStyle(name: String): Boolean
Indicates whether this element has the specified style assigned.
Indicates whether this element has the specified style assigned.
- Definition Classes
- Element
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val itemStyles: Set[String]
-
def
mergeOptions(opt: Options): Self
Returns a new instance of this element with its options merged with the specified options.
Returns a new instance of this element with its options merged with the specified options.
- Definition Classes
- Element
-
def
modifyOptions(f: (Options) ⇒ Options): Self
Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.
Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.
- Definition Classes
- Element
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
options: Options
- Definition Classes
- NavigationBuilderConfig → Element
-
def
resolve(cursor: DocumentCursor): Block
- Definition Classes
- NavigationBuilderConfig → BlockResolver
-
def
runsIn(phase: RewritePhase): Boolean
- Definition Classes
- NavigationBuilderConfig → BlockResolver
-
val
source: SourceFragment
The fragment from the input source that produced this element.
The fragment from the input source that produced this element. Can be used to report the line of the error or to render a fallback that simply renders back the consumed input.
- Definition Classes
- NavigationBuilderConfig → Unresolved
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
lazy val
unresolvedMessage: String
An error message to display when this element remains unresolved until after the final AST transformation step.
An error message to display when this element remains unresolved until after the final AST transformation step.
- Definition Classes
- NavigationBuilderConfig → Unresolved
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withId(id: String): Self
Returns a new instance of this element with its id set to the specified value, overriding any existing value.
Returns a new instance of this element with its id set to the specified value, overriding any existing value.
- Definition Classes
- Element
-
def
withOptions(options: Options): NavigationBuilderConfig
Returns a new instance of this element with the specified options replacing the current value.
Returns a new instance of this element with the specified options replacing the current value.
- Definition Classes
- NavigationBuilderConfig → Element
-
def
withStyle(name: String): Self
Returns a new instance of this element with the specified style added to its existing styles.
Returns a new instance of this element with the specified style added to its existing styles.
- Definition Classes
- Element
-
def
withStyles(styles: Iterable[String]): Self
Returns a new instance of this element with the specified styles added to its existing styles.
Returns a new instance of this element with the specified styles added to its existing styles.
- Definition Classes
- Element
-
def
withStyles(style: String, styles: String*): Self
Returns a new instance of this element with the specified styles added to its existing styles.
Returns a new instance of this element with the specified styles added to its existing styles.
- Definition Classes
- Element
-
def
withoutId: Self
Returns a new instance of this element without its id.
Returns a new instance of this element without its id.
- Definition Classes
- Element
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated