summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/generate/site/index.js4
-rw-r--r--package.json2
-rw-r--r--theme/javascript/utils/analytic.js5
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js
index 84a0d2f..487b6d6 100644
--- a/lib/generate/site/index.js
+++ b/lib/generate/site/index.js
@@ -77,8 +77,8 @@ Generator.prototype.convertFile = function(content, _input) {
Generator.prototype.finish = function() {
var that = this;
- return fs.symlink(
- 'README.html',
+ return fs.copy(
+ path.join(that.options.output, 'README.html'),
path.join(that.options.output, 'index.html')
)
.then(function() {
diff --git a/package.json b/package.json
index 45d4571..8a6f7b1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gitbook",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
"dependencies": {
diff --git a/theme/javascript/utils/analytic.js b/theme/javascript/utils/analytic.js
index cfd0dac..1d6fcd6 100644
--- a/theme/javascript/utils/analytic.js
+++ b/theme/javascript/utils/analytic.js
@@ -9,7 +9,10 @@ define([
});
var isAvailable = function() {
- return (typeof mixpanel !== "undefined");
+ return (
+ typeof mixpanel !== "undefined" &&
+ typeof mixpanel.track === "function"
+ );
};
var track = function(e, data) {