Skip to content

Commit cd60dab

Browse files
authored
fix(docs): add docs.metadata.json for product neutral guides (googleapis#15960)
1 parent d83c3a9 commit cd60dab

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

ci/cloudbuild/builds/publish-docs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ function stage_docfx() {
9494
local path="${binary_dir}/google/cloud/${feature}/docfx"
9595
if [[ "${feature}" == "common" ]]; then
9696
path="${binary_dir}/google/cloud/docfx"
97+
elif [[ "${feature}" == "guides" ]]; then
98+
path="${binary_dir}/product-neutral-guides/docfx"
9799
fi
98100

99101
echo "path=${path}" >"${log}"
@@ -120,6 +122,7 @@ io::log "bucket: gs://${docfx_bucket}"
120122
# have documentation, such as `experimental-storage_grpc`. These are harmless,
121123
# as the `stage_docfx()` function skips missing directories without an error.
122124
uploaded=(common)
125+
uploaded+=(guides)
123126
uploaded+=("${FEATURE_LIST[@]}")
124127
echo "${uploaded[@]}" | xargs -P "$(nproc)" -n 1 \
125128
bash -c "stage_docfx \"\${0}\" \"${docfx_bucket}\" cmake-out \"cmake-out/\${0}.docfx.log\""

docfx/product-neutral-guides/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ set(TOC_ITEMS ${toc_items})
5151
set(toc_file "${output_dir}/toc.yml")
5252
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/toc.yml.in" "${toc_file}" @ONLY)
5353

54+
set(metadata_file "${output_dir}/docs.metadata.json")
55+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/docs.metadata.json.in"
56+
"${metadata_file}" @ONLY)
57+
list(APPEND copied_files "${metadata_file}")
58+
5459
add_custom_target(product-neutral-guides-docs DEPENDS ${copied_files})
5560

5661
add_dependencies(all-docfx product-neutral-guides-docs)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"language": "cpp",
3+
"name": "product-neutral-guides",
4+
"version": "@PROJECT_VERSION@"
5+
}

0 commit comments

Comments
 (0)