Skip to content

Commit 0f8697f

Browse files
committed
add the setting to the frontend and write in noindex meta tag if it's true
1 parent 982ed6f commit 0f8697f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

frontends/mit-learn/public/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<% if (MITOL_NOINDEX) { %>
7+
<meta name="robots" content="noindex" />
8+
<% } %>
69
<!--
710
Font files for Adobe Neue Haas Grotesk.
811
WARNING: This is linked to chudzick@mit.edu's Adobe account.

frontends/mit-learn/webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const {
4444
SENTRY_PROFILES_SAMPLE_RATE,
4545
CSRF_COOKIE_NAME,
4646
APPZI_URL,
47+
MITOL_NOINDEX,
4748
} = cleanEnv(process.env, {
4849
NODE_ENV: str({
4950
choices: ["development", "production", "test"],
@@ -119,6 +120,10 @@ const {
119120
desc: "URL for the Appzi feedback widget",
120121
default: "",
121122
}),
123+
MITOL_NOINDEX: bool({
124+
desc: "Whether to include a noindex meta tag",
125+
default: true,
126+
}),
122127
})
123128

124129
const MITOL_FEATURES_PREFIX = "FEATURE_"
@@ -216,6 +221,7 @@ module.exports = (env, argv) => {
216221
template: "public/index.html",
217222
templateParameters: {
218223
APPZI_URL,
224+
MITOL_NOINDEX,
219225
},
220226
}),
221227
new CopyPlugin({

0 commit comments

Comments
 (0)