Skip to content

Commit 96b7e23

Browse files
authored
Add Cricket Docs To Dev Server (#14097)
Adds documentation for the cricket scorecard page, which can be rendered on dotcom only. The cricket scorecard pages go out of date over time and no longer provide cricket data. In addition, the scorecards that appear on liveblogs also go out of date and disappear from the page. Therefore we should not link directly to these pages from the docs, but instead link to a list of recent cricket liveblogs. These should have up-to-date data, and links to the scorecard pages.
1 parent d7815ac commit 96b7e23

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Available } from './available';
2+
3+
export const CricketScorecard = () => (
4+
<>
5+
<Available targets={['dotcom']} />
6+
<p>
7+
These pages are summaries of cricket matches, and contain various
8+
statistics about a match, including batters, bowlers, and the fall
9+
of wickets. They are typically reached from a link at the top of
10+
some recent{' '}
11+
<a href="https://www.theguardian.com/sport/cricket+tone/minutebyminute">
12+
cricket liveblogs
13+
</a>
14+
, which are a kind of <a href="../article">article</a>.
15+
</p>
16+
</>
17+
);

dotcom-rendering/src/devServer/routers/dotcom.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Router } from 'express';
22
import { Article } from '../docs/article';
3+
import { CricketScorecard } from '../docs/cricketScorecard';
34
import { Dotcom } from '../docs/dotcom';
45
import { FootballFixtures } from '../docs/footballFixtures';
56
import { FootballLive } from '../docs/footballLive';
@@ -31,5 +32,9 @@ dotcom.get(
3132
'/football-match-summary',
3233
sendReact('Football Match Summary', FootballMatchSummary),
3334
);
35+
dotcom.get(
36+
'/cricket-scorecard',
37+
sendReact('Cricket Scorecard', CricketScorecard),
38+
);
3439

3540
export { dotcom };

dotcom-rendering/src/devServer/routers/pages.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Router } from 'express';
22
import { Article } from '../docs/article';
3+
import { CricketScorecard } from '../docs/cricketScorecard';
34
import { FootballFixtures } from '../docs/footballFixtures';
45
import { FootballLive } from '../docs/footballLive';
56
import { FootballMatchSummary } from '../docs/footballMatchSummary';
@@ -31,5 +32,9 @@ pages.get(
3132
'/football-match-summary',
3233
sendReact('Football Match Summary', FootballMatchSummary),
3334
);
35+
pages.get(
36+
'/cricket-scorecard',
37+
sendReact('Cricket Scorecard', CricketScorecard),
38+
);
3439

3540
export { pages };

0 commit comments

Comments
 (0)