Skip to content

Commit eb2d1d9

Browse files
committed
Trailing slashes
1 parent f1698ff commit eb2d1d9

12 files changed

Lines changed: 32 additions & 20 deletions

File tree

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const isProduction = process.env.NODE_ENV === 'production';
99

1010
const nextConfig: NextConfig = isProduction ? {
1111
output: 'export',
12+
trailingSlash: true,
1213
} : {};
1314

1415
if (!isProduction) {

src/app/404/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function Oops() {
2626
{/*
2727
<!--
2828
<div data-animate-in="fade" data-animate-in-delay="240">
29-
<a className="link-arrow text-white mt-4" href="{{ '/explore/' | relative_url }}">Explore Projects</a>
29+
<a className="link-arrow text-white mt-4" href="/explore">Explore Projects</a>
3030
</div>
3131
-->
3232
*/}

src/app/codeofconduct/faq/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React from 'react';
77

88
// Page title: Code of Conduct - FAQ
99
import { Metadata } from 'next';
10+
import Link from 'next/link';
1011

1112
export const metadata: Metadata = {
1213
title: 'Code of Conduct - FAQ',
@@ -78,9 +79,9 @@ const FAQ_ENTRIES: Entry[] = [
7879
<>
7980
<p>
8081
Thanks for being proactive in this important area. You are welcome to continue using your existing Code of Conduct, or you may change to the{" "}
81-
<a className="link-standard" href="https://opensource.microsoft.com/codeofconduct/">
82+
<Link className="link-standard" href="/codeofconduct">
8283
Microsoft Open Source Code of Conduct
83-
</a>
84+
</Link>
8485
. Either way, all Microsoft projects must use the same issue resolution process. Please ensure that your documentation and guidance is updated to point people at the process outlined in this FAQ (see below).
8586
</p>
8687
<p>

src/app/codeofconduct/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//
55

66
import { Metadata } from 'next';
7+
import Link from 'next/link';
78

89
export const metadata: Metadata = {
910
title: 'Code of Conduct for Microsoft open source projects',
@@ -22,7 +23,7 @@ export default function CodeOfConduct() {
2223
<div className="col-md-6 pl-md-4 col-lg-4">
2324
<p>Have a question?</p>
2425
<div data-animate-in="fade" data-animate-in-delay="240">
25-
<a className="link-arrow text-white mt-4" href="/codeofconduct/faq/">Read our FAQ</a>
26+
<Link className="link-arrow text-white mt-4" href="/codeofconduct/faq/">Read our FAQ</Link>
2627
</div>
2728
</div>
2829
</div>

src/app/collaborate/components/ActivityStreamWidget.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
import { BellSlashIcon, CommentIcon, GitMergeIcon, GitPullRequestIcon, IssueOpenedIcon, IssueReopenedIcon, RepoIcon, SyncIcon } from '@primer/octicons-react';
1515
import { formatDistanceToNow } from 'date-fns';
1616
import { GitHubDescriptionFromType, ShowOcticonForType } from '@/app/contributions/components/UpstreamContributionsWidget';
17+
import Link from 'next/link';
1718

1819
// @cspell: ignore octicon
1920

@@ -123,9 +124,9 @@ export default function ActivityStreamWidget() {
123124
or an opportunity to join in the fun.
124125
`}
125126
</p>
126-
<a className="link-arrow text-white mt-4" href="/projects">Featured projects</a>
127+
<Link className="link-arrow text-white mt-4" href="/projects">Featured projects</Link>
127128
<br />
128-
<a className="link-arrow text-white mt-4" href="/projects/explore">View all projects</a>
129+
<Link className="link-arrow text-white mt-4" href="/projects/explore">View all projects</Link>
129130
</div>
130131
</div>
131132
</div>

src/app/collaborate/components/HelpWantedWidget.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { RepoIcon } from '@primer/octicons-react';
1515
import { formatDistanceToNow } from 'date-fns';
1616

1717
import { GitHubDescriptionFromType } from '@/app/contributions/components/UpstreamContributionsWidget';
18+
import Link from 'next/link';
1819

1920
// @cspell: ignore octicon
2021

@@ -217,7 +218,7 @@ function HelpWantedSection() {
217218
</p>
218219
<ul>
219220
<li><a href="https://opensource.guide/how-to-contribute/" className="link-arrow text-brand" target="_new">How to Contribute to Open Source</a></li>
220-
<li><a href="https://opensource.microsoft.com/codeofconduct/" className="link-arrow text-brand" target="_new">Microsoft's Open Source Code of Conduct</a></li>
221+
<li><Link href="/codeofconduct" className="link-arrow text-brand">Microsoft's Open Source Code of Conduct</Link></li>
221222
<li><a href="https://opensource.com/life/14/2/exploring-open-source-beginners" className="link-arrow text-brand" target="_new">Getting Started in Open Source Online and Offline</a></li>
222223
<li><a href="https://todogroup.org/guides/participating/" className="link-arrow text-brand" target="_new">TODO Group's Participating in Open Source Communities Guide</a></li>
223224
</ul>

src/app/components/Projects.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import React from 'react';
77
import { getHighlightedProjects } from '../projects/data';
8+
import Link from 'next/link';
89

910
function chooseRandom(arr: any[], num: number) {
1011
const shuffled = arr.sort(() => 0.5 - Math.random());
@@ -54,7 +55,7 @@ export default function Projects() {
5455
))}
5556
</div>
5657
<div className="text-center mt-6 pb-6">
57-
<a className="link-arrow text-brand" href="/projects">Explore Microsoft projects</a>
58+
<Link className="link-arrow text-brand" href="/projects">Explore Microsoft projects</Link>
5859
</div>
5960
</div>
6061
);

src/app/components/Why.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
//
55

6+
import Link from 'next/link';
67
import React from 'react';
78

89
export default function Why() {
@@ -26,9 +27,9 @@ export default function Why() {
2627
`}
2728
</p>
2829
<div className="mt-6">
29-
<a className="link-arrow" href="/collaborate/#get-involved">Happening now</a><br />
30-
<a className="link-arrow" href="/collaborate/#get-started">Find a "good first issue"</a><br />
31-
<a className="link-arrow" href="/projects">Featured projects</a>
30+
<Link className="link-arrow" href="/collaborate#get-involved">Happening now</Link><br />
31+
<Link className="link-arrow" href="/collaborate#get-started">Find a "good first issue"</Link><br />
32+
<Link className="link-arrow" href="/projects">Featured projects</Link>
3233
</div>
3334
</div>
3435

@@ -53,9 +54,9 @@ export default function Why() {
5354
</p>
5455

5556
<div className="mt-6">
56-
<a className="link-arrow" href="/program">Our program</a><br />
57-
<a className="link-arrow" href="/program/#program-tools">Our tools</a><br />
58-
<a className="link-arrow" href="/ecosystem">The ecosystem we support</a>
57+
<Link className="link-arrow" href="/program">Our program</Link><br />
58+
<Link className="link-arrow" href="/program#program-tools">Our tools</Link><br />
59+
<Link className="link-arrow" href="/ecosystem">The ecosystem we support</Link>
5960
</div>
6061
</div>
6162
<img src="/images/direction/dots-corner.svg" alt="" />

src/app/ecosystem/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import matter from 'gray-matter';
1111
import UpstreamContributionsWidget from "../contributions/components/UpstreamContributionsWidget";
1212

1313
import { Metadata } from 'next';
14+
import Link from "next/link";
1415

1516
export const metadata: Metadata = {
1617
title: 'Ecosystem',
@@ -90,8 +91,8 @@ export default function Ecosystem() {
9091
`}
9192
</p>
9293
<div data-animate-in="fade" data-animate-in-delay="240">
93-
<a className="link-arrow text-white mt-4"
94-
href="/collaborate">See recent activity in Microsoft open source repositories</a>
94+
<Link className="link-arrow text-white mt-4"
95+
href="/collaborate">See recent activity in Microsoft open source repositories</Link>
9596
</div>
9697
</div>
9798
</div>

src/app/not-found.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Oops() {
1818
{/*
1919
<!--
2020
<div data-animate-in="fade" data-animate-in-delay="240">
21-
<a className="link-arrow text-white mt-4" href="{{ '/explore/' | relative_url }}">Explore Projects</a>
21+
<a className="link-arrow text-white mt-4" href="/explore">Explore Projects</a>
2222
</div>
2323
-->
2424
*/}

0 commit comments

Comments
 (0)