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
|
|
@ -1,8 +1,8 @@
|
|||
import { type APIRoute, type GetStaticPaths } from "astro";
|
||||
import type { APIRoute, GetStaticPaths } from "astro";
|
||||
import { getCollection, getEntry, type CollectionEntry, getEntries } from "astro:content";
|
||||
import { marked, type RendererApi } from "marked";
|
||||
import { decode as tinyDecode } from "tiny-decode";
|
||||
import { type Lang, type Website } from "../../../content/config";
|
||||
import type { Lang, Website } from "../../../content/config";
|
||||
import { t } from "../../../i18n";
|
||||
|
||||
type ExportFormat = "bbcode" | "markdown";
|
||||
|
|
@ -252,9 +252,9 @@ export const GET: APIRoute<Props, Params> = async ({ props: { story }, site }) =
|
|||
)
|
||||
.join("\n\n")
|
||||
.replaceAll(
|
||||
/\[([^\]]+)\]\((\.[^\)]+)\)/g,
|
||||
/\[([^\]]+)\]\((\/[^\)]+)\)/g,
|
||||
(_, group1, group2) =>
|
||||
`[${group1}](${new URL(group2, new URL(`/stories/${story.slug}`, site)).toString()})`,
|
||||
`[${group1}](${new URL(group2, site).toString()})`,
|
||||
);
|
||||
if (exportFormat === "bbcode") {
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue