Skip to content

Commit 1ed6ba1

Browse files
committed
Added banner to remind students theyre working locally not live
1 parent 336a930 commit 1ed6ba1

File tree

3 files changed

+45
-10
lines changed

3 files changed

+45
-10
lines changed

documentation/docusaurus.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const title = rawProjectName
2828
.split(' ')
2929
.map(word => {
3030
// Make sure the word has at least one character
31-
return word.length > 0
32-
? word[0].toUpperCase() + word.substring(1)
31+
return word.length > 0
32+
? word[0].toUpperCase() + word.substring(1)
3333
: '';
3434
})
3535
.join(' ');
@@ -116,6 +116,14 @@ const config = {
116116
themeConfig:
117117
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
118118
({
119+
...(process.env.NODE_ENV === 'development' ? {announcementBar : {
120+
id: 'dev_mode',
121+
content:
122+
'You are currently working on a local development version of your docs. This is <b>NOT</b> the live site.',
123+
backgroundColor: '#ffca00',
124+
textColor: '#091E42',
125+
isCloseable: false,
126+
}} : {}),
119127
navbar: {
120128
/*TODO: Change to your project's title*/
121129
title: title,

documentation/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-project-docs",
33
"description": "Create a project with a Docusaurus documentation website template designed for Temple University CIS Projects in Computer Science courses.",
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"scripts": {
66
"docusaurus": "docusaurus",
77
"start": "docusaurus start --host 0.0.0.0 ",
@@ -13,7 +13,9 @@
1313
"write-translations": "docusaurus write-translations",
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
16-
"bin": "./.bin/bin.js",
16+
"bin": {
17+
"create-project-docs": "./.bin/bin.js"
18+
},
1719
"dependencies": {
1820
"@docusaurus/core": "^3.1.1",
1921
"@docusaurus/preset-classic": "^3.1.1",

documentation/yarn.lock

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,9 +3100,9 @@ caniuse-api@^3.0.0:
31003100
lodash.uniq "^4.5.0"
31013101

31023102
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
3103-
version "1.0.30001617"
3104-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz#809bc25f3f5027ceb33142a7d6c40759d7a901eb"
3105-
integrity sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==
3103+
version "1.0.30001695"
3104+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001695.tgz"
3105+
integrity sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw==
31063106

31073107
ccount@^2.0.0:
31083108
version "2.0.1"
@@ -9043,7 +9043,16 @@ stickyfill@^1.1.1:
90439043
resolved "https://registry.yarnpkg.com/stickyfill/-/stickyfill-1.1.1.tgz#39413fee9d025c74a7e59ceecb23784cc0f17f02"
90449044
integrity sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==
90459045

9046-
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
9046+
"string-width-cjs@npm:string-width@^4.2.0":
9047+
version "4.2.3"
9048+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
9049+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
9050+
dependencies:
9051+
emoji-regex "^8.0.0"
9052+
is-fullwidth-code-point "^3.0.0"
9053+
strip-ansi "^6.0.1"
9054+
9055+
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
90479056
version "4.2.3"
90489057
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
90499058
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -9097,7 +9106,14 @@ stringify-object@^3.3.0:
90979106
is-obj "^1.0.1"
90989107
is-regexp "^1.0.0"
90999108

9100-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
9109+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
9110+
version "6.0.1"
9111+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
9112+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
9113+
dependencies:
9114+
ansi-regex "^5.0.1"
9115+
9116+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
91019117
version "6.0.1"
91029118
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
91039119
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -9857,7 +9873,16 @@ wildcard@^2.0.0:
98579873
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
98589874
integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==
98599875

9860-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
9876+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
9877+
version "7.0.0"
9878+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
9879+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
9880+
dependencies:
9881+
ansi-styles "^4.0.0"
9882+
string-width "^4.1.0"
9883+
strip-ansi "^6.0.0"
9884+
9885+
wrap-ansi@^7.0.0:
98619886
version "7.0.0"
98629887
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
98639888
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

0 commit comments

Comments
 (0)