-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.js
More file actions
282 lines (265 loc) · 10.9 KB
/
content.js
File metadata and controls
282 lines (265 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
// Content management for the Platform Engineering Toolkit
// Content sections data
const contentSections = {
introduction: {
id: 'introduction',
title: 'Introduction to Platform Engineering',
subtitle: 'Understanding the fundamentals',
content: [
'Platform engineering is the discipline of designing and building toolchains and workflows that enable self-service capabilities for software engineering organizations.',
'This emerging field focuses on creating internal developer platforms that reduce cognitive load, improve developer experience, and accelerate software delivery.',
'Key principles include treating the platform as a product, focusing on developer experience, and building for self-service capabilities.'
],
tags: ['Fundamentals', 'Getting Started', 'Overview'],
resources: [
{
title: 'Platform Engineering Maturity Model',
url: '#',
description: 'Assess your organization\'s platform engineering maturity'
},
{
title: 'Developer Experience Metrics',
url: '#',
description: 'Key metrics for measuring platform success'
}
]
},
architecture: {
id: 'architecture',
title: 'Platform Architecture',
subtitle: 'Design patterns and principles',
content: [
'Platform architecture defines the structure and organization of your internal developer platform.',
'Common patterns include API-first design, microservices architecture, and event-driven systems.',
'Key considerations include scalability, reliability, security, and developer experience.',
'Architecture decisions should align with organizational goals and technical constraints.'
],
tags: ['Architecture', 'Design Patterns', 'Technical'],
resources: [
{
title: 'Reference Architectures',
url: '#',
description: 'Common platform architecture patterns'
},
{
title: 'Technology Radar',
url: '#',
description: 'Current trends in platform technologies'
}
]
},
adoption: {
id: 'adoption',
title: 'Platform Adoption',
subtitle: 'Strategies for successful adoption',
content: [
'Platform adoption requires careful change management and stakeholder engagement.',
'Start with early adopters and gradually expand to the broader organization.',
'Focus on solving real developer pain points and demonstrating value.',
'Provide comprehensive documentation, training, and support.',
'Measure adoption metrics and iterate based on feedback.'
],
tags: ['Change Management', 'Strategy', 'Culture'],
resources: [
{
title: 'Adoption Playbook',
url: '#',
description: 'Step-by-step guide to platform adoption'
},
{
title: 'Success Stories',
url: '#',
description: 'Learn from successful platform implementations'
}
]
},
tools: {
id: 'tools',
title: 'Tools & Automation',
subtitle: 'Platform engineering toolchain',
content: [
'The platform engineering toolchain includes infrastructure as code, CI/CD, monitoring, and developer portals.',
'Popular tools include Kubernetes, Terraform, GitLab, Backstage, and various cloud services.',
'Tool selection should align with your architecture, team skills, and organizational requirements.',
'Focus on integration and automation to create seamless developer workflows.',
'Regularly evaluate and update your toolchain based on evolving needs and technology trends.'
],
tags: ['Tools', 'Automation', 'Technology'],
resources: [
{
title: 'Tool Comparison Matrix',
url: '#',
description: 'Compare popular platform engineering tools'
},
{
title: 'Integration Guides',
url: '#',
description: 'How to integrate different tools effectively'
}
]
},
security: {
id: 'security',
title: 'Security & Compliance',
subtitle: 'Secure platform practices',
content: [
'Security should be built into the platform from the ground up, not added as an afterthought.',
'Implement security controls at every layer: infrastructure, platform, and application.',
'Use policy as code, automated security scanning, and continuous compliance monitoring.',
'Provide secure defaults and self-service security capabilities for developers.',
'Regular security assessments and incident response procedures are essential.'
],
tags: ['Security', 'Compliance', 'Risk Management'],
resources: [
{
title: 'Security Checklist',
url: '#',
description: 'Essential security controls for platforms'
},
{
title: 'Compliance Frameworks',
url: '#',
description: 'Common compliance requirements and implementation'
}
]
},
configuration: {
id: 'configuration',
title: 'Platform Configuration',
subtitle: 'Configuration management and operations',
content: [
'Platform configuration management ensures consistency, reliability, and maintainability.',
'Use configuration as code principles with version control and automated deployment.',
'Implement environment-specific configurations while maintaining consistency.',
'Provide self-service configuration capabilities for development teams.',
'Monitor configuration drift and implement automated remediation where possible.'
],
tags: ['Configuration', 'Operations', 'Management'],
resources: [
{
title: 'Configuration Patterns',
url: '#',
description: 'Best practices for platform configuration'
},
{
title: 'Operational Runbooks',
url: '#',
description: 'Standard operational procedures'
}
]
}
};
// Function to get URL parameters
function getUrlParameter(name) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(name);
}
// Function to render content section
function renderContentSection(sectionId) {
const section = contentSections[sectionId];
if (!section) {
renderDefaultContent();
return;
}
const contentArea = document.getElementById('content-area');
const title = document.getElementById('content-title');
const description = document.getElementById('content-description');
// Update page title and description
title.textContent = section.title;
description.textContent = section.subtitle;
// Render tags
const tagsHtml = section.tags.map(tag =>
`<span class="badge">${tag}</span>`
).join(' ');
// Render content paragraphs
const contentHtml = section.content.map(paragraph =>
`<p>${paragraph}</p>`
).join('');
// Render resources if available
let resourcesHtml = '';
if (section.resources && section.resources.length > 0) {
resourcesHtml = `
<h2>Additional Resources</h2>
<ul>
${section.resources.map(resource => `
<li>
<strong><a href="${resource.url}">${resource.title}</a></strong><br>
<span class="text-muted">${resource.description}</span>
</li>
`).join('')}
</ul>
`;
}
contentArea.innerHTML = `
<div class="article-content">
<div class="article-meta">
${tagsHtml}
</div>
<div class="prose">
${contentHtml}
${resourcesHtml}
</div>
</div>
<div class="article-nav">
<p class="article-nav-text">Explore more platform engineering topics</p>
<div class="article-nav-buttons">
<a href="index.html" class="btn-outline">← Back to Home</a>
<a href="what-and-why.html" class="btn-outline">What And Why →</a>
</div>
</div>
`;
}
// Function to render default content
function renderDefaultContent() {
const contentArea = document.getElementById('content-area');
const title = document.getElementById('content-title');
const description = document.getElementById('content-description');
title.textContent = 'Platform Engineering Content';
description.textContent = 'Explore comprehensive platform engineering resources organized by topic and expertise level.';
contentArea.innerHTML = `
<div class="article-content">
<div class="prose">
<h2>Select a Topic</h2>
<p>Choose from one of the following topics to explore detailed platform engineering content:</p>
<div class="cards-grid">
${Object.values(contentSections).map(section => `
<a href="?section=${section.id}" class="card">
<div class="card-content">
<div class="card-text">
<h3 class="card-title">${section.title}</h3>
<p class="card-description">${section.subtitle}</p>
</div>
</div>
</a>
`).join('')}
</div>
</div>
</div>
`;
}
// Initialize content based on URL parameter
document.addEventListener('DOMContentLoaded', function() {
const sectionId = getUrlParameter('section');
if (sectionId && contentSections[sectionId]) {
renderContentSection(sectionId);
} else {
renderDefaultContent();
}
// Add back button functionality
const backButtons = document.querySelectorAll('.back-btn');
backButtons.forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
window.history.back();
});
});
});
// Handle browser back/forward navigation
window.addEventListener('popstate', function() {
const sectionId = getUrlParameter('section');
if (sectionId && contentSections[sectionId]) {
renderContentSection(sectionId);
} else {
renderDefaultContent();
}
});