Support exporting error pages #94
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
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.The text was updated successfully, but these errors were encountered: