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

Support exporting error pages #94

Closed
arctic-hen7 opened this issue Dec 15, 2021 · 1 comment
Closed

Support exporting error pages #94

arctic-hen7 opened this issue Dec 15, 2021 · 1 comment
Assignees
Labels
A-cli Area: command line interface C-enhancement Category: enhancement D-easy Difficulty: easy P-high Priority: high S-in-development Status: in development

Comments

@arctic-hen7
Copy link
Member

Is your feature request related to a problem? Please describe.
Error pages are nearly always displayed on initial loads, which, for most statically exported sites, use the provider's default error pages (as with GitHub Pages). Most providers do however allow the specification of custom error pages (mainly for 404 errors), but this usually requires an HTML file, and Perseus currently doesn't export error pages to static HTML.

Describe the solution you'd like
Perseus should have a perseus export-error-page <HTTP_STATUS_CODE> command that allows users to export an error page to static HTML. The output file should be named <HTTP_STATUS_CODE>.html, and it's output would be determined by a mandatory --output flag.

Describe alternatives you've considered
We could also automatically export user-marked error pages in exported deployment, but they'd need to be put somewhere and then moved by the user according to their provider, which isn't quite as clean as the above solution, for me at least.

Additional context
I am very unsure about the name of the subcommand, because export-error-page is a bit verbose.

@arctic-hen7 arctic-hen7 added C-enhancement Category: enhancement A-cli Area: command line interface D-easy Difficulty: easy P-high Priority: high S-in-development Status: in development labels Dec 15, 2021
@arctic-hen7 arctic-hen7 self-assigned this Dec 15, 2021
@arctic-hen7
Copy link
Member Author

This is done, and will be released in v0.3.2. I have gone with perseus export-error-page for now, despite the verbosity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface C-enhancement Category: enhancement D-easy Difficulty: easy P-high Priority: high S-in-development Status: in development
Projects
None yet
Development

No branches or pull requests

1 participant