Skip to content
Snippets Groups Projects

fix: base url in header image

Merged Moritz Stückler requested to merge fix/base-url-in-header-image into main
3 files
+ 38
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -7,6 +7,7 @@ import { getBaseUrl, buildPageTree, buildBreadcrumbs } from "@utils";
import { LANGUAGES } from "@config";
import type { IPage } from "@interfaces/IPage";
import { format } from "node:util";
import { prefixWithBaseUrlIfNotExternal } from "@utils/Url";
type Props = MarkdownLayoutProps<{
title: string;
@@ -60,7 +61,10 @@ const breadcrumbs = buildBreadcrumbs(breadcrumbItems, url as string, baseUrl);
hideFooterSeparator={frontmatter.hideFooterSeparator}
title={frontmatter.title}
subtitle={frontmatter.subtitle}
titleImage={baseUrl + frontmatter.headerImage}
titleImage={prefixWithBaseUrlIfNotExternal(
frontmatter.headerImage,
baseUrl
)}
tags={frontmatter.tags}
teaser={frontmatter.teaser || frontmatter.description}
dateAndAuthor={`${frontmatter.date || ""}${
Loading