Add b2-based doc building (PR #96)

This commit is contained in:
joaquintides
2025-10-21 18:52:05 +02:00
committed by GitHub
parent 393b731466
commit 3fab9dfdf7
4 changed files with 63 additions and 2 deletions

57
doc/Jamfile.v2 Normal file
View File

@@ -0,0 +1,57 @@
import generate ;
import path ;
import property-set ;
import virtual-target ;
path-constant HERE : . ;
make html/index.html : build_docs.sh : @run-script ;
generate files-to-install : html/index.html : <generating-rule>@delayed-glob ;
install install
: files-to-install
: <location>html
<install-source-root>html/dynamic_bitset
;
explicit html/index.html files-to-install ;
# this runs the antora script
actions run-script
{
bash $(>)
}
# this globs after its sources are created
rule delayed-glob ( project name : property-set : sources * )
{
for local src in $(sources)
{
# the next line causes the source to be generated immediately
# and not later (which it normally would)
UPDATE_NOW [ $(src).actualize ] ;
}
# we need to construct the path to the globbed directory;
# this path would be <current-project>/antora
local root = [ path.root html [ $(project).location ] ] ;
local files ;
# actual globbing happens here
for local file in [ path.glob-tree $(root) : * ]
{
# we have to skip directories, because our match expression accepts anything
if [ CHECK_IF_FILE $(file) ]
{
# we construct a list of targets to copy
files += [ virtual-target.from-file $(file:D=) : $(file:D) : $(project) ] ;
}
}
# we prepend empty usage requirements to the result
return [ property-set.empty ] $(files) ;
}
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : install ;
explicit boostrelease ;

View File

@@ -25,4 +25,5 @@ echo "Building docs in custom dir..."
PATH="$(pwd)/node_modules/.bin:${PATH}"
export PATH
npx antora --clean --fetch "$PLAYBOOK" --stacktrace --log-level all
cp -f html/index.html html/dynamic_bitset.html # redirects from pre-Antora docs location
echo "Done"

View File

@@ -25,6 +25,9 @@ content:
start_path: doc
edit_url: 'https://github.com/boostorg/dynamic_bitset/edit/{refname}/{path}'
output:
dir: html
ui:
bundle:
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip