Migrate to LFTP deployment and improve templates
- Add `deploy-lftp` command - Add 404 page - Change relative links to absolute links - Fix pagination links - Remove drafts from Pagefind indexing - Fix OpenGraph descriptions for i18n - Add Commissioners and Requesters components - Add consistent type-checking for getStaticPaths
This commit is contained in:
parent
837433364d
commit
a9d5a88d0e
26 changed files with 254 additions and 70 deletions
|
|
@ -129,7 +129,7 @@ const thumbnail =
|
|||
</div>
|
||||
<main
|
||||
class="mx-auto max-w-3xl rounded-lg bg-stone-50 px-2 pb-4 pt-1 shadow-sm dark:bg-stone-900 print:max-w-full print:bg-none print:shadow-none"
|
||||
data-pagefind-body
|
||||
data-pagefind-body={props.isDraft ? undefined : ""}
|
||||
data-pagefind-meta="type:game"
|
||||
>
|
||||
<h1 id="game-title" class="px-2 pt-2 font-serif text-3xl font-semibold text-stone-800 dark:text-stone-100">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import { slug } from "github-slugger";
|
|||
import { DEFAULT_LANG, t } from "../i18n";
|
||||
import BaseLayout from "./BaseLayout.astro";
|
||||
import Authors from "../components/Authors.astro";
|
||||
import Commissioners from "../components/Commissioners.astro";
|
||||
import Requesters from "../components/Requesters.astro";
|
||||
import UserComponent from "../components/UserComponent.astro";
|
||||
import CopyrightedCharacters from "../components/CopyrightedCharacters.astro";
|
||||
import Prose from "../components/Prose.astro";
|
||||
|
|
@ -69,7 +71,10 @@ const thumbnail =
|
|||
<BaseLayout pageTitle={props.title}>
|
||||
<Fragment slot="head">
|
||||
<meta property="og:title" content={props.title} data-pagefind-meta="title[content]" />
|
||||
<meta property="og:description" content={`Word count: ${props.wordCount}. ${props.contentWarning}`} />
|
||||
<meta
|
||||
property="og:description"
|
||||
content={t(props.lang, "story/warnings", props.wordCount, props.contentWarning.trim())}
|
||||
/>
|
||||
<meta property="og:url" content={Astro.url} data-pagefind-meta="url[content]" />
|
||||
{
|
||||
thumbnail ? (
|
||||
|
|
@ -141,7 +146,7 @@ const thumbnail =
|
|||
</div>
|
||||
<main
|
||||
class="mx-auto max-w-3xl rounded-lg bg-stone-50 px-2 pb-4 pt-1 shadow-sm dark:bg-stone-900 print:max-w-full print:bg-none print:shadow-none"
|
||||
data-pagefind-body
|
||||
data-pagefind-body={props.isDraft ? undefined : ""}
|
||||
data-pagefind-meta="type:story"
|
||||
>
|
||||
{
|
||||
|
|
@ -198,16 +203,16 @@ const thumbnail =
|
|||
}
|
||||
{
|
||||
commissioner && (
|
||||
<p id="commissioner">
|
||||
Commissioned by <UserComponent user={commissioner} lang={props.lang} />
|
||||
</p>
|
||||
<Commissioners lang={props.lang}>
|
||||
<UserComponent user={commissioner} lang={props.lang} />
|
||||
</Commissioners>
|
||||
)
|
||||
}
|
||||
{
|
||||
requester && (
|
||||
<p id="requester">
|
||||
Requested by <UserComponent user={requester} lang={props.lang} />
|
||||
</p>
|
||||
<Requesters lang={props.lang}>
|
||||
<UserComponent user={requester} lang={props.lang} />
|
||||
</Requesters>
|
||||
)
|
||||
}
|
||||
<div id="content-warning">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue