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

Should generate multi-site error pages #73

Open
tao opened this issue Sep 20, 2021 · 2 comments
Open

Should generate multi-site error pages #73

tao opened this issue Sep 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@tao
Copy link
Contributor

tao commented Sep 20, 2021

On my Statamic site I have error pages that are localised automatically depending on the language:

/404.html (English)
/fr/404.html (French)

When SSG runs it generates the 404.html pages but not error pages for each multi-site. Now, depending on the host for the static website it might be a bit difficult to route errors to /fr/404.html unless you do some custom handling.. but it is possible with Lambda for example if you have that set up.

So it would be nice for SSG to generate them anyway for us, or the docs should mention that as an edge-case so we can add our own urls to generate them in AppServiceProvider.php if we are building a more complex multi-site.

@tao tao changed the title Should generate multi-site error pages if the exist Should generate multi-site error pages Sep 20, 2021
@jasonvarga
Copy link
Member

It should do this. Just didn't think about multisite situation when building the feature 👍

@tao
Copy link
Contributor Author

tao commented Sep 20, 2021

Yeah. I use the same error template across the entire site, and use {{ trans }} tag to show the error warning depending on the current language, it's quite simple:

<div class="content text-center">
    <h1>404</h1>
    <p>{{ trans key="lang.error_404" site="{locale}" }}</p>
</div>

However, it's a nice little extra that improves the experience if someone from a foreign language finds a bad link, and would be a nice touch to add to SSG when you get a chance. However, not the end of the world to add the links ourselves.

@duncanmcclean duncanmcclean added the bug Something isn't working label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants