site: publish the platform guides at /platforms/ and link them from an About page

(cherry picked from commit 408d6cdfd76d13945db1d9727b58feca23d1e48b)
This commit is contained in:
Paperclip Builder
2026-10-26 22:50:09 +11:00
committed by Sam Rolfe
parent d793ab0871
commit 59580b6e45
4 changed files with 226 additions and 0 deletions

View File

@@ -100,6 +100,13 @@ func (s *Site) Build() error {
if err := writePage("/404.html", templates.NotFoundPage(s.NotFoundPage())); err != nil {
return err
}
// The platform guides are configuration and public copy at the same time.
// Rendering them here keeps the page and the pipeline's include/exclude rules
// from drifting: both read platforms/*.yml.
if _, err := RenderPlatforms(s.Config.Root, s.Config.OutDir); err != nil {
return fmt.Errorf("platform guides: %w", err)
}
pages++
for _, f := range s.Fragments {
if err := writeFile(filepath.Join(s.Config.OutDir, filepath.FromSlash(f.File)), []byte(f.HTML)); err != nil {