Merge branch 'docks55-fallback'

This commit is contained in:
Yanick Champoux 2023-05-09 12:29:43 -04:00
commit 401427c3fb
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

@ -3,10 +3,12 @@ import adapter from "@sveltejs/adapter-static";
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: preprocess(),
kit: {
adapter: adapter({}),
},
preprocess: preprocess(),
kit: {
adapter: adapter({
fallback: "index.html",
}),
},
};
export default config;

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),
},
};