BookCatalog Pennington.Book
Advertises each configured book as a DownloadLink. Derives the link list purely from BookOptions, PenningtonOptions, and LocalizationOptions — it never touches the site projection, so it is safe to resolve on the request path (the DocSite sidebar resolves it in MainLayout.OnInitializedAsync). The link label comes from the pennington.book.download translation when one is registered, falling back to "Download as PDF".
Constructors
BookCatalog
#public BookCatalog(BookOptions options, PenningtonOptions penn, LocalizationOptions localization, TranslationOptions translations)
Creates the catalog over the configured book, localization, and translation options.
Parameters
optionsBookOptionspennPenningtonOptionslocalizationLocalizationOptionstranslationsTranslationOptions
Methods
GetLinks
#public IReadOnlyList<DownloadLink> GetLinks(string locale = null)
Returns the links available for locale (or the default locale when null), each with a locale-appropriate URL.
Parameters
localestring
Returns
IReadOnlyList<DownloadLink>Pennington.Book.BookCatalog
namespace Pennington.Book;
/// Advertises each configured book as a DownloadLink. Derives the link list purely from BookOptions, PenningtonOptions, and LocalizationOptions — it never touches the site projection, so it is safe to resolve on the request path (the DocSite sidebar resolves it in MainLayout.OnInitializedAsync). The link label comes from the pennington.book.download translation when one is registered, falling back to "Download as PDF".
public class BookCatalog
{
/// Creates the catalog over the configured book, localization, and translation options.
public BookCatalog(BookOptions options, PenningtonOptions penn, LocalizationOptions localization, TranslationOptions translations)
;
/// Returns the links available for locale (or the default locale when null), each with a locale-appropriate URL.
public IReadOnlyList<DownloadLink> GetLinks(string locale = null)
;
}