build w/ trailingSlash

This commit is contained in:
Yanick Champoux 2023-05-09 12:29:37 -04:00
parent 6b999a5a82
commit 3d0c3c54ef
5 changed files with 30 additions and 6 deletions

20
contrib/nginx.conf Normal file
View File

@ -0,0 +1,20 @@
server {
listen 443 ssl;
listen 8080;
server_name docks.babyl.ca;
ssl_certificate /etc/lego/certificates/_.babyl.ca.crt;
ssl_certificate_key /etc/lego/certificates/_.babyl.ca.key;
root /home/docks;
index index.html;
error_log /var/log/nginx/docks-error.log error;
access_log /var/log/nginx/docks-access.log combined;
location / {
try_files $uri $uri/ /index.html =404;
}
}
yan

View File

@ -26,13 +26,13 @@
<p>
Written by
<!-- TODO change link -->
<a href="https://techblog.babyl.ca">Yanick Champoux</a>
. Code available on
<!-- TODO read the url from package.json -->
<a href={import.meta.env.HOMEPAGE}>my Gitea instance</a>.
</p>
<p>Found a bug? You can report it <a href={import.meta.env.BUGS}>here</a>.</p>
<style>
h2 {
margin-bottom: 1.5rem;

View File

@ -1 +1,2 @@
export const prerender = true;
export const trailingSlash = "always";

View File

@ -5,7 +5,9 @@ import adapter from "@sveltejs/adapter-static";
const config = {
preprocess: preprocess(),
kit: {
adapter: adapter({}),
adapter: adapter({
fallback: "index.html",
}),
},
};

View File

@ -11,6 +11,7 @@ const config = {
define: {
"import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
"import.meta.env.HOMEPAGE": JSON.stringify(packageJson.homepage),
"import.meta.env.BUGS": JSON.stringify(packageJson.bugs.url),
},
};