Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to change .html extension for FallbackServer #1032

Closed
jimmymcpeter opened this issue Apr 26, 2024 · 0 comments · Fixed by #1033
Closed

Add ability to change .html extension for FallbackServer #1032

jimmymcpeter opened this issue Apr 26, 2024 · 0 comments · Fixed by #1033

Comments

@jimmymcpeter
Copy link

Is your feature request related to a problem? Please describe.
I am working with a site that uses .htm instead of .html for its file extension. The FallbackServer class only looks for .html files according to the following line --

const htmlFiles = files.filter(file => file.endsWith('.html')).map(file => ({file, depth: 0}));

Describe the solution you'd like
It'd be nice to be able to change the .html extension to .htm using a config parameter. Maybe even send an array of extensions.

Describe alternatives you've considered
Renaming all files to .html unfortunately breaks existing hyperlinks. Currently I have a script that overrides the FallbackServer class code from const htmlFiles = files.filter(file => file.endsWith('.html')).map(file => ({file, depth: 0})); to const htmlFiles = files.filter(file => file.endsWith('.htm')).map(file => ({file, depth: 0}));

Additional context
Documentation sites built using MadCap Flare almost always use the .htm extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant