Skip to content

Commit edec67b

Browse files
committed
Add README on how to generate docs (smithy-lang#471)
Co-authored-by: Nate Prewitt <[email protected]> # Conflicts: # codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java
1 parent 4190395 commit edec67b

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ private static void writeDocsSkeleton(
288288
.orElse(context.settings().service().getName()));
289289
writeConf(settings, context, projectName);
290290
writeIndexes(context, projectName);
291+
writeDocsReadme(context);
291292
writeMakeBat(context);
292293
writeMakeFile(context);
293294
}
@@ -449,31 +450,26 @@ private static void writeIndexes(GenerationContext context, String projectName)
449450

450451

451452
/**
452-
* Write a Makefile.
453-
* A Makefile is used on Unix-based systems to build Sphinx documentation.
454-
* This file contains rules for cleaning the build directory and generating HTML documentation.
453+
* Write the readme in the docs folder describing instructions for generation
455454
*
456455
* @param context The generation context containing the writer delegator.
457456
*/
458457
private static void writeDocsReadme(
459458
GenerationContext context
460459
) {
461-
context.writerDelegator().useFileWriter("docs/README.", "", writer -> {
462-
writer.write("""
463-
# Documentation
464-
460+
context.writerDelegator().useFileWriter("docs/README.md", writer -> {
461+
writer.write("""
465462
## Generating Documentation
466463
467464
Sphinx is used for documentation. You can generate HTML locally with the
468465
following:
469466
470467
```
471-
$ uv pip install ".[docs]"
472-
$ cd docs
473-
$ make html
468+
$$ uv pip install ".[docs]"
469+
$$ cd docs
470+
$$ make html
474471
```
475-
476-
""");
472+
""");
477473
});
478474
}
479475

0 commit comments

Comments
 (0)