MCPcopy Create free account
hub / github.com/DevCloudNinjas/DevOps-Projects / write_project_pages

Function write_project_pages

tools/build_starlight_content.py:1095–1195  ·  view source on GitHub ↗
(projects: list[dict])

Source from the content-addressed store, hash-verified

1093
1094
1095def write_project_pages(projects: list[dict]) -> None:
1096 project_dir = TARGET_DOCS / "projects"
1097 project_dir.mkdir(parents=True, exist_ok=True)
1098 for project in projects:
1099 raw_readme = project["readme"].read_text(encoding="utf-8")
1100 source_anchor = original_readme_anchor(raw_readme)
1101 readme = raw_readme
1102 readme = strip_first_h1(readme)
1103 readme = rewrite_project_readme_links(readme, project["dir"])
1104 readme = demote_markdown_headings(readme)
1105 tags = project_tags(project)
1106 summary = project_summary(project)
1107 content = (
1108 frontmatter(
1109 project["name"],
1110 order=project["number"],
1111 description=project["notes"],
1112 )
1113 + summary
1114 + f"""\n<div class="project-tags">
1115{tags}</div>
1116
1117## Overview
1118
1119{project['notes']}
1120
1121## What You Will Build
1122
1123<div class="lab-detail-grid">
1124 <div class="lab-panel">
1125 <span class="meta-label">Outcome</span>
1126 <strong>{escape_html(project['outcome_proof'])}</strong>
1127 </div>
1128 <div class="lab-panel">
1129 <span class="meta-label">Tools used</span>
1130 <strong>{escape_html(', '.join(project['tools']) or 'DevOps fundamentals')}</strong>
1131 </div>
1132 <div class="lab-panel">
1133 <span class="meta-label">Best fit</span>
1134 <strong>{project['skill_level']} - {project['time_estimate']}</strong>
1135 </div>
1136</div>
1137
1138## Architecture Diagram
1139
1140{architecture_diagram(project)}
1141
1142## Prerequisites
1143
1144{prerequisite_items(project)}
1145
1146## Credentials And Cost Warning
1147
1148{cost_warning(project)}
1149
1150## Step-By-Step Lab
1151
1152Use this flow before you run commands:

Callers 1

mainFunction · 0.85

Calls 15

original_readme_anchorFunction · 0.85
strip_first_h1Function · 0.85
demote_markdown_headingsFunction · 0.85
project_tagsFunction · 0.85
project_summaryFunction · 0.85
frontmatterFunction · 0.85
escape_htmlFunction · 0.85
architecture_diagramFunction · 0.85
prerequisite_itemsFunction · 0.85
cost_warningFunction · 0.85
troubleshootingFunction · 0.85

Tested by

no test coverage detected