Skip to content

Commit 92538df

Browse files
authored
Add Newsletters Docs To Dev Server (#14094)
Adds documentation for the all newsletters page, which can be rendered on dotcom only.
1 parent 9e65d5d commit 92538df

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Available } from './available';
2+
3+
export const Newsletters = () => (
4+
<>
5+
<Available targets={['dotcom']} />
6+
<p>
7+
The{' '}
8+
<a href="https://www.theguardian.com/email-newsletters">
9+
all newsletters page
10+
</a>{' '}
11+
is a list of the currently published Editorial email newsletters,
12+
and includes a way to sign up to several at once. It's powered by
13+
the Newsletters API and configured in the Newsletters Tool. The
14+
email newsletters themselves are rendered by{' '}
15+
<code>email-rendering</code> and <code>frontend</code>, not DCAR.
16+
</p>
17+
</>
18+
);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Article } from '../docs/article';
33
import { Dotcom } from '../docs/dotcom';
44
import { Front } from '../docs/front';
55
import { Interactive } from '../docs/interactive';
6+
import { Newsletters } from '../docs/newsletters';
67
import { TagPage } from '../docs/tagPage';
78
import { sendReact } from '../send';
89

@@ -13,5 +14,6 @@ dotcom.get('/article', sendReact('Article', Article));
1314
dotcom.get('/front', sendReact('Front', Front));
1415
dotcom.get('/tag-page', sendReact('Tag Page', TagPage));
1516
dotcom.get('/interactive', sendReact('Interactive', Interactive));
17+
dotcom.get('/newsletters', sendReact('All Newsletters', Newsletters));
1618

1719
export { dotcom };

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Router } from 'express';
22
import { Article } from '../docs/article';
33
import { Front } from '../docs/front';
44
import { Interactive } from '../docs/interactive';
5+
import { Newsletters } from '../docs/newsletters';
56
import { Pages } from '../docs/pages';
67
import { TagPage } from '../docs/tagPage';
78
import { sendReact } from '../send';
@@ -13,5 +14,6 @@ pages.get('/article', sendReact('Article', Article));
1314
pages.get('/front', sendReact('Front', Front));
1415
pages.get('/tag-page', sendReact('Tag Page', TagPage));
1516
pages.get('/interactive', sendReact('Interactive', Interactive));
17+
pages.get('/newsletters', sendReact('All Newsletters', Newsletters));
1618

1719
export { pages };

0 commit comments

Comments
 (0)