fix: make base in astro config work

This commit is contained in:
saicaca
2024-04-29 15:56:28 +08:00
parent 9a3119cab4
commit 410902a767
11 changed files with 37 additions and 26 deletions

View File

@@ -2,11 +2,12 @@
import ImageWrapper from "../misc/ImageWrapper.astro";
import {Icon} from "astro-icon/components";
import {profileConfig} from "../../config";
import {url} from "../../utils/url-utils";
const config = profileConfig;
---
<div class="card-base">
<a aria-label="Go to About Page" href="/about"
<a aria-label="Go to About Page" href={url('/about/')}
class="group block relative mx-auto mt-4 lg:mx-3 lg:mt-3 mb-3
max-w-[240px] lg:max-w-none overflow-hidden rounded-xl active:scale-95">
<div class="absolute transition pointer-events-none group-hover:bg-black/30 group-active:bg-black/50

View File

@@ -5,6 +5,7 @@ import ButtonTag from "../control/ButtonTag.astro";
import {getTagList} from "../../utils/content-utils";
import {i18n} from "../../i18n/translation";
import I18nKey from "../../i18n/i18nKey";
import {url} from "../../utils/url-utils";
const tags = await getTagList();
@@ -23,7 +24,7 @@ const style = Astro.props.style
<WidgetLayout name={i18n(I18nKey.tags)} id="tags" isCollapsed={isCollapsed} collapsedHeight={COLLAPSED_HEIGHT} class={className} style={style}>
<div class="flex gap-2 flex-wrap">
{tags.map(t => (
<ButtonTag href={`/archive/tag/${t.name}`} label={`View all posts with the ${t.name} tag`}>
<ButtonTag href={url(`/archive/tag/${t.name}/`)} label={`View all posts with the ${t.name} tag`}>
{t.name}
</ButtonTag>
))}