BookDefinition Pennington.Book
One book carved out of the site's table of contents. A book covers every page whose canonical path falls under RoutePrefix; the whole TOC when the prefix is /.
Properties
EffectiveSlugstring- Effective output slug —
Slugwhen set, otherwise derived fromRoutePrefix. NormalizedRoutePrefixstring- Route prefix normalized to a leading + trailing slash (
/tutorials/);/for the whole site. RoutePrefixstring- Canonical route prefix the book covers (for example
/tutorials/, or/for the whole site). Slugstring- Optional slug for the output file (
pdf/{slug}.pdf); defaults to the route prefix flattened to a slug. Subtitlestring- Optional cover subtitle; defaults to the site description for the whole-site book.
Titlestring- Book title, shown on the cover and the download link.
Constructors
BookDefinition
#public BookDefinition(string Title, string RoutePrefix)
One book carved out of the site's table of contents. A book covers every page whose canonical path falls under RoutePrefix; the whole TOC when the prefix is /.
Parameters
Titlestring- Book title, shown on the cover and the download link.
RoutePrefixstring- Canonical route prefix the book covers (for example
/tutorials/, or/for the whole site).
Pennington.Book.BookDefinition
namespace Pennington.Book;
/// One book carved out of the site's table of contents. A book covers every page whose canonical path falls under RoutePrefix; the whole TOC when the prefix is /.
public record BookDefinition
{
/// One book carved out of the site's table of contents. A book covers every page whose canonical path falls under RoutePrefix; the whole TOC when the prefix is /.
public BookDefinition(string Title, string RoutePrefix)
;
/// Effective output slug — Slug when set, otherwise derived from RoutePrefix.
public string EffectiveSlug { get; }
/// Route prefix normalized to a leading + trailing slash (/tutorials/); / for the whole site.
public string NormalizedRoutePrefix { get; }
/// Canonical route prefix the book covers (for example /tutorials/, or / for the whole site).
public string RoutePrefix { get; set; }
/// Optional slug for the output file (pdf/{slug}.pdf); defaults to the route prefix flattened to a slug.
public string Slug { get; set; }
/// Optional cover subtitle; defaults to the site description for the whole-site book.
public string Subtitle { get; set; }
/// Book title, shown on the cover and the download link.
public string Title { get; set; }
}