Copy an output bundle into the site

BNR info-hub Technical Manual

1 Copy an output bundle into the site

1.1 Purpose

This guide explains how to copy approved Stata-generated output bundles into the Quarto site download area.

This copy step is a deliberate publication boundary.

canonical Stata output -> approved site copy -> Quarto publication

1.2 Folder model

Folder Purpose
outputs/public/briefings/{briefing_id}/ canonical Stata-generated public output bundle
site/downloads/files/briefings/{briefing_id}/ website-accessible copy used by Quarto pages

2 Stage 1: Identify the briefing ID

For the case-count pilot:

cvd_cases_2023_v1

Use a stable ID:

domain_topic_year_version

Example:

cvd_cases_2023_v1

3 Stage 2: Check the source bundle

outputs/public/briefings/cvd_cases_2023_v1/

Expected structure:

tables/
figures/
data/
meta.yml
build.yml

Do not create it manually.

Run the relevant Stata briefing DO file.

4 Stage 3: Copy the bundle

From PowerShell:

$repo = "C:\yoshimi-hot\output\analyse-bnr\info-hub"
$briefing = "cvd_cases_2023_v1"

$source = "$repo\outputs\public\briefings\$briefing"
$target = "$repo\site\downloads\files\briefings\$briefing"

New-Item -ItemType Directory -Force -Path $target | Out-Null
Copy-Item "$source\*" $target -Recurse -Force

5 Stage 4: Optional clean copy

Use this only when you are sure the site copy should be fully replaced.

$repo = "C:\yoshimi-hot\output\analyse-bnr\info-hub"
$briefing = "cvd_cases_2023_v1"

$source = "$repo\outputs\public\briefings\$briefing"
$target = "$repo\site\downloads\files\briefings\$briefing"

if (Test-Path $target) {
  Remove-Item $target -Recurse -Force
}

New-Item -ItemType Directory -Force -Path $target | Out-Null
Copy-Item "$source\*" $target -Recurse -Force
Back to top