Closed xmusphlkg closed 8 months ago
If you are deploy to sub-routes, you need to set the SPA fallback manually: https://github.com/slidevjs/slidev/blob/907a593d4184413e607d447202f6879d5b12f51c/netlify.toml#L9-L18
@antfu we are deploying to github pages and we are seeing the same behavior. Any hint here?
@antfu we are deploying to github pages and we are seeing the same behavior. Any hint here?
Netlify is better than GitHub Pages, and is also free.
@antfu we are deploying to github pages and we are seeing the same behavior. Any hint here?
If you build you slides and deploy them to GitHub Pages, it should works as expected AFAIK. For example, https://kermanx.github.io/10-26-presentation/2
If you are using Nginx, add following code into your config:
location / {
try_files $uri $uri/ @fallback;
}
location @fallback {
if ($uri ~* ^/[^/]+$) {
rewrite ^ /index.html break;
}
if ($uri ~* ^/([^/]+)/.*$) {
set $subdir $1;
rewrite ^ /$subdir/index.html break;
}
}
Describe the bug
Thank you for your appreciation; it's indeed a delightful project.
However, I seem to have encountered a minor bug. The presentation appears as expected when showcased on a particular slide. Nevertheless, when attempting to share this specific slide through a link with others or upon refreshing the webpage, a 404 error surfaces. Initially, I presumed it might be a GitHub Pages issue, but to my surprise, the same error persists when employing Netlify for static deployment. Here is the URL in question: https://slides.kangguo.online/20240118_ggplot2_visualzation/44.
While I lack precise details regarding the configuration files for the examples provided on your site, it appears that the examples showcased on your website exhibit proper functionality: https://demo.sli.dev/composable-vue/7?clicks=2)
Desktop (please complete the following information):