diff --git a/build.zig b/build.zig index 472adedba..03be2ea41 100644 --- a/build.zig +++ b/build.zig @@ -1172,9 +1172,9 @@ fn buildDocumentation( inline for (manpages) |manpage| { const generate_markdown = b.addExecutable(.{ - .name = "generate_" ++ manpage.name ++ "_" ++ manpage.section ++ "_markdown", + .name = "mdgen_" ++ manpage.name ++ "_" ++ manpage.section, .root_source_file = .{ - .path = "src/generate_" ++ manpage.name ++ "_" ++ manpage.section ++ "_markdown.zig", + .path = "src/mdgen_" ++ manpage.name ++ "_" ++ manpage.section ++ ".zig", }, .target = b.host, }); diff --git a/src/doc/ghostty_1_footer.md b/src/build/mdgen/ghostty_1_footer.md similarity index 100% rename from src/doc/ghostty_1_footer.md rename to src/build/mdgen/ghostty_1_footer.md diff --git a/src/doc/ghostty_1_header.md b/src/build/mdgen/ghostty_1_header.md similarity index 100% rename from src/doc/ghostty_1_header.md rename to src/build/mdgen/ghostty_1_header.md diff --git a/src/doc/ghostty_5_footer.md b/src/build/mdgen/ghostty_5_footer.md similarity index 100% rename from src/doc/ghostty_5_footer.md rename to src/build/mdgen/ghostty_5_footer.md diff --git a/src/doc/ghostty_5_header.md b/src/build/mdgen/ghostty_5_header.md similarity index 100% rename from src/doc/ghostty_5_header.md rename to src/build/mdgen/ghostty_5_header.md diff --git a/src/generate_markdown.zig b/src/build/mdgen/mdgen.zig similarity index 96% rename from src/generate_markdown.zig rename to src/build/mdgen/mdgen.zig index 7ae40d566..174f0840d 100644 --- a/src/generate_markdown.zig +++ b/src/build/mdgen/mdgen.zig @@ -1,6 +1,6 @@ const std = @import("std"); -const Config = @import("config/Config.zig"); -const Action = @import("cli/action.zig").Action; +const Config = @import("../../config/Config.zig"); +const Action = @import("../../cli/action.zig").Action; const help_strings = @import("help_strings"); const build_options = @import("build_options"); diff --git a/src/generate_ghostty_1_markdown.zig b/src/mdgen_ghostty_1.zig similarity index 55% rename from src/generate_ghostty_1_markdown.zig rename to src/mdgen_ghostty_1.zig index bac2b8470..889308dc5 100644 --- a/src/generate_ghostty_1_markdown.zig +++ b/src/mdgen_ghostty_1.zig @@ -1,16 +1,13 @@ const std = @import("std"); -const gen = @import("generate_markdown.zig"); +const gen = @import("build/mdgen/mdgen.zig"); pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; const alloc = gpa.allocator(); const writer = std.io.getStdOut().writer(); - - try gen.substitute(alloc, @embedFile("doc/ghostty_1_header.md"), writer); - + try gen.substitute(alloc, @embedFile("build/mdgen/ghostty_1_header.md"), writer); try gen.generate_actions(writer); try gen.generate_config(writer, true); - - try gen.substitute(alloc, @embedFile("doc/ghostty_1_footer.md"), writer); + try gen.substitute(alloc, @embedFile("build/mdgen/ghostty_1_footer.md"), writer); } diff --git a/src/generate_ghostty_5_markdown.zig b/src/mdgen_ghostty_5.zig similarity index 51% rename from src/generate_ghostty_5_markdown.zig rename to src/mdgen_ghostty_5.zig index 31348daac..6d2117443 100644 --- a/src/generate_ghostty_5_markdown.zig +++ b/src/mdgen_ghostty_5.zig @@ -1,15 +1,12 @@ const std = @import("std"); -const gen = @import("generate_markdown.zig"); +const gen = @import("build/mdgen/mdgen.zig"); pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; const alloc = gpa.allocator(); const output = std.io.getStdOut().writer(); - - try gen.substitute(alloc, @embedFile("doc/ghostty_5_header.md"), output); - + try gen.substitute(alloc, @embedFile("build/mdgen/ghostty_5_header.md"), output); try gen.generate_config(output, false); - - try gen.substitute(alloc, @embedFile("doc/ghostty_5_footer.md"), output); + try gen.substitute(alloc, @embedFile("build/mdgen/ghostty_5_footer.md"), output); }