Skip to content

Commit 0098dbd

Browse files
fix: contributors show in tutorial page (#1582)
1 parent 43240c2 commit 0098dbd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/layouts/TutorialLayout.astro

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { getPreviousAndNext } from '../util/getNavLinks';
88
import { getTutorialPages, getTutorialUnits } from '../util/getTutorialPages';
99
import BaseLayout from './BaseLayout.astro';
1010
import type { TutorialEntry } from '~/content/config';
11+
import {getGithubEditUrl} from '~/util/getGithubEditUrl';
1112
1213
export interface Props {
1314
content: TutorialEntry['data'];
@@ -27,11 +28,14 @@ const { next } = getPreviousAndNext(
2728
tutorialPages.map((page) => ({ text: page.data.title, slug: stripLangFromSlug(page.slug) })),
2829
Astro
2930
);
31+
32+
const githubEditUrl = getGithubEditUrl(Astro);
33+
const fileToGetContributors = githubEditUrl.replace('https://github.com/aziontech/docs/blob/main/', '');
3034
---
3135

3236
<BaseLayout {...Astro.props}>
3337
<RightSidebar slot="secondary-sidebar" />
34-
<PageContent content={Astro.props.content} {...{ next }}>
38+
<PageContent content={Astro.props.content} {fileToGetContributors} {...{ next }}>
3539
<MobileTutorialNav slot="before-article" />
3640
<p class="unit" slot="before-title">
3741
{currentUnitIndex}{currentUnit.title}

0 commit comments

Comments
 (0)