-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the basic doc structure needed for the elastic docs build. For convenience I added a script that can be executed with `npm run docs` to build the docs locally to see if the doc build passes and how the docs will look like. As soon as we have Jenkins added as CI we should also add a build step for `npm run docs` to make sure we do not break the doc build.
- Loading branch information
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
node_modules | ||
build | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
build | ||
docs | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= APM Node.js Agent Reference | ||
|
||
|
||
== APM Node.js Agent | ||
|
||
Welcome to the APM Node.js agent docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
name=$1 | ||
path=$2 | ||
build_dir=$3 | ||
|
||
docs_dir=$build_dir/docs | ||
html_dir=$build_dir/html_docs | ||
|
||
# Checks if docs clone already exists | ||
if [ ! -d $docs_dir ]; then | ||
# Only head is cloned | ||
git clone --depth=1 https://github.com/elastic/docs.git $docs_dir | ||
else | ||
echo "$docs_dir already exists. Not cloning." | ||
fi | ||
|
||
|
||
index="${path}/index.asciidoc" | ||
|
||
echo "Building docs for ${name}..." | ||
echo "Index document: ${index}" | ||
|
||
dest_dir="$html_dir/${name}" | ||
mkdir -p "$dest_dir" | ||
params="" | ||
if [ "$PREVIEW" = "1" ]; then | ||
params="--chunk=1 -open chunk=1 -open" | ||
fi | ||
$docs_dir/build_docs.pl $params --doc "$index" -out "$dest_dir" |