diff --git a/docs/beginner.html b/docs/beginner.html
index 01274c709..16c06e47d 100644
--- a/docs/beginner.html
+++ b/docs/beginner.html
@@ -12,6 +12,47 @@
+
@@ -210,7 +251,7 @@ Return the string truncated to the desired length, with
'...' appen
str
. length
> num
? str
. slice ( 0 , num
> 3 ? num
- 3 : num
) + '...' : str
;
Show examples truncateString ( 'boomerang' , 7 ) ;
-
📋 Copy to clipboard 📋 Copy to clipboard
+📋 Copy to clipboard
diff --git a/scripts/web.js b/scripts/web.js
index 5822589a8..a2d654366 100644
--- a/scripts/web.js
+++ b/scripts/web.js
@@ -55,8 +55,8 @@ let snippets = {},
startPart = '',
endPart = '',
output = '',
- startBeginnerPart = '',
- endBegginerPart = '',
+ beginnerStartPart = '',
+ beginnerEndPart = '',
beginnerOutput = '',
pagesOutput = [];
tagDbData = {};
@@ -70,8 +70,8 @@ try {
startPart = fs.readFileSync(path.join(staticPartsPath, 'page-start.html'), 'utf8');
endPart = fs.readFileSync(path.join(staticPartsPath, 'page-end.html'), 'utf8');
- startBeginnerPart = fs.readFileSync(path.join(staticPartsPath, 'beginner-page-start.html'), 'utf8');
- endBeginnerPart = fs.readFileSync(path.join(staticPartsPath, 'beginner-page-end.html'), 'utf8');
+ beginnerStartPart = fs.readFileSync(path.join(staticPartsPath, 'beginner-page-start.html'), 'utf8');
+ beginnerEndPart = fs.readFileSync(path.join(staticPartsPath, 'beginner-page-end.html'), 'utf8');
} catch (err) {
// Handle errors (hopefully not!)
console.log(`${chalk.red('ERROR!')} During static part loading: ${err}`);
@@ -170,7 +170,7 @@ try {
try {
// Add the static part
- beginnerOutput += `${startBeginnerPart + '\n'}`;
+ beginnerOutput += `${beginnerStartPart + '\n'}`;
// Filter begginer snippets
const filteredBeginnerSnippets = Object.keys(snippets)
@@ -180,7 +180,6 @@ try {
return obj;
}, {});
- console.log(filteredBeginnerSnippets);
for (let snippet of Object.entries(filteredBeginnerSnippets))
beginnerOutput +=
'' +
@@ -197,13 +196,7 @@ try {
'
';
- beginnerOutput +=
- '' +
- // begginer snippet goes here.
- '📋 Copy to clipboard ' +
- '
';
-
- beginnerOutput += `${endBeginnerPart}`;
+ beginnerOutput += `${beginnerEndPart}`;
// Generate 'beginner.html' file
fs.writeFileSync(path.join(docsPath, 'beginner.html'), beginnerOutput);
diff --git a/static-parts/beginner-page-start.html b/static-parts/beginner-page-start.html
index 7a49e98e8..edd03d57e 100644
--- a/static-parts/beginner-page-start.html
+++ b/static-parts/beginner-page-start.html
@@ -12,6 +12,47 @@
+