Skip to content

Commit 18fd324

Browse files
montogeekskipjack
authored andcommitted
fix(site) Add exception to homepage title
1 parent 75c3572 commit 18fd324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const paths = Content.children.reduce((paths, page) => {
3131
// Export method for `SSGPlugin`
3232
export default locals => {
3333
let { assets } = locals.webpackStats.compilation;
34-
let title = paths[locals.path];
34+
let title = paths[locals.path] === 'webpack' ? paths[locals.path] : `${paths[locals.path]} | webpack`;
3535

3636
return ReactDOMServer.renderToString(
3737
<StaticRouter location={locals.path} context={{}}>
@@ -40,7 +40,7 @@ export default locals => {
4040
<meta charset="utf-8" />
4141
<meta name="theme-color" content="#2B3A42" />
4242
<meta name="viewport" content="width=device-width, initial-scale=1" />
43-
<title>{title} | webpack</title>
43+
<title>{title}</title>
4444
<meta name="description" content="webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset." />
4545
<link rel="icon" type="image/x-icon" href={ Favicon } />
4646
{ Object.keys(assets).filter(asset => /\.css$/.test(asset)).map(path => (

0 commit comments

Comments
 (0)