Skip to content

Commit 291db08

Browse files
Make contributing URL a constant
1 parent aa6d338 commit 291db08

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

web/src/components/ItemDescription.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import EnhancedMarkdown from './EnhancedMarkdown.astro';
3+
import { SITE_CONTRIBUTING_URL } from '@src/content.constants';
34
45
interface Props {
56
description: string;
@@ -18,7 +19,7 @@ path = path.substring(path.lastIndexOf('/'));
1819
{incomplete && (
1920
<p style="color: var(--sl-color-orange); font-size: 1.6rem;"><strong>This page is incomplete! Help wanted!</strong></p>
2021
<p style="color: var(--sl-color-orange); font-size: 1.25rem;">Please finish this page using the <a target="_blank" href={"https://wiki.multitheftauto.com/wiki" + path}>corresponding Old Wiki article</a>.
21-
<br>Go to <a target="_blank" href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md">Contribution guidelines</a> for more information.</p>
22+
<br>Go to <a target="_blank" href={SITE_CONTRIBUTING_URL}>Contribution guidelines</a> for more information.</p>
2223
<hr>
2324
)}
2425

web/src/components/NeedsExample.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { SITE_CONTRIBUTING_URL } from '@src/content.constants';
3+
24
export interface Props {
35
theItem: any;
46
}
@@ -19,7 +21,7 @@ itemType = itemType.charAt(0).toUpperCase() + itemType.slice(1);
1921
<div class="missing-example-content">
2022
<strong>Script Example Missing</strong>
2123
<p>{itemType} <code>{itemName}</code> needs a script example. Help out by writing one.</p>
22-
<a href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md" class="guidelines-link">Contribution guidelines</a>
24+
<a href={SITE_CONTRIBUTING_URL} class="guidelines-link">Contribution guidelines</a>
2325
</div>
2426
</div>
2527

web/src/content.constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const SITE_TITLE = 'Multi Theft Auto: Wiki';
22
export const SITE_URL = 'https://wiki.preview.multitheftauto.com';
3+
export const SITE_CONTRIBUTING_URL = "https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md";
34
export const OLD_WIKI_URL = 'https://wiki.multitheftauto.com';
45
export const OLD_WIKI_REDIRECT = true; // Set to false to disable redirecting to old wiki on 404
56
export const MTA_CURRENT_VERSION = {

web/src/pages/Contributing.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
import { SITE_CONTRIBUTING_URL } from '@src/content.constants';
34
---
45

56
<StarlightPage frontmatter={{
@@ -10,7 +11,7 @@ import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
1011
<p><strong>Multi Theft Auto</strong> has loads of areas in which you can help. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there are many things we've not thought of, so think outside the box!</p>
1112

1213
<h3>Documentation</h3>
13-
<p>Before you make changes check out: <a href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md">Contribution Guidelines</a>.</p>
14+
<p>Before you make changes check out: <a href={SITE_CONTRIBUTING_URL}>Contribution Guidelines</a>.</p>
1415
<ul>
1516
<li>Finish documentation for <a href="/Incomplete_Pages">Incomplete pages</a> - ask on Discord if you're not sure of something.</li>
1617
<li>Add examples to <a href="/Incomplete_Pages">functions & events missing examples</a> - please <strong>test</strong> them, and again, ask if you need help.</li>

web/src/pages/Incomplete_Pages.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
import { SITE_CONTRIBUTING_URL } from '@src/content.constants';
34
import { getUnfinishedPages } from '@src/utils/general';
45
56
import NoteBox from '@src/components/NoteBox.astro';
@@ -15,7 +16,7 @@ const unfinishedEvents = getUnfinishedPages('events');
1516
}}>
1617

1718
<p>The following pages are not finished, and need your attention! Please help complete the MTA Wiki.</p>
18-
<p><a href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md"
19+
<p><a href={SITE_CONTRIBUTING_URL}
1920
class="guidelines-link">Contribution guidelines</a></p>
2021

2122
<h3>Unfinished Function Pages</h3>

0 commit comments

Comments
 (0)