From 2d500c811644da3b115a7d0a7280d9a3122b164d Mon Sep 17 00:00:00 2001 From: glopesdev Date: Fri, 10 Nov 2023 00:30:39 +0000 Subject: [PATCH] Include device README file in top level docs --- docfx.json | 3 ++- src/harp.schemaprocessor/Program.cs | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docfx.json b/docfx.json index b38377da..71c96ecb 100644 --- a/docfx.json +++ b/docfx.json @@ -44,7 +44,8 @@ "files": [ "logo.svg", "favicon.ico", - "editor/index.html", + "src/device.*/Assets/*.png", + "src/device.*/Assets/*.jpg", "images/**", "workflows/**" ] diff --git a/src/harp.schemaprocessor/Program.cs b/src/harp.schemaprocessor/Program.cs index f97c8098..839afa74 100644 --- a/src/harp.schemaprocessor/Program.cs +++ b/src/harp.schemaprocessor/Program.cs @@ -11,7 +11,7 @@ var builder = new StringBuilder(); builder.AppendLine($@"--- -uid: Harp.{deviceModel.device} +uid: Harp.{deviceModel.device}.Device --- @@ -81,11 +81,13 @@ var output = builder.ToString(); if (args.Length > 1) { - File.WriteAllText(Path.Combine(args[1], $"Harp_{deviceModel.device}.md"), output); - File.WriteAllText(Path.Combine(args[1], $"Harp_{deviceModel.device}_Device.md"), $@"--- -uid: Harp.{deviceModel.device}.Device + File.WriteAllText(Path.Combine(args[1], $"Harp_{deviceModel.device}_Device.md"), output); + File.WriteAllText(Path.Combine(args[1], $"Harp_{deviceModel.device}.md"), $@"--- +uid: Harp.{deviceModel.device} --- -[!include[Device](./Harp_{deviceModel.device}.md)]"); +[!include[README](~/src/device.{deviceModel.device.ToLowerInvariant()}/README.md)] + +[!include[RegisterTables](./Harp_{deviceModel.device}_Device.md)]"); } else Console.WriteLine(output);