From a68df18cd5fba05dcc4ec03c32bae04a317ad3ba Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 11 Jun 2018 22:18:34 +0100 Subject: [PATCH] Updated website --- Tools/build-website.js | 35 +++++++++++++++++++++++------------ docs/changelog/index.html | 2 +- docs/clipper/index.html | 2 +- docs/debugging/index.html | 2 +- docs/desktop/index.html | 2 +- docs/donate/index.html | 2 +- docs/e2ee/index.html | 2 +- docs/faq/index.html | 2 +- docs/mobile/index.html | 2 +- docs/spec/index.html | 2 +- docs/stats/index.html | 2 +- docs/terminal/index.html | 2 +- 12 files changed, 34 insertions(+), 23 deletions(-) diff --git a/Tools/build-website.js b/Tools/build-website.js index 1ce646b23..f397f1aa3 100644 --- a/Tools/build-website.js +++ b/Tools/build-website.js @@ -6,7 +6,7 @@ const Mustache = require('mustache'); const headerHtml = ` - Joplin - an open source note taking and to-do application with synchronisation capabilities + {{pageTitle}} @@ -344,6 +344,17 @@ function renderMdToHtml(md, targetPath, params) { params.baseUrl = 'https://joplin.cozic.net'; params.imageBaseUrl = params.baseUrl + '/images'; params.tocHtml = tocHtml(); + + const title = []; + + if (!params.title) { + title.push('Joplin - an open source note taking and to-do application with synchronisation capabilities'); + } else { + title.push(params.title); + title.push('Joplin'); + } + + params.pageTitle = title.join(' | '); const html = Mustache.render(markdownToHtml(md), params); fs.writeFileSync(targetPath, html); } @@ -364,17 +375,17 @@ async function main() { renderMdToHtml(makeHomePageMd(), rootDir + '/docs/index.html', {}); - renderFileToHtml(rootDir + '/readme/changelog.md', rootDir + '/docs/changelog/index.html', {}); - renderFileToHtml(rootDir + '/readme/clipper.md', rootDir + '/docs/clipper/index.html', {}); - renderFileToHtml(rootDir + '/readme/debugging.md', rootDir + '/docs/debugging/index.html', {}); - renderFileToHtml(rootDir + '/readme/desktop.md', rootDir + '/docs/desktop/index.html', {}); - renderFileToHtml(rootDir + '/readme/donate.md', rootDir + '/docs/donate/index.html', {}); - renderFileToHtml(rootDir + '/readme/e2ee.md', rootDir + '/docs/e2ee/index.html', {}); - renderFileToHtml(rootDir + '/readme/faq.md', rootDir + '/docs/faq/index.html', {}); - renderFileToHtml(rootDir + '/readme/mobile.md', rootDir + '/docs/mobile/index.html', {}); - renderFileToHtml(rootDir + '/readme/spec.md', rootDir + '/docs/spec/index.html', {}); - renderFileToHtml(rootDir + '/readme/stats.md', rootDir + '/docs/stats/index.html', {}); - renderFileToHtml(rootDir + '/readme/terminal.md', rootDir + '/docs/terminal/index.html', {}); + renderFileToHtml(rootDir + '/readme/changelog.md', rootDir + '/docs/changelog/index.html', { title: 'Changelog' }); + renderFileToHtml(rootDir + '/readme/clipper.md', rootDir + '/docs/clipper/index.html', { title: 'Web Clipper' }); + renderFileToHtml(rootDir + '/readme/debugging.md', rootDir + '/docs/debugging/index.html', { title: 'Debugging' }); + renderFileToHtml(rootDir + '/readme/desktop.md', rootDir + '/docs/desktop/index.html', { title: 'Desktop Application' }); + renderFileToHtml(rootDir + '/readme/donate.md', rootDir + '/docs/donate/index.html', { title: 'Donate' }); + renderFileToHtml(rootDir + '/readme/e2ee.md', rootDir + '/docs/e2ee/index.html', { title: 'End-To-End Encryption' }); + renderFileToHtml(rootDir + '/readme/faq.md', rootDir + '/docs/faq/index.html', { title: 'FAQ' }); + renderFileToHtml(rootDir + '/readme/mobile.md', rootDir + '/docs/mobile/index.html', { title: 'Mobile Application' }); + renderFileToHtml(rootDir + '/readme/spec.md', rootDir + '/docs/spec/index.html', { title: 'Specifications' }); + renderFileToHtml(rootDir + '/readme/stats.md', rootDir + '/docs/stats/index.html', { title: 'Statistics' }); + renderFileToHtml(rootDir + '/readme/terminal.md', rootDir + '/docs/terminal/index.html', { title: 'Terminal Application' }); } main().catch((error) => { diff --git a/docs/changelog/index.html b/docs/changelog/index.html index ee1860edb..4144ee3be 100644 --- a/docs/changelog/index.html +++ b/docs/changelog/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Changelog | Joplin diff --git a/docs/clipper/index.html b/docs/clipper/index.html index 3bd4aca44..6480d8d18 100644 --- a/docs/clipper/index.html +++ b/docs/clipper/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Web Clipper | Joplin diff --git a/docs/debugging/index.html b/docs/debugging/index.html index e43fe1c2b..3025fdd35 100644 --- a/docs/debugging/index.html +++ b/docs/debugging/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Debugging | Joplin diff --git a/docs/desktop/index.html b/docs/desktop/index.html index 545a79b34..1f074053f 100644 --- a/docs/desktop/index.html +++ b/docs/desktop/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Desktop Application | Joplin diff --git a/docs/donate/index.html b/docs/donate/index.html index 8a05cc960..fd1986ced 100644 --- a/docs/donate/index.html +++ b/docs/donate/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Donate | Joplin diff --git a/docs/e2ee/index.html b/docs/e2ee/index.html index 671415c4c..d5b74267d 100644 --- a/docs/e2ee/index.html +++ b/docs/e2ee/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + End-To-End Encryption | Joplin diff --git a/docs/faq/index.html b/docs/faq/index.html index 269d7d976..57b0747ac 100644 --- a/docs/faq/index.html +++ b/docs/faq/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + FAQ | Joplin diff --git a/docs/mobile/index.html b/docs/mobile/index.html index f02d99727..c7cd7220f 100644 --- a/docs/mobile/index.html +++ b/docs/mobile/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Mobile Application | Joplin diff --git a/docs/spec/index.html b/docs/spec/index.html index 839d27399..9acfb4794 100644 --- a/docs/spec/index.html +++ b/docs/spec/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Specifications | Joplin diff --git a/docs/stats/index.html b/docs/stats/index.html index b9f265de4..af8b25af2 100644 --- a/docs/stats/index.html +++ b/docs/stats/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Statistics | Joplin diff --git a/docs/terminal/index.html b/docs/terminal/index.html index bd21ead91..568cd17cc 100644 --- a/docs/terminal/index.html +++ b/docs/terminal/index.html @@ -1,7 +1,7 @@ - Joplin - an open source note taking and to-do application with synchronisation capabilities + Terminal Application | Joplin