modified the trailing_slash function

This commit is contained in:
Al Murad Uzzaman
2024-05-18 16:00:14 +06:00
parent f88e524bb0
commit 8c1ab27945
27 changed files with 108 additions and 600 deletions
+7 -1
View File
@@ -1,5 +1,6 @@
---
import config from "@/config/config.json";
import { constructUrl, getLangFromUrl } from "@/lib/utils/i18nUtils";
import ImageMod from "./ImageMod.astro";
const { src, srcDarkmode }: { src?: string; srcDarkmode?: string } =
@@ -21,9 +22,14 @@ const {
} = config.site;
const { theme_switcher }: { theme_switcher: boolean } = config.settings;
const { default_language } = config.settings;
const { trailing_slash } = config.site;
const lang = getLangFromUrl(Astro.url);
const url = constructUrl("/", lang, default_language, trailing_slash);
---
<a href="/" class="navbar-brand inline-block">
<a href={url} class="navbar-brand inline-block">
{
src || srcDarkmode || logo || logo_darkmode ? (
<>