This is a follow up to #13786, making libxml2 an optional compile-time dependency, fixing the issues with the previous PR (that had to be reverted #14595).
LibXML2 (and by proxy doc sanitization) can be enabled via the libxml2=1 make flag:
make libxml2=1
A warning is printed when building docs without this flag set, informing the user that doc sanitization is disabled:
❯ make docs
Using /opt/homebrew/opt/llvm/bin/llvm-config [version=18.1.6]
./bin/crystal docs src/docs_main.cr --project-name=Crystal --project-version=1.13.0-dev --source-refname=8a01443aa
Using compiled compiler at .build/crystal
Crystal built without LibXML2 support, documentation sanitization disabled
cp -av doc/ docs/
doc/ -> docs
doc//assets -> docs/assets
doc//assets/crystal-born-and-raised.svg -> docs/assets/crystal-born-and-raised.svg
This is a follow up to #13786, making libxml2 an optional compile-time dependency, fixing the issues with the previous PR (that had to be reverted #14595).
LibXML2 (and by proxy doc sanitization) can be enabled via the
libxml2=1
make flag:A warning is printed when building docs without this flag set, informing the user that doc sanitization is disabled:
Resolves #13753