Skip to content

Commit 722754e

Browse files
committed
udpate steeting
Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
1 parent c3fa7c8 commit 722754e

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.kiro/steering/docs.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,28 @@ Within this documentations page, website navigation through `.nav.yml` file shou
1010

1111
## Documentation Generation System
1212

13-
The documentation uses an automatic generation system for `available_images.md`, `support_policy.md`, and release notes.
13+
The documentation uses an automatic generation system for `index.md`, `available_images.md`, `support_policy.md`, and release notes.
14+
15+
### Homepage Generation (README.md → index.md)
16+
17+
`README.md` at the repository root is the **source of truth** for the homepage. It uses hardcoded display names and absolute URLs to `SITE_URL` (`https://aws.github.io/deep-learning-containers/`) so it renders correctly on GitHub.
18+
19+
`docs/index.md` is **generated** (listed in `.gitignore`) by `generate_index()` which:
20+
21+
1. Reads `README.md` content
22+
1. Strips `SITE_URL` prefix from absolute URLs to produce relative links (e.g., `reference/available_images/`)
23+
1. Wraps content in `templates/index.template.md` (adds MkDocs frontmatter)
24+
25+
Internal doc links in README.md use trailing-slash format (e.g., `https://aws.github.io/deep-learning-containers/security/`). After SITE_URL stripping, these become relative directory-style links that MkDocs resolves automatically.
26+
27+
To update the homepage, edit `README.md` and regenerate: `python docs/src/main.py --index-only`
1428

1529
### Directory Structure
1630

1731
```
1832
docs/src/
1933
├── templates/
34+
│ ├── index.template.md # Homepage template (wraps README.md content)
2035
│ ├── reference/ # Reference page templates
2136
│ │ ├── available_images.template.md
2237
│ │ └── support_policy.template.md
@@ -56,11 +71,11 @@ docs/src/
5671

5772
### File Responsibilities
5873

59-
- `constants.py` - Path constants, global variables, `GLOBAL_CONFIG`, and `RELEASE_NOTES_REQUIRED_FIELDS`
74+
- `constants.py` - Path constants, global variables, `GLOBAL_CONFIG`, `SITE_URL`, `README_PATH`, and `RELEASE_NOTES_REQUIRED_FIELDS`
6075
- `sorter.py` - Sorting tiebreaker functions: `platform_sorter`, `accelerator_sorter`, `repository_sorter`
6176
- `utils.py` - Utility functions: `load_yaml()`, `load_table_config()`, `load_jinja2()`, `render_table()`, `write_output()`, `parse_version()`, `clone_git_repository()`, `build_ecr_uri()`, `build_public_ecr_uri()`, `get_framework_order()`
6277
- `image_config.py` - `ImageConfig` class, image loaders (`load_repository_images`, `load_legacy_images`, `load_images_by_framework_group`), `sort_by_version`, `get_latest_image_uri`, `build_image_row`, `check_public_registry`
63-
- `generate.py` - `generate_support_policy()`, `generate_available_images()`, `generate_release_notes()`, `generate_all()`
78+
- `generate.py` - `generate_index()`, `generate_support_policy()`, `generate_available_images()`, `generate_release_notes()`, `generate_all()`
6479
- `macros.py` - MkDocs macros plugin integration
6580
- `hooks.py` - MkDocs hooks entry point
6681

@@ -398,6 +413,7 @@ cd docs/src && python main.py --verbose
398413
python main.py --available-images-only
399414
python main.py --support-policy-only
400415
python main.py --release-notes-only
416+
python main.py --index-only
401417

402418
# With MkDocs (automatic via hooks)
403419
mkdocs serve

0 commit comments

Comments
 (0)