Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert documentation to Antora #299

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/node_modules/
58 changes: 47 additions & 11 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,21 +1,57 @@
# Copyright 2005 Daniel James.
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import generate ;
import path ;
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 ;
explicit unordered.pdf ;
# 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 ] ;
}

install pdf_ : unordered.pdf : <location>pdf ;
explicit pdf_ ;
# 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 : html_ ;
alias boostrelease : install ;
explicit boostrelease ;
6 changes: 6 additions & 0 deletions doc/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: unordered
version: ~
title: Boost.Unordered
nav:
- modules/ROOT/nav.adoc
start_page: intro.adoc
9 changes: 9 additions & 0 deletions doc/antora_docs.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions doc/build_antora.sh
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
29 changes: 29 additions & 0 deletions doc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
* xref:intro.adoc[]
* xref:buckets.adoc[]
* xref:hash_equality.adoc[]
* xref:regular.adoc[]
* xref:concurrent.adoc[]
* xref:hash_quality.adoc[]
* xref:compliance.adoc[]
* xref:structures.adoc[]
* xref:debuggability.adoc[]
* xref:benchmarks.adoc[]
* xref:rationale.adoc[]
* xref:ref.adoc[]
** xref:reference/unordered_map.adoc[unordered_map]
** xref:reference/unordered_multimap.adoc[unordered_multimap]
** xref:reference/unordered_set.adoc[unordered_set]
** xref:reference/unordered_multiset.adoc[unordered_multiset]
** xref:reference/hash_traits.adoc[hash_traits]
** xref:reference/stats.adoc[Statistics]
** xref:reference/unordered_flat_map.adoc[unordered_flat_map]
** xref:reference/unordered_flat_set.adoc[unordered_flat_set]
** xref:reference/unordered_node_map.adoc[unordered_node_map]
** xref:reference/unordered_node_set.adoc[unordered_node_set]
** xref:reference/concurrent_flat_map.adoc[concurrent_flat_map]
** xref:reference/concurrent_flat_set.adoc[concurrent_flat_set]
** xref:reference/concurrent_node_map.adoc[concurrent_node_map]
** xref:reference/concurrent_node_set.adoc[concurrent_node_set]
* xref:changes.adoc[]
* xref:bibliography.adoc[]
* xref:copyright.adoc[]
Loading
Loading