From ddbfd998591ca0a1e0b04d43c51c3e035fb8c9ba Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 22:06:09 +0100
Subject: [PATCH 1/7] Improved about page
---
app/src/components/About.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/src/components/About.vue b/app/src/components/About.vue
index 9bd764fcb..4c327b63b 100644
--- a/app/src/components/About.vue
+++ b/app/src/components/About.vue
@@ -23,6 +23,10 @@
Open Source project and other Open Source Software.
+
+ We do not collect any personal data while you use Publii app; also we do not store, we do not track, we do not allow third parties to collect personally identifiable information about you.
+
+
Licensing information
From d5f67211b7ab1e697e3187d53ab56703372cae20 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 22:11:39 +0100
Subject: [PATCH 2/7] Improved about page p.2
---
app/src/components/About.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/components/About.vue b/app/src/components/About.vue
index 4c327b63b..cf3e17e39 100644
--- a/app/src/components/About.vue
+++ b/app/src/components/About.vue
@@ -19,7 +19,7 @@
Copyright 2019 TidyCustoms. All rights reserved.
- Publli is designed and maintained by core team with cooperation with Dev Zen and is made possible by the Electron
+ Publli is designed and maintained by core team with cooperation with Dev Zen and is made possible by the Electron
Open Source project and other Open Source Software.
From 2ae504bdea48484364ce0ffa18007da51e567310 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 22:13:41 +0100
Subject: [PATCH 3/7] #330 - fixed issue with js error while testing a
connection (FTP/SFTP)
---
app/back-end/builddata.json | 2 +-
app/back-end/modules/deploy/ftp.js | 27 +++++++++++++++++-----
app/back-end/modules/deploy/sftp.js | 36 +++++++++++++++++++++++------
3 files changed, 51 insertions(+), 14 deletions(-)
diff --git a/app/back-end/builddata.json b/app/back-end/builddata.json
index 83d200c47..52a642e2a 100644
--- a/app/back-end/builddata.json
+++ b/app/back-end/builddata.json
@@ -1 +1 @@
-{"version":"0.33.1","build":11516,"status":"Beta"}
\ No newline at end of file
+{"version":"0.33.1","build":11518,"status":"Beta"}
\ No newline at end of file
diff --git a/app/back-end/modules/deploy/ftp.js b/app/back-end/modules/deploy/ftp.js
index c386de0f4..3254115ad 100644
--- a/app/back-end/modules/deploy/ftp.js
+++ b/app/back-end/modules/deploy/ftp.js
@@ -476,19 +476,24 @@ class FTP {
pasvTimeout: 10000
};
- fs.writeFileSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')), 'It is a test file. You can remove it.');
+ let testFilePath = normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test'));
+ fs.writeFileSync(testFilePath, 'It is a test file. You can remove it.');
client.connect(connectionParams);
client.on('ready', () => {
waitForTimeout = false;
client.put(
- normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')),
+ normalizePath(testFilePath),
normalizePath(path.join(deploymentConfig.path, 'publii.test')),
(err) => {
if (err) {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.destroy();
return;
}
@@ -498,13 +503,21 @@ class FTP {
(err) => {
if (err) {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.destroy();
return;
}
app.mainWindow.webContents.send('app-deploy-test-success');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.destroy();
}
);
@@ -512,7 +525,9 @@ class FTP {
);
});
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
client.on('error', function(err) {
if(waitForTimeout) {
diff --git a/app/back-end/modules/deploy/sftp.js b/app/back-end/modules/deploy/sftp.js
index ebb8c4b36..69744a0db 100644
--- a/app/back-end/modules/deploy/sftp.js
+++ b/app/back-end/modules/deploy/sftp.js
@@ -366,18 +366,24 @@ class SFTP {
connectionSettings.privateKey = fs.readFileSync(keyPath);
}
+ let testFilePath = normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test'));
+
client.connect(connectionSettings).then(() => {
return client.list('/');
}).then(data => {
- fs.writeFileSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')), 'It is a test file. You can remove it.');
+ fs.writeFileSync(testFilePath, 'It is a test file. You can remove it.');
client.put(
- normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')),
+ testFilePath,
normalizePath(path.join(deploymentConfig.path, 'publii.test'))
).then(err => {
if (err) {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.end();
return;
}
@@ -387,22 +393,38 @@ class SFTP {
).then(err => {
if (err) {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.end();
return;
}
app.mainWindow.webContents.send('app-deploy-test-success');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.end();
}).catch(err => {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.end();
});
}).catch(err => {
app.mainWindow.webContents.send('app-deploy-test-write-error');
- fs.unlinkSync(normalizePath(path.join(app.sitesDir, siteName, 'input', 'publii.test')));
+
+ if (fs.existsSync(testFilePath)) {
+ fs.unlinkSync(testFilePath);
+ }
+
client.end();
});
From e234c6e636c58bd08e38f4823a750720da4a8353 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 22:19:41 +0100
Subject: [PATCH 4/7] #323 - added code to hide author on JSON-LD if author is
disabled to be displayed on post
---
app/back-end/builddata.json | 2 +-
.../render-html/handlebars/helpers/json-ld.js | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/app/back-end/builddata.json b/app/back-end/builddata.json
index 52a642e2a..37518839b 100644
--- a/app/back-end/builddata.json
+++ b/app/back-end/builddata.json
@@ -1 +1 @@
-{"version":"0.33.1","build":11518,"status":"Beta"}
\ No newline at end of file
+{"version":"0.33.1","build":11519,"status":"Beta"}
\ No newline at end of file
diff --git a/app/back-end/modules/render-html/handlebars/helpers/json-ld.js b/app/back-end/modules/render-html/handlebars/helpers/json-ld.js
index 75e1aee0d..6465f68f6 100644
--- a/app/back-end/modules/render-html/handlebars/helpers/json-ld.js
+++ b/app/back-end/modules/render-html/handlebars/helpers/json-ld.js
@@ -126,10 +126,14 @@ function jsonLDHelper(rendererInstance, Handlebars) {
}
jsonLDObject['description'] = context.data.root.post.excerpt;
- jsonLDObject['author'] = {
- "@type": "Person",
- "name": context.data.root.post.author.name
- };
+
+ if (context.data.config.post.displayAuthor) {
+ jsonLDObject['author'] = {
+ "@type": "Person",
+ "name": context.data.root.post.author.name
+ };
+ }
+
jsonLDObject['publisher'] = {
"@type": "Organization",
"name": context.data.root.siteOwner.name
From 267bac087ec9f8dc13ebb3b4ee09b4b7984ad7b2 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 22:41:49 +0100
Subject: [PATCH 5/7] #329 - fixed issue with displaying posts on author pages
---
app/back-end/author.js | 6 +++---
app/back-end/builddata.json | 2 +-
app/back-end/modules/render-html/contexts/author.js | 4 ++--
app/back-end/modules/render-html/renderer-context.js | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/back-end/author.js b/app/back-end/author.js
index 44a4f26be..8819adff9 100644
--- a/app/back-end/author.js
+++ b/app/back-end/author.js
@@ -190,14 +190,14 @@ class Author extends Model {
}
let authorsSqlQuery = this.db.prepare(`DELETE FROM authors WHERE id = @id`);
- let postsSqlQuery = this.db.prepare(`UPDATE posts SET authors = "1" WHERE authors = @id`);
+ let postsSqlQuery = this.db.prepare(`UPDATE posts SET authors = "1" WHERE authors LIKE @id`);
authorsSqlQuery.run({
- id: this.id
+ id: this.id.toString()
});
postsSqlQuery.run({
- id: '"' + this.id + '"'
+ id: this.id.toString()
});
return {
diff --git a/app/back-end/builddata.json b/app/back-end/builddata.json
index 37518839b..7927f8b8e 100644
--- a/app/back-end/builddata.json
+++ b/app/back-end/builddata.json
@@ -1 +1 @@
-{"version":"0.33.1","build":11519,"status":"Beta"}
\ No newline at end of file
+{"version":"0.33.1","build":11522,"status":"Beta"}
\ No newline at end of file
diff --git a/app/back-end/modules/render-html/contexts/author.js b/app/back-end/modules/render-html/contexts/author.js
index 582c14de8..3c42eab40 100644
--- a/app/back-end/modules/render-html/contexts/author.js
+++ b/app/back-end/modules/render-html/contexts/author.js
@@ -42,7 +42,7 @@ class RendererContextAuthor extends RendererContext {
status NOT LIKE "%hidden%" AND
status NOT LIKE "%trashed%" AND
${includeFeaturedPosts}
- authors = @authorID
+ authors LIKE @authorID
ORDER BY
${this.postsOrdering}
LIMIT
@@ -50,7 +50,7 @@ class RendererContextAuthor extends RendererContext {
OFFSET
@offset
`).all({
- authorID: this.authorID,
+ authorID: this.authorID.toString(),
postsNumber: this.postsNumber,
offset: this.offset
});
diff --git a/app/back-end/modules/render-html/renderer-context.js b/app/back-end/modules/render-html/renderer-context.js
index abb6109c5..00354cbc6 100644
--- a/app/back-end/modules/render-html/renderer-context.js
+++ b/app/back-end/modules/render-html/renderer-context.js
@@ -409,11 +409,11 @@ class RendererContext {
status LIKE "%published%" AND
status NOT LIKE "%hidden%" AND
status NOT LIKE "%trashed%" AND
- authors = @authorID
+ authors LIKE @authorID
ORDER BY
${postsOrdering}
`).all({
- authorID: authorID
+ authorID: authorID.toString()
});
posts = posts.map(post => this.renderer.cachedItems.posts[post.id]);
From 14592bc32eb2faebea38d21b3e52d9fa53f91c98 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 23:05:11 +0100
Subject: [PATCH 6/7] Added more debug info
---
app/back-end/image.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/back-end/image.js b/app/back-end/image.js
index 2b92bed75..ddd3d7e47 100644
--- a/app/back-end/image.js
+++ b/app/back-end/image.js
@@ -254,7 +254,7 @@ class Image extends Model {
finalHeight = Jimp.AUTO;
}
}
-
+
if(finalWidth === 'auto') {
finalWidth = null;
@@ -271,6 +271,7 @@ class Image extends Model {
reject(err);
}
+ console.log('JIMP COVER', finalWidth, ' x ', finalHeight);
image.cover(finalWidth, finalHeight)
.quality(imagesQuality)
.write(destinationPath, function() {
@@ -319,6 +320,7 @@ class Image extends Model {
reject(err);
}
+ console.log('JIMP SCALE TO FIT', finalWidth, ' x ', finalHeight);
image.scaleToFit(finalWidth, finalHeight)
.quality(imagesQuality)
.write(destinationPath, function() {
From dd1315bda6687e7322453e06ec2d94bbd2757584 Mon Sep 17 00:00:00 2001
From: Tomasz Dziuda
Date: Mon, 18 Feb 2019 23:08:38 +0100
Subject: [PATCH 7/7] Bump version to 0.33.2
---
README.md | 2 +-
app/back-end/builddata.json | 2 +-
app/package-lock.json | 2 +-
app/package.json | 2 +-
package-lock.json | 2 +-
package.json | 4 ++--
publii.iss | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index d1b86f7cf..45634c0ae 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
[Publii](https://getpublii.com/) is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast
and hassle-free, even for beginners.
-**Current version: 0.33.1 (build 11516)**
+**Current version: 0.33.2 (build 11522)**
## Why Publii?
Unlike static-site generators that are often unwieldy and difficult to use, Publii provides an
diff --git a/app/back-end/builddata.json b/app/back-end/builddata.json
index 7927f8b8e..0fb92aff1 100644
--- a/app/back-end/builddata.json
+++ b/app/back-end/builddata.json
@@ -1 +1 @@
-{"version":"0.33.1","build":11522,"status":"Beta"}
\ No newline at end of file
+{"version":"0.33.2","build":11522,"status":"Beta"}
diff --git a/app/package-lock.json b/app/package-lock.json
index 2a5996a51..0bbcbba29 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "Publii",
- "version": "0.33.1",
+ "version": "0.33.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/app/package.json b/app/package.json
index 459394749..4e2b1461b 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,7 +1,7 @@
{
"productName": "Publii",
"name": "Publii",
- "version": "0.33.1",
+ "version": "0.33.2",
"description": "Static Site CMS",
"main": "main.js",
"scripts": {
diff --git a/package-lock.json b/package-lock.json
index 538bb919f..1e7b9dc5b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "Publii",
- "version": "0.33.1",
+ "version": "0.33.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index b85fe4551..3d240861f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"productName": "Publii",
"name": "Publii",
- "version": "0.33.1",
+ "version": "0.33.2",
"description": "Static Site CMS",
"homepage": "https://getpublii.com",
"author": {
@@ -17,7 +17,7 @@
"build": "cross-env NODE_ENV=development gulp build",
"start": "electron app/main.js --enable-logging",
"test": "mocha app/js/**/*.spec.js --reporter dot",
- "packager:win": "cross-env NODE_ENV=production electron-packager ./app Publii --platform=win32 --arch=x64 --asar.unpack=\"*.+(dylib|node|dll)\" --asar.unpackDir=\"default-files/default-themes/**/*\" --ignore=app/node_modules/electron-* --ignore=app/node_modules/devtron --ignore=app/node_modules/accessibility-developer-tools --ignore=app/node_modules/babel* --ignore=app/node_modules/asn1 --ignore=app/node_modules/postcss* --electron-version=3.1.3 --overwrite --symlinks --app-version=0.33.1 --icon=app/src/assets/installation/icon.ico --app-bundle-id=TidyCustoms --helper-bundle-id=TidyCustoms --version-string.CompanyName=\"TidyCustoms\" --version-string.ProductName=Publii --version-string.FileDescription=Publii --version-string.LegalCopyright=\"Copyright (C) 2018 TidyCustoms. All rights reserved.\" --version-string.ProductVersion=0.33.1 --version-string.FileVersion=0.33.1 --version-string.InternalName=Publii --version-string.OriginalFilename=Publii",
+ "packager:win": "cross-env NODE_ENV=production electron-packager ./app Publii --platform=win32 --arch=x64 --asar.unpack=\"*.+(dylib|node|dll)\" --asar.unpackDir=\"default-files/default-themes/**/*\" --ignore=app/node_modules/electron-* --ignore=app/node_modules/devtron --ignore=app/node_modules/accessibility-developer-tools --ignore=app/node_modules/babel* --ignore=app/node_modules/asn1 --ignore=app/node_modules/postcss* --electron-version=3.1.3 --overwrite --symlinks --app-version=0.33.2 --icon=app/src/assets/installation/icon.ico --app-bundle-id=TidyCustoms --helper-bundle-id=TidyCustoms --version-string.CompanyName=\"TidyCustoms\" --version-string.ProductName=Publii --version-string.FileDescription=Publii --version-string.LegalCopyright=\"Copyright (C) 2018 TidyCustoms. All rights reserved.\" --version-string.ProductVersion=0.33.2 --version-string.FileVersion=0.33.2 --version-string.InternalName=Publii --version-string.OriginalFilename=Publii",
"packager:osx": "cross-env NODE_ENV=production electron-packager ./app Publii --platform=darwin --arch=x64 --asar.unpack=\"*.+(dylib|node|dll)\" --asar.unpackDir=\"default-files/default-themes/**/*\" --ignore=app/node_modules/electron-* --electron-version=3.1.3 --ignore=app/node_modules/devtron --ignore=app/node_modules/accessibility-developer-tools --ignore=app/node_modules/babel* --ignore=app/node_modules/asn1 --ignore=app/node_modules/postcss* --overwrite --symlinks --icon app/src/assets/installation/icon.icns --osx-sign; electron-osx-flat Publii-darwin-x64/Publii.app",
"packager:linux": "cross-env NODE_ENV=production electron-packager ./app Publii --platform=linux --arch=x64 --asar.unpack=\"*.+(dylib|node|dll)\" --asar.unpackDir=\"default-files/default-themes/**/*\" --ignore=app/node_modules/electron-* --electron-version=3.1.3 --ignore=app/node_modules/devtron --ignore=app/node_modules/accessibility-developer-tools --ignore=app/node_modules/babel* --ignore=app/node_modules/asn1 --ignore=app/node_modules/postcss* --overwrite --symlinks",
"postinstall": "opencollective postinstall",
diff --git a/publii.iss b/publii.iss
index 8b8072def..136782b52 100644
--- a/publii.iss
+++ b/publii.iss
@@ -11,7 +11,7 @@ Type: filesandordirs; Name: "{app}\resources";
[Setup]
AppName=Publii
-AppVersion=0.33.1
+AppVersion=0.33.2
DefaultDirName={pf}\Publii
DefaultGroupName=Publii
UninstallDisplayIcon={app}\Publii.exe