From 9341b9d6407447803731acf019976dc7b0859ea1 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 21 Nov 2015 02:26:59 +0200 Subject: [PATCH 1/4] Make links to docs, point to the correct version - Links to docs in the default app, pointed to the docs in the master branch. I changed them to point to the docs that match Electron's version. - Added Electron's version to the header of the default app, so it will be easier to figure out what version is currently running. --- atom/browser/default_app/index.html | 20 +++++++++++++++++--- atom/browser/default_app/main.js | 12 ++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/atom/browser/default_app/index.html b/atom/browser/default_app/index.html index e55cdf77b7f..ec16a38bc42 100644 --- a/atom/browser/default_app/index.html +++ b/atom/browser/default_app/index.html @@ -76,7 +76,11 @@ }; -

Welcome to Electron

+

+ +

To run your app with Electron, execute the following command under your @@ -87,8 +91,18 @@

The path-to-your-app should be the path to your own Electron - app, you can read the quick start - guide in Electron's docs + app, you can read the + + guide in Electron's + on how to write one.

diff --git a/atom/browser/default_app/main.js b/atom/browser/default_app/main.js index 3916cfb2884..49016c05ad2 100644 --- a/atom/browser/default_app/main.js +++ b/atom/browser/default_app/main.js @@ -148,7 +148,11 @@ app.once('ready', function() { }, { label: 'Documentation', - click: function() { shell.openExternal('https://github.com/atom/electron/tree/master/docs#readme') } + click: function() { + shell.openExternal( + `https://github.com/atom/electron/tree/v${process.versions.electron}/docs#readme` + ) + } }, { label: 'Community Discussions', @@ -249,7 +253,11 @@ if (option.file && !option.webdriver) { } catch(e) { if (e.code == 'MODULE_NOT_FOUND') { app.focus(); - dialog.showErrorBox('Error opening app', 'The app provided is not a valid electron app, please read the docs on how to write one:\nhttps://github.com/atom/electron/tree/master/docs\n\n' + e.toString()); + dialog.showErrorBox( + 'Error opening app', + 'The app provided is not a valid Electron app, please read the docs on how to write one:\n' + + `https://github.com/atom/electron/tree/v${process.versions.electron}/docs\n\n${e.toString()}` + ); process.exit(1); } else { console.error('App threw an error when running', e); From 4d4bb0a73e2fd01347dfe569d177e56572ed23da Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 21 Nov 2015 02:32:53 +0200 Subject: [PATCH 2/4] Added ctags cache files to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b8a221c9e52..eb9aedb4e2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.tags* /.idea/ /build/ /dist/ From 5730d588d0debf86d25781d540c7e6c8aee5bb0d Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 21 Nov 2015 03:31:52 +0200 Subject: [PATCH 3/4] Add a note to readme about docs versioning Added a note to readme about using the correct docs version. Hopefully this will reduce users confusion. --- docs/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/README.md b/docs/README.md index 208ff8bf47b..a1c8526e6ef 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,10 @@ +Please make sure that you use the documents that match your Electron version. +The version number should be a part of the URL. If it's not, you are probably +using the documentation of a development branch which may contain API changes +that are not compatible with your Electron version. +When in doubt, run Electron without supplying an app path, and click on the +`docs` link. + ## Guides * [Supported Platforms](tutorial/supported-platforms.md) From df8cc85d2c207e0e5f33de59e32079f4e9f5d7f1 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 21 Nov 2015 04:22:16 +0200 Subject: [PATCH 4/4] Rephrased the note --- docs/README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index a1c8526e6ef..9b6372524bd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,9 +1,11 @@ Please make sure that you use the documents that match your Electron version. -The version number should be a part of the URL. If it's not, you are probably -using the documentation of a development branch which may contain API changes -that are not compatible with your Electron version. -When in doubt, run Electron without supplying an app path, and click on the -`docs` link. +The version number should be a part of the page URL. If it's not, you are +probably using the documentation of a development branch which may contain API +changes that are not compatible with your Electron version. If that's the case, +you can switch to a different version of the documentation at the +[available versions](http://electron.atom.io/docs/) list on atom.io, or if +you're using the GitHub interface, open the "Switch branches/tags" dropdown and +select the tag that matches your version. ## Guides