Skip to content

Commit 5e3b480

Browse files
Use html by default for sphinx
dirhtml is nice when you have a host doing automatic redrirects from `/` to `/index.html` but it's less nice otherwise. This changes the default back to regular html output. When integration config is added to Smithy, this will be one of the configuration options.
1 parent 386fa97 commit 5e3b480

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

smithy-docgen-core/src/main/java/software/amazon/smithy/docgen/core/integrations/SphinxIntegration.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private void runSphinx(DocGenerationContext context) {
236236
runCommand("./venv/bin/pip install -r requirements.txt", baseDir);
237237

238238
// Finally, run sphinx itself.
239-
runCommand("./venv/bin/sphinx-build -M dirhtml content build", baseDir);
239+
runCommand("./venv/bin/sphinx-build -M html content build", baseDir);
240240

241241
System.out.printf(normalizeNewlines("""
242242
Successfully built HTML docs. They can be found in "%1$s".
@@ -247,19 +247,19 @@ private void runSphinx(DocGenerationContext context) {
247247
environment docs for information on how to activate it: \
248248
https://docs.python.org/3/library/venv.html#how-venvs-work
249249
250-
Once the environment is activated, run `make dirhtml` from "%3$s" to \
251-
to build the docs, substituting dirhtml for whatever format you wish \
250+
Once the environment is activated, run `make html` from "%3$s" to \
251+
to build the docs, substituting html for whatever format you wish \
252252
to build.
253253
254254
To build the docs without activating the virtual environment, simply \
255-
run `./venv/bin/sphinx-build -M dirhtml content build` from "%3$s", \
256-
similarly substituting dirhtml for your desired format.
255+
run `./venv/bin/sphinx-build -M html content build` from "%3$s", \
256+
similarly substituting html for your desired format.
257257
258258
See sphinx docs for other output formats you can choose: \
259259
https://www.sphinx-doc.org/en/master/usage/builders/index.html
260260
261261
"""),
262-
baseDir.resolve("build/dirhtml"),
262+
baseDir.resolve("build/html"),
263263
baseDir.resolve("venv"),
264264
baseDir
265265
);
@@ -279,7 +279,7 @@ private void logManualBuildInstructions(DocGenerationContext context) {
279279
instead install them from your system package manager, or another \
280280
source.
281281
282-
Once the dependencies are installed, run `make dirhtml` from \
282+
Once the dependencies are installed, run `make html` from \
283283
"%1$s". Other output formats can also be built. See sphinx docs for \
284284
other output formats: \
285285
https://www.sphinx-doc.org/en/master/usage/builders/index.html

0 commit comments

Comments
 (0)