Skip to content

Commit

Permalink
Include device README file in top level docs
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Nov 10, 2023
1 parent f46d26f commit 2d500c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"files": [
"logo.svg",
"favicon.ico",
"editor/index.html",
"src/device.*/Assets/*.png",
"src/device.*/Assets/*.jpg",
"images/**",
"workflows/**"
]
Expand Down
12 changes: 7 additions & 5 deletions src/harp.schemaprocessor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

var builder = new StringBuilder();
builder.AppendLine($@"---
uid: Harp.{deviceModel.device}
uid: Harp.{deviceModel.device}.Device
---

<table>
Expand Down Expand Up @@ -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);

0 comments on commit 2d500c8

Please sign in to comment.