Skip to content

Commit 5b6c627

Browse files
authored
Add Fronts Docs To Dev Server (#14091)
Adds documentation for fronts, which can be rendered on dotcom only.
1 parent bf33a63 commit 5b6c627

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import { Available } from './available';
2+
3+
const NetworkFronts = () => (
4+
<>
5+
<h3>Network Fronts</h3>
6+
<p>
7+
Each edition (UK, US, AU, Europe, International) has its own
8+
"network" front, also known as a "homepage". Note that just visiting
9+
one of these fronts does not mean you are on that edition of the
10+
site. Edition is a separate concept from which several aspects of
11+
the user experience, such as timezone, are derived.
12+
</p>
13+
<ul>
14+
<li>
15+
<a href="https://www.theguardian.com/uk">UK</a>
16+
</li>
17+
<li>
18+
<a href="https://www.theguardian.com/us">US</a>
19+
</li>
20+
<li>
21+
<a href="https://www.theguardian.com/au">AU</a>
22+
</li>
23+
<li>
24+
<a href="https://www.theguardian.com/europe">Europe</a>
25+
</li>
26+
<li>
27+
<a href="https://www.theguardian.com/international">
28+
International
29+
</a>
30+
</li>
31+
</ul>
32+
</>
33+
);
34+
35+
const OtherFronts = () => (
36+
<>
37+
<h3>Other Fronts</h3>
38+
<ul>
39+
<li>
40+
<a href="https://www.theguardian.com/uk/culture">UK Culture</a>
41+
</li>
42+
<li>
43+
<a href="https://www.theguardian.com/world">World</a>
44+
</li>
45+
<li>
46+
<a href="https://www.theguardian.com/tone/recipes">Recipes</a>
47+
</li>
48+
</ul>
49+
</>
50+
);
51+
52+
const Examples = () => (
53+
<>
54+
<h2>Examples</h2>
55+
<NetworkFronts />
56+
<OtherFronts />
57+
</>
58+
);
59+
60+
export const Front = () => (
61+
<>
62+
<Available targets={['dotcom']} />
63+
<p>
64+
Fronts are curated collections of content; largely, but not
65+
exclusively, comprised of articles. They are managed in the Fronts
66+
Tool, and can either be standalone pages or "upgraded" versions of
67+
tag pages (see <a href="../tag-page">tag page</a> for more
68+
information on this).
69+
</p>
70+
<Examples />
71+
<h2>See also</h2>
72+
<ul>
73+
<li>
74+
<a href="../tag-page">Tag Page</a>
75+
</li>
76+
</ul>
77+
</>
78+
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Router } from 'express';
22
import { Article } from '../docs/article';
33
import { Dotcom } from '../docs/dotcom';
4+
import { Front } from '../docs/front';
45
import { sendReact } from '../send';
56

67
const dotcom = Router();
78

89
dotcom.get('/', sendReact('Dotcom', Dotcom));
910
dotcom.get('/article', sendReact('Article', Article));
11+
dotcom.get('/front', sendReact('Front', Front));
1012

1113
export { dotcom };
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Router } from 'express';
22
import { Article } from '../docs/article';
3+
import { Front } from '../docs/front';
34
import { Pages } from '../docs/pages';
45
import { sendReact } from '../send';
56

67
const pages = Router();
78

89
pages.get('/', sendReact('Pages', Pages));
910
pages.get('/article', sendReact('Article', Article));
11+
pages.get('/front', sendReact('Front', Front));
1012

1113
export { pages };

0 commit comments

Comments
 (0)