fix: fix build fail
This commit is contained in:
parent
844c165833
commit
239c546d5f
|
@ -12,14 +12,13 @@ const className = Astro.props.class;
|
||||||
|
|
||||||
import { Icon } from 'astro-icon/components';
|
import { Icon } from 'astro-icon/components';
|
||||||
import {licenseConfig, profileConfig} from "../../config";
|
import {licenseConfig, profileConfig} from "../../config";
|
||||||
import {getFullUrl, getPostUrlBySlug} from "../../utils/url-utils";
|
|
||||||
import {i18n} from "../../i18n/translation";
|
import {i18n} from "../../i18n/translation";
|
||||||
import I18nKey from "../../i18n/i18nKey";
|
import I18nKey from "../../i18n/i18nKey";
|
||||||
|
|
||||||
const profileConf = profileConfig;
|
const profileConf = profileConfig;
|
||||||
const licenseConf = licenseConfig;
|
const licenseConf = licenseConfig;
|
||||||
|
|
||||||
const postUrl = getFullUrl(getPostUrlBySlug(slug));
|
const postUrl = Astro.url;
|
||||||
|
|
||||||
---
|
---
|
||||||
<div class=`relative transition overflow-hidden bg-[var(--license-block-bg)] py-5 px-6 ${className}`>
|
<div class=`relative transition overflow-hidden bg-[var(--license-block-bg)] py-5 px-6 ${className}`>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import {siteConfig} from "../config.ts";
|
|
||||||
import astroConfig from "../../astro.config.mjs"
|
|
||||||
|
|
||||||
export function pathsEqual(path1: string, path2: string) {
|
export function pathsEqual(path1: string, path2: string) {
|
||||||
const normalizedPath1 = path1.replace(/^\/|\/$/g, '').toLowerCase();
|
const normalizedPath1 = path1.replace(/^\/|\/$/g, '').toLowerCase();
|
||||||
|
@ -24,6 +22,3 @@ export function getCategoryUrl(category: string): string | null {
|
||||||
return `/archive/category/${category}`;
|
return `/archive/category/${category}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFullUrl(path: string): string {
|
|
||||||
return joinUrl(astroConfig.site || "", astroConfig.base || "", path);
|
|
||||||
}
|
|
Loading…
Reference in New Issue