diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-03 18:06:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 17:06:45 +0000 |
| commit | 5b3593e571826ae44a3aeb0e0f6f09face7291ac (patch) | |
| tree | 170935517d1d1a331ce7e7d4e999e4a20dc0e0ca /docs | |
| parent | eee903b0f8d5c0dfda3539888d7473c6163841b0 (diff) | |
Enable HTML feature in docs generator (#5800)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs index 004c237c..ff745c9c 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -21,6 +21,7 @@ use typst::foundations::{ AutoValue, Bytes, CastInfo, Category, Func, Module, NoneValue, ParamInfo, Repr, Scope, Smart, Type, Value, FOUNDATIONS, }; +use typst::html::HTML; use typst::introspection::INTROSPECTION; use typst::layout::{Abs, Margin, PageElem, PagedDocument, LAYOUT}; use typst::loading::DATA_LOADING; @@ -31,7 +32,7 @@ use typst::symbols::SYMBOLS; use typst::text::{Font, FontBook, TEXT}; use typst::utils::LazyHash; use typst::visualize::VISUALIZE; -use typst::Library; +use typst::{Feature, Library, LibraryBuilder}; macro_rules! load { ($path:literal) => { @@ -57,7 +58,9 @@ static GROUPS: LazyLock<Vec<GroupData>> = LazyLock::new(|| { }); static LIBRARY: LazyLock<LazyHash<Library>> = LazyLock::new(|| { - let mut lib = Library::default(); + let mut lib = LibraryBuilder::default() + .with_features([Feature::Html].into_iter().collect()) + .build(); let scope = lib.global.scope_mut(); // Add those types, so that they show up in the docs. @@ -166,6 +169,7 @@ fn reference_pages(resolver: &dyn Resolver) -> PageModel { category_page(resolver, INTROSPECTION), category_page(resolver, DATA_LOADING), category_page(resolver, PDF), + category_page(resolver, HTML), ]; page } |
