Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Able to export page to file instead of directory that can support github page 404 #1043

Closed
nghenglim opened this issue Jan 3, 2020 · 3 comments
Labels

Comments

@nghenglim
Copy link

nghenglim commented Jan 3, 2020

Is your feature request related to a problem? Please describe.
Currently I rewrite my blog with sapper, and host it with github page. however there is a problem that github page require 404.html and not 404/index.html

Describe the solution you'd like
when run sapper export, provide a way to export svelte page in file whenever possible

Describe alternatives you've considered
currently I manually copy paste 404/index.html to 404.html, however I believe due to this reason, some feature like routing will be broken (therefore I make a redirection on this page >.<).

How important is this feature to you?
Mainly I need this feature to perform redirection based on the blogpost slug, example , currently due to the custom way I do it, seems like it is buggy intermittently

Additional context
seems like code inside the <script></script> tag in 404.svelte is not working too in route that redirected to github 404.html , I need to add custom script below template.html to simulate a script behavior in 404.svelte, which is not ideal

@nghenglim nghenglim changed the title Able to export page to file instead of directory to support github page 404 Able to export page to file instead of directory that can support github page 404 Jan 3, 2020
@chuvikovd
Copy link

Maybe it is possible to add extra step to export crawling process, where script opens /404 page and saves it to export folder root? This way we can ensure that _error.svelte default is used when 404.svelte not exist.

@swyxio
Copy link

swyxio commented Jan 14, 2020

i think this can be automated with a bash script, unless the sapper maintainers want to explicitly support a github build target.

@Conduitry
Copy link
Member

Fixed in 0.27.13 via #1049.

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

No branches or pull requests

4 participants