Merge pull request #299 from cmazakas/antora-documentation

Convert documentation to Antora
This commit is contained in:
Christian Mazakas 2025-01-20 08:18:32 -08:00 committed by GitHub
commit 18ef4784ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
174 changed files with 2688 additions and 1238 deletions

2
doc/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build/
/node_modules/

View File

@ -1,21 +1,57 @@
# Copyright 2005 Daniel James. import generate ;
# Distributed under the Boost Software License, Version 1.0. (See accompanying import path ;
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import property-set ;
import virtual-target ;
import asciidoctor ; path-constant HERE : . ;
html unordered.html : unordered.adoc ; make html/index.html : build_antora.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/unordered
;
explicit html/index.html files-to-install ;
install html_ : unordered.html : <location>html ; # this runs the antora script
actions run-script
{
bash $(>)
}
pdf unordered.pdf : unordered.adoc ; # this globs after its sources are created
explicit unordered.pdf ; 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 ] ;
}
install pdf_ : unordered.pdf : <location>pdf ; # we need to construct the path to the globbed directory;
explicit pdf_ ; # 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 ; alias boostdoc ;
explicit boostdoc ; explicit boostdoc ;
alias boostrelease : html_ ; alias boostrelease : install ;
explicit boostrelease ; explicit boostrelease ;

6
doc/antora.yml Normal file
View File

@ -0,0 +1,6 @@
name: unordered
version: ~
title: Boost.Unordered
nav:
- modules/ROOT/nav.adoc
start_page: intro.adoc

9
doc/antora_docs.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
npm ci
npx antora unordered-playbook.yml

9
doc/build_antora.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
npm ci
npx antora unordered-playbook.yml

Some files were not shown because too many files have changed in this diff Show More