Use path aliasing and improve accesibility
This commit is contained in:
parent
b464c5e795
commit
dadbd32e1b
40 changed files with 138 additions and 115 deletions
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
---
|
||||
|
||||
<GalleryLayout pageTitle="404">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import type { APIRoute, GetStaticPaths } from "astro";
|
||||
import { getCollection, type CollectionEntry, getEntries } from "astro:content";
|
||||
import type { PostWebsite } from "../../../content/config";
|
||||
import { t } from "../../../i18n";
|
||||
import { formatCopyrightedCharacters } from "../../../utils/format_copyrighted_characters";
|
||||
import { markdownToBbcode } from "../../../utils/markdown_to_bbcode";
|
||||
import { getUsernameForLang } from "../../../utils/get_username_for_lang";
|
||||
import { isAnonymousUser } from "../../../utils/is_anonymous_user";
|
||||
import { qualifyLocalURLsInMarkdown } from "../../../utils/qualify_local_urls_in_markdown";
|
||||
import { getWebsiteLinkForUser } from "../../../utils/get_website_link_for_user";
|
||||
import { toPlainMarkdown } from "../../../utils/to_plain_markdown";
|
||||
import type { PostWebsite } from "@content/config";
|
||||
import { t } from "@i18n";
|
||||
import { formatCopyrightedCharacters } from "@utils/format_copyrighted_characters";
|
||||
import { markdownToBbcode } from "@utils/markdown_to_bbcode";
|
||||
import { getUsernameForLang } from "@utils/get_username_for_lang";
|
||||
import { isAnonymousUser } from "@utils/is_anonymous_user";
|
||||
import { qualifyLocalURLsInMarkdown } from "@utils/qualify_local_urls_in_markdown";
|
||||
import { getWebsiteLinkForUser } from "@utils/get_website_link_for_user";
|
||||
import { toPlainMarkdown } from "@utils/to_plain_markdown";
|
||||
|
||||
interface ExportWebsiteInfo {
|
||||
website: PostWebsite;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
import { Image } from "astro:assets";
|
||||
import { getCollection, getEntries, type CollectionEntry } from "astro:content";
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import UserComponent from "../components/UserComponent.astro";
|
||||
import { markdownToPlaintext } from "../utils/markdown_to_plaintext";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import UserComponent from "@components/UserComponent.astro";
|
||||
import { markdownToPlaintext } from "@utils/markdown_to_plaintext";
|
||||
|
||||
type PostWithPubDate = CollectionEntry<"blog"> & { data: { pubDate: Date } };
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import type { GetStaticPaths } from "astro";
|
||||
import { type CollectionEntry, getCollection } from "astro:content";
|
||||
import { PUBLISH_DRAFTS } from "astro:env/server";
|
||||
import BlogPostLayout from "../../layouts/BlogPostLayout.astro";
|
||||
import BlogPostLayout from "@layouts/BlogPostLayout.astro";
|
||||
|
||||
type Props = CollectionEntry<"blog">;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import type { APIRoute } from "astro";
|
|||
import { getCollection, getEntries, type CollectionEntry, type CollectionKey } from "astro:content";
|
||||
import { markdown } from "@astropub/md";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import { t, type Lang } from "../i18n";
|
||||
import { markdownToPlaintext } from "../utils/markdown_to_plaintext";
|
||||
import { getUsernameForLang } from "../utils/get_username_for_lang";
|
||||
import { qualifyLocalURLsInMarkdown } from "../utils/qualify_local_urls_in_markdown";
|
||||
import { t, type Lang } from "@i18n";
|
||||
import { markdownToPlaintext } from "@utils/markdown_to_plaintext";
|
||||
import { getUsernameForLang } from "@utils/get_username_for_lang";
|
||||
import { qualifyLocalURLsInMarkdown } from "@utils/qualify_local_urls_in_markdown";
|
||||
|
||||
type FeedItem = RSSFeedItem &
|
||||
Required<Pick<RSSFeedItem, "title" | "pubDate" | "link" | "description" | "categories" | "content">>;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
import { Image } from "astro:assets";
|
||||
import { getCollection, getEntries, type CollectionEntry } from "astro:content";
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import { t } from "../i18n";
|
||||
import UserComponent from "../components/UserComponent.astro";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import { t } from "@i18n";
|
||||
import UserComponent from "@components/UserComponent.astro";
|
||||
|
||||
type GameWithPubDate = CollectionEntry<"games"> & { data: { pubDate: Date } };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { type CollectionEntry, getCollection } from "astro:content";
|
||||
import GameLayout from "../../layouts/GameLayout.astro";
|
||||
import GameLayout from "@layouts/GameLayout.astro";
|
||||
import { PUBLISH_DRAFTS } from "astro:env/server";
|
||||
|
||||
type Props = CollectionEntry<"games">;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
import type { ImageMetadata } from "astro";
|
||||
import { type CollectionEntry, type CollectionKey, getCollection, getEntries } from "astro:content";
|
||||
import { Image } from "astro:assets";
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import { t, type Lang } from "../i18n";
|
||||
import UserComponent from "../components/UserComponent.astro";
|
||||
import { markdownToPlaintext } from "../utils/markdown_to_plaintext";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import { t, type Lang } from "@i18n";
|
||||
import UserComponent from "@components/UserComponent.astro";
|
||||
import { markdownToPlaintext } from "@utils/markdown_to_plaintext";
|
||||
|
||||
const MAX_ITEMS = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
import SearchComponent from "astro-pagefind/components/Search";
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
---
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import type { GetStaticPaths } from "astro";
|
||||
import { type CollectionEntry, getCollection } from "astro:content";
|
||||
import getReadingTime from "reading-time";
|
||||
import StoryLayout from "../../layouts/StoryLayout.astro";
|
||||
import StoryLayout from "@layouts/StoryLayout.astro";
|
||||
import { PUBLISH_DRAFTS } from "astro:env/server";
|
||||
|
||||
type Props = CollectionEntry<"stories">;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
import type { GetStaticPaths, Page } from "astro";
|
||||
import { Image } from "astro:assets";
|
||||
import { getCollection, getEntries, type CollectionEntry } from "astro:content";
|
||||
import GalleryLayout from "../../layouts/GalleryLayout.astro";
|
||||
import { t } from "../../i18n";
|
||||
import UserComponent from "../../components/UserComponent.astro";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import { t } from "@i18n";
|
||||
import UserComponent from "@components/UserComponent.astro";
|
||||
|
||||
type StoryWithPubDate = CollectionEntry<"stories"> & { data: { pubDate: Date } };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
import { getCollection, getEntry, type CollectionEntry } from "astro:content";
|
||||
import { Image } from "astro:assets";
|
||||
import GalleryLayout from "../../layouts/GalleryLayout.astro";
|
||||
import mapImage from "../../assets/images/tlotm_map.jpg";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import mapImage from "@assets/images/tlotm_map.jpg";
|
||||
|
||||
type StoryWithPubDate = CollectionEntry<"stories"> & { data: { pubDate: Date } };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import { slug } from "github-slugger";
|
||||
import GalleryLayout from "../layouts/GalleryLayout.astro";
|
||||
import { markdownToPlaintext } from "../utils/markdown_to_plaintext";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import { markdownToPlaintext } from "@utils/markdown_to_plaintext";
|
||||
|
||||
interface Tag {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { slug } from "github-slugger";
|
||||
import GalleryLayout from "../../layouts/GalleryLayout.astro";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
|
||||
type Props = {
|
||||
badTag: string;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import { Image } from "astro:assets";
|
|||
import { type CollectionEntry, type CollectionKey, getCollection, getEntries } from "astro:content";
|
||||
import { Markdown } from "@astropub/md";
|
||||
import { slug } from "github-slugger";
|
||||
import GalleryLayout from "../../layouts/GalleryLayout.astro";
|
||||
import Prose from "../../components/Prose.astro";
|
||||
import { t, DEFAULT_LANG } from "../../i18n";
|
||||
import { qualifyLocalURLsInMarkdown } from "../../utils/qualify_local_urls_in_markdown";
|
||||
import UserComponent from "../../components/UserComponent.astro";
|
||||
import { markdownToPlaintext } from "../../utils/markdown_to_plaintext";
|
||||
import GalleryLayout from "@layouts/GalleryLayout.astro";
|
||||
import { t, DEFAULT_LANG } from "@i18n";
|
||||
import { qualifyLocalURLsInMarkdown } from "@utils/qualify_local_urls_in_markdown";
|
||||
import { markdownToPlaintext } from "@utils/markdown_to_plaintext";
|
||||
import Prose from "@components/Prose.astro";
|
||||
import UserComponent from "@components/UserComponent.astro";
|
||||
|
||||
type EntryWithPubDate<C extends CollectionKey> = CollectionEntry<C> & { data: { pubDate: Date } };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue