Custom build output without .html extension in URLs #928
-
Hello everyone! I'm looking to use the jupyter-book to replace an old website, while preserving the old URL structure. Is there a way to customize the html builder so it outputs HTML files without the I'll configure to server to send the content with header I know it's a rather specific question, but wanted to ask in case anyone has experience with this. Is there maybe some sphinx setting for this? And advice or pointers would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I believe you are after: https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.dirhtml.DirectoryHTMLBuilder |
Beta Was this translation helpful? Give feedback.
-
@chrisjsewell Thx for the pointer! While trying to figure out how to configure a custom builder class, I found the setting I also learned via this thread that github pages automatically supports the "extensionless paths" even without any change in configuration or custom build. For example, accessing mysite.com/README renders the contents of mysite/README.html. Woo hoo! I will soon get to refresh my legacy wiki pages (backed by dokuwiki and thousands of manual hacks) with a civilized jupyter-book static build! |
Beta Was this translation helpful? Give feedback.
@chrisjsewell Thx for the pointer!
While trying to figure out how to configure a custom builder class, I found the setting
html_file_suffix
on the default builder class, which does the thing: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_file_suffix (when we set it to empty string).I also learned via this thread that github pages automatically supports the "extensionless paths" even without any change in configuration or custom build. For example, accessing mysite.com/README renders the contents of mysite/README.html.
Woo hoo! I will soon get to refresh my legacy wiki pages (backed by dokuwiki and thousands of manual hacks) with a civilized jupyter-book stati…