+ async publish(host) {
+
+ internals.debuglog(`Publishing to ${host}`);
+ try {
+ await internals.exec('which rsync');
+ }
+ catch (err) {
+ console.error('Please install and configure rsync to publish.');
+ }
+
+ try {
+ internals.debuglog(`Copying ephemeral blog from ${this.blogOutputDirectory}`);
+ await internals.exec(`rsync -r ${this.blogOutputDirectory}/ ${host}`);
+ }
+ catch (err) {
+ console.error('Failed to publish');
+ console.error(err.stderr);
+ }
+
+ internals.debuglog('Finished publishing');
+ }
+
+ /**
+ * Publishes the archive to a host using rsync. Currently assumes
+ * gemlog archive.
+ *
+ * @function publishArchive
+ * @memberof Blog
+ * @return {Promise<undefined>} empty promise, returns no value
+ * @instance
+ */
+ async publishArchive(host) {
+
+ internals.debuglog(`Publishing archive to ${host}`);
+ try {
+ await internals.exec('which rsync');
+ }
+ catch (err) {
+ console.error('Please install rsync to publish the archive.');
+ }
+
+ try {
+ internals.debuglog(`Copying archive from ${this.archiveOutputDirectory}`);
+ await internals.exec(`rsync -r ${this.archiveOutputDirectory}/ ${host}`);
+ }
+ catch (err) {
+ console.error('Failed to publish archive');
+ console.error(err.stderr);
+ }
+
+ internals.debuglog('Finished publishing');
+ }
+
+ /**
+ * Adds a remote
+ *
+ * @function addRemote
+ * @memberof Blog
+ * @return {Promise<undefined>} empty promise, returns no value
+ * @instance
+ */
+ async addRemote(remote) {
+
+ await ensureDirectoryExists(this.configDirectory);
+ await Remote.add(this.remoteConfig, remote);
+ }
+
+ /**
+ * Removes a remote
+ *
+ * @function removeRemote
+ * @memberof Blog
+ * @return {Promise<undefined>} empty promise, returns no value
+ * @instance
+ */
+ async removeRemote() {