From 72f4f369394a9ccdcd721c4f2fa0ee2913ad98dd Mon Sep 17 00:00:00 2001 From: Endilie Yacop Sucipto Date: Thu, 31 May 2018 12:37:38 +0800 Subject: [PATCH] Enable setting of title for custom pages * allowing custom title on page component * Update about-slash.js * Update help.js * Update users.js * Update versions.js --- lib/server/generate.js | 13 +++++++++++-- lib/server/server.js | 1 + website/pages/en/about-slash.js | 2 ++ website/pages/en/help.js | 2 ++ website/pages/en/users.js | 2 ++ website/pages/en/versions.js | 2 ++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/server/generate.js b/lib/server/generate.js index fd4cbbe2abec..2d547edd7d08 100644 --- a/lib/server/generate.js +++ b/lib/server/generate.js @@ -498,6 +498,7 @@ async function execute() { @@ -513,7 +514,11 @@ async function execute() { let language = env.translation.enabled ? 'en' : ''; translate.setLanguage(language); const str = renderToStaticMarkupWithDoctype( - + ); @@ -526,7 +531,11 @@ async function execute() { let language = env.translation.enabled ? 'en' : ''; translate.setLanguage(language); const str = renderToStaticMarkupWithDoctype( - + ); diff --git a/lib/server/server.js b/lib/server/server.js index 8aaf246a0eed..6444e9eb7fd4 100644 --- a/lib/server/server.js +++ b/lib/server/server.js @@ -442,6 +442,7 @@ function execute(port) { diff --git a/website/pages/en/about-slash.js b/website/pages/en/about-slash.js index d2ca219fb0af..29d1855fbdad 100644 --- a/website/pages/en/about-slash.js +++ b/website/pages/en/about-slash.js @@ -40,4 +40,6 @@ AboutSlash.defaultProps = { language: "en" }; +AboutSlash.title = 'About Slash'; + module.exports = AboutSlash; diff --git a/website/pages/en/help.js b/website/pages/en/help.js index 9e5ac89a61d9..c99f1af83cd8 100755 --- a/website/pages/en/help.js +++ b/website/pages/en/help.js @@ -61,4 +61,6 @@ class Help extends React.Component { } } +Help.title = 'Help'; + module.exports = Help; diff --git a/website/pages/en/users.js b/website/pages/en/users.js index ccdd89e32773..b2e5360cff20 100644 --- a/website/pages/en/users.js +++ b/website/pages/en/users.js @@ -80,4 +80,6 @@ class Users extends React.Component { } } +Users.title = 'Users'; + module.exports = Users; diff --git a/website/pages/en/versions.js b/website/pages/en/versions.js index 8c5ed3695d41..5992e420fb1c 100644 --- a/website/pages/en/versions.js +++ b/website/pages/en/versions.js @@ -102,4 +102,6 @@ class Versions extends React.Component { } } +Versions.title = 'Versions'; + module.exports = Versions;