Skip to content

Commit 5449827

Browse files
committed
Add docs README
1 parent 93d5abc commit 5449827

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,36 @@ private static void writeIndexes(GenerationContext context, String projectName)
447447
writeIndexFile(context, "docs/models/index.rst", "Models");
448448
}
449449

450+
451+
/**
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.
455+
*
456+
* @param context The generation context containing the writer delegator.
457+
*/
458+
private static void writeDocsReadme(
459+
GenerationContext context
460+
) {
461+
context.writerDelegator().useFileWriter("docs/README.", "", writer -> {
462+
writer.write("""
463+
# Documentation
464+
465+
## Generating Documentation
466+
467+
Sphinx is used for documentation. You can generate HTML locally with the
468+
following:
469+
470+
```
471+
$ uv pip install ".[docs]"
472+
$ cd docs
473+
$ make html
474+
```
475+
476+
""");
477+
});
478+
}
479+
450480
/**
451481
* Helper method to write an index file with the given title.
452482
* This method creates an index file at the specified file path with the provided title.

0 commit comments

Comments
 (0)