DuxtContentApp class

Duxt-flavored ContentApp for documentation sites

Wraps jaspr_content's ContentApp with sensible defaults and Duxt conventions for building documentation sites.

Usage

import 'package:duxt/content.dart';

// In main.server.dart
runApp(
  Document(
    body: DuxtContentApp(
      layouts: [DocsLayout(), UiLayout()],
      components: [MyCustomComponent()],
    ),
  ),
);

Constructors

DuxtContentApp({String contentDir = 'content', bool eagerlyLoadAllPages = false, TemplateEngine? templateEngine, List<PageParser> parsers = const [], List<PageExtension> extensions = const [], List<CustomComponent> components = const [], List<PageLayoutBase> layouts = const [], ContentTheme? theme})
const

Properties

components List<CustomComponent>
Custom components that can be used in content
final
contentDir String
Directory containing content files (default: 'content')
final
eagerlyLoadAllPages bool
Whether to eagerly load all pages at startup
final
extensions List<PageExtension>
Page extensions for post-processing
final
hashCode int
The hash code for this object.
no setterinherited
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
layouts List<PageLayoutBase>
Page layouts
final
parsers List<PageParser>
Content parsers (default: MarkdownParser())
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
templateEngine TemplateEngine?
Template engine for processing templates (default: MustacheTemplateEngine)
final
theme ContentTheme?
Content theme
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited