mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Merge pull request #6 from archtika/devel
Serve routes without .html file extension
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
"/" = {
|
"/" = {
|
||||||
root = "/var/www/archtika-websites";
|
root = "/var/www/archtika-websites";
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
tryFiles = "$uri $uri/ $uri/index.html =404";
|
tryFiles = "$uri $uri/ $uri.html $uri/index.html index.html =404";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
autoindex on;
|
autoindex on;
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ in
|
|||||||
"/previews/" = {
|
"/previews/" = {
|
||||||
alias = "/var/www/archtika-websites/previews/";
|
alias = "/var/www/archtika-websites/previews/";
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
tryFiles = "$uri $uri/ $uri/index.html =404";
|
tryFiles = "$uri $uri/ $uri.html $uri/index.html index.html =404";
|
||||||
};
|
};
|
||||||
"/api/" = {
|
"/api/" = {
|
||||||
proxyPass = "http://localhost:${toString cfg.apiPort}/";
|
proxyPass = "http://localhost:${toString cfg.apiPort}/";
|
||||||
@@ -190,7 +190,7 @@ in
|
|||||||
"/" = {
|
"/" = {
|
||||||
alias = "/var/www/archtika-websites/$subdomain/";
|
alias = "/var/www/archtika-websites/$subdomain/";
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
tryFiles = "$uri $uri/ $uri/index.html =404";
|
tryFiles = "$uri $uri/ $uri.html $uri/index.html index.html =404";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<Head {title} {favicon} nestingLevel={1} {metaDescription} />
|
<Head {title} {favicon} nestingLevel={1} {metaDescription} />
|
||||||
|
|
||||||
<Nav {logoType} {logo} />
|
<Nav {logoType} {logo} isIndexPage={false} />
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<p>{article.publication_date}</p>
|
<p>{article.publication_date}</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
<a href="./articles/{articleFileName}.html">{article.title}</a>
|
<a href="./articles/{articleFileName}">{article.title}</a>
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
{#if article.meta_description}
|
{#if article.meta_description}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
title: string;
|
title: string;
|
||||||
favicon: string;
|
favicon: string;
|
||||||
nestingLevel?: number;
|
nestingLevel?: number;
|
||||||
metaDescription: string | null;
|
metaDescription?: string | null;
|
||||||
} = $props();
|
} = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
{#each categorizedArticles[key] as { title }}
|
{#each categorizedArticles[key] as { title }}
|
||||||
{@const articleFileName = title.toLowerCase().split(" ").join("-")}
|
{@const articleFileName = title.toLowerCase().split(" ").join("-")}
|
||||||
<li>
|
<li>
|
||||||
<a href="{isIndexPage ? './articles' : '.'}/{articleFileName}.html">{title}</a>
|
<a href="{isIndexPage ? './articles' : '.'}/{articleFileName}">{title}</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
<a href="../">
|
<a href={isIndexPage ? "." : ".."}>
|
||||||
{#if logoType === "text"}
|
{#if logoType === "text"}
|
||||||
<strong>{logo}</strong>
|
<strong>{logo}</strong>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ export const load: PageServerLoad = async ({ params, fetch, cookies, parent }) =
|
|||||||
: process.env.ORIGIN
|
: process.env.ORIGIN
|
||||||
? process.env.ORIGIN
|
? process.env.ORIGIN
|
||||||
: "http://localhost:18000"
|
: "http://localhost:18000"
|
||||||
}/previews/${websiteOverview.id}/index.html`;
|
}/previews/${websiteOverview.id}/`;
|
||||||
|
|
||||||
const websiteProdUrl = dev
|
const websiteProdUrl = dev
|
||||||
? `http://localhost:18000/${websiteOverview.id}/index.html`
|
? `http://localhost:18000/${websiteOverview.id}/`
|
||||||
: process.env.ORIGIN
|
: process.env.ORIGIN
|
||||||
? process.env.ORIGIN.replace("//", `//${websiteOverview.id}.`)
|
? process.env.ORIGIN.replace("//", `//${websiteOverview.id}.`)
|
||||||
: `http://localhost:18000/${websiteOverview.id}/index.html`;
|
: `http://localhost:18000/${websiteOverview.id}/`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
websiteOverview,
|
websiteOverview,
|
||||||
|
|||||||
Reference in New Issue
Block a user