Our philosophy
diff --git a/docs/contributing.html b/docs/contributing.html index 9f646a838..55f767874 100644 --- a/docs/contributing.html +++ b/docs/contributing.html @@ -13,8 +13,104 @@ + - + +
30
seconds of code
@@ -31,6 +128,372 @@
How to contribute
diff --git a/scripts/web.js b/scripts/web.js index 9d17c7699..df924f021 100644 --- a/scripts/web.js +++ b/scripts/web.js @@ -241,6 +241,35 @@ catch (err) { process.exit(1); } +const generateMenuForStaticPage = (staticPart) => { + let taggedData = util.prepTaggedData(tagDbData); + // Add the start static part + let htmlCode; + + for (let tag of taggedData) { + htmlCode += + '' + + md + .render(`${util.capitalize(tag, true)}\n`) + .replace(/
/g, '') + .replace(/<\/p>/g, '') + + '
- ';
+ for (let taggedSnippet of Object.entries(tagDbData).filter(v => v[1][0] === tag)) {
+ htmlCode += md
+ .render(
+ `[${taggedSnippet[0]}](./${
+ tag === 'array' ? 'index' : tag
+ }#${taggedSnippet[0].toLowerCase()})\n`
+ )
+ .replace(/
/g, '')
+ .replace(/<\/p>/g, '')
+ .replace(/\n';
+ }
+ return staticPart.replace('$nav-menu-data', htmlCode);
+}
+
const staticPageStartGenerator = (staticPart, heading, description) => {
let taggedData = util.prepTaggedData(tagDbData);
// Add the start static part
@@ -364,7 +393,12 @@ catch (err) {
// Copy static files
staticFiles.forEach(f => {
try {
- fs.copyFileSync(path.join(staticPartsPath, f), path.join(docsPath, f));
+ if(f !== 'array.html') {
+ let fileData = fs.readFileSync(path.join(staticPartsPath, f), 'utf8');
+ fs.writeFileSync(path.join(docsPath, f), generateMenuForStaticPage(fileData));
+ }
+ else
+ fs.copyFileSync(path.join(staticPartsPath, f), path.join(docsPath, f));
console.log(`${chalk.green('SUCCESS!')} ${f} file copied!`);
}
catch (err) {
diff --git a/static-parts/about.html b/static-parts/about.html
index 9996f6217..05ba71725 100644
--- a/static-parts/about.html
+++ b/static-parts/about.html
@@ -13,8 +13,104 @@
+
-
+
+
30
seconds of code
@@ -31,6 +128,15 @@