Skip to content

Commit 9d50e9c

Browse files
bmorelli25lcawl
andauthored
Draft runbook for moving reference content (#603)
* draft runbook * updates * more updates Signed-off-by: bmorelli25 <[email protected]> * add step about deleting asciidoc warnign * Apply suggestions from code review Co-authored-by: Lisa Cawley <[email protected]> * Update docs/migration/guide/move-ref-docs.md --------- Signed-off-by: bmorelli25 <[email protected]> Co-authored-by: Lisa Cawley <[email protected]>
1 parent 27a004f commit 9d50e9c

File tree

3 files changed

+131
-0
lines changed

3 files changed

+131
-0
lines changed

docs/_docset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ toc:
3636
- file: working-in-docs-content.md
3737
- file: automated.md
3838
- file: tooling.md
39+
- file: move-ref-docs.md
3940
- file: mapping.md
4041
- file: how-to-set-up-docs-previews.md
4142
- folder: configure
552 KB
Loading
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
navigation_title: Move reference docs
3+
---
4+
5+
# Move reference docs from Asciidocalypse
6+
7+
:::{note}
8+
This guide is only for technical writers tasked with moving content out of `elastic/asciidocalypse`.
9+
:::
10+
11+
## How reference content works in V3
12+
13+
There are two use cases for building reference content in V3:
14+
- **Preview builds**
15+
- **elastic.co/docs builds**
16+
17+
Some repositories, like [`elastic/elastic-serverless-forwarder`](https://github.com/elastic/elastic-serverless-forwarder), contain a single chunk of content within the larger `elastic.co/docs` build. This means the structure of the content is the same for both preview builds and the final Elastic.co/docs build.
18+
19+
However, most repositories contain content that will live in multiple locations within the new `elastic.co/docs` IA. Consider `apm-agent-android` as an example. It has the following content:
20+
- Reference docs
21+
- Release notes
22+
- Known issues
23+
- Breaking changes
24+
- Deprecations
25+
26+
### Directory Structure
27+
28+
Release notes do **not** require individual `toc.yml` files for each content set. The directory structure for `apm-agent-android` therefore follows this format:
29+
30+
```md
31+
docs/
32+
`docset.yml`
33+
* Defines substitutions
34+
* Includes all `toc.yml` files in this repo
35+
* Ignored by the assembler
36+
reference/
37+
`toc.yml` (for this directory)
38+
All reference `.md` files go here
39+
release-notes/
40+
`toc.yml` (for this directory)
41+
All release notes, known issues, breaking changes, and deprecations files go here
42+
images/
43+
All image files for all content sets
44+
```
45+
46+
### Preview Site vs. Full Site Structure
47+
48+
For individual repository preview builds, **all** content in the `docs/` directory builds together, appearing as:
49+
50+
```md
51+
> Reference
52+
Page one
53+
Page two
54+
Page three
55+
56+
> Release notes
57+
> Known issues
58+
APM Android Agent
59+
> Breaking changes
60+
APM Android Agent
61+
> Deprecations
62+
APM Android Agent
63+
APM Android Agent release notes
64+
```
65+
66+
This structure is defined in the repo's `docset.yml` file.
67+
68+
For the **full Elastic.co/docs site**, the assembler references the individual content set definitions (`toc.yml`) within the repo and organizes the content accordingly:
69+
70+
![Diagram of how everything maps together](../../images/great-drawing-of-new-structure.png)
71+
72+
## How to Move Reference Content
73+
74+
The steps below explain how to move reference content. You can also take a look at our [sample PR](https://github.com/elastic/apm-agent-android/pull/398), which has specific commits to illustrate some of the steps below.
75+
76+
### Step 1: Delete Existing AsciiDoc Files
77+
78+
:::{important}
79+
Skip this step for **any Cloud repos** and the **search-ui repository**.
80+
:::
81+
82+
Ensure you only delete **external documentation files**.
83+
- In some repositories, this means deleting the entire `/docs` directory.
84+
- In others, manually verify which files should be removed.
85+
- Use [`conf.yaml`](https://github.com/elastic/docs/blob/master/conf.yaml) to determine what should and shouldn't be removed.
86+
87+
Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/398/commits/749803ae9bccdb9f8abdf27a5c7434350716b6c0)
88+
89+
### Step 2: Copy and Paste New Content
90+
91+
Move content from `asciidocalypse` to the correct directory in the target repo.
92+
Use [issue#130](https://github.com/elastic/docs-eng-team/issues/130) to determine the correct path structure.
93+
94+
Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/398/commits/3f966b0e1fa2f008da23d02f2c9e91a60c1bdf8d)
95+
96+
### Step 3: Add the new CI checks
97+
98+
**docs-build**
99+
* The file to add: [`github/workflows/docs-build.yml`](https://github.com/elastic/docs-content/blob/main/.github/workflows/docs-build.yml)
100+
* The path and name of the new file: `.github/workflows/docs-build.yml`
101+
102+
**docs-cleanup**
103+
* The file to add: [`.github/workflows/docs-cleanup.yml`](https://github.com/elastic/docs-content/blob/main/.github/workflows/docs-cleanup.yml)
104+
* The path and name of the new file: `.github/workflows/docs-cleanup.yml`
105+
106+
Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/398/commits/e869386bbf4af23d51432226f1fd3935d233e43d)
107+
108+
### Step 4: Delete the asciidoc warning
109+
110+
:::{important}
111+
Skip this step for **any Cloud repos** and the **search-ui repository**.
112+
:::
113+
114+
During the migration freeze, we added a check to each repository that warned when a PR was opened against asciidoc files in `main`. It is now safe to remove this file.
115+
116+
File to delete: `.github/workflows/comment-on-asciidoc-changes.yml`
117+
118+
Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/398/commits/be422934e79c5ecadd7b76523d2e1676fc86f323)
119+
120+
### Step 4: Wait for CI to Pass
121+
122+
Verify that all automated checks pass before proceeding. If you encounter any linking failures and need help resolving them, reach out in the typical docs channels.
123+
124+
### Step 5: Merge the PR
125+
126+
Once everything is confirmed working, merge the pull request.
127+
128+
### Step 6: Update the Tracking Issue
129+
130+
Update [issue#130](https://github.com/elastic/docs-eng-team/issues/130) to reflect the completed migration.

0 commit comments

Comments
 (0)