+ /**
+ * Pushes the posts and archive to the remote
+ *
+ * @function syncUp
+ * @memberof Blog
+ * @return {Promise<undefined>} empty promise, returns no value
+ * @instance
+ */
+ async syncUp() {
+ internals.debuglog('Pushing remote state');
+ await ensureDirectoryExists(this.postsDirectory);
+ await Remote.syncUp(this.remoteConfig, this.blogDirectory)
+ internals.debuglog('Pushed remote state');
+ }
+
+ // Adds the passed path to slot 0, and generates files.
+
+ async _update(postLocation) {
+
+ const metadata = await this._getMetadata();
+ await ensureDirectoryExists(this.postsDirectory);
+ await this._copyPost(postLocation);
+ await this._writeMetadata(metadata);
+
+ await this._archive(postLocation);
+
+ await this.generate();
+ try {
+ await this.syncUp();
+ }
+ catch {};
+ }
+
+
+ // Parses Gemini for each page, copies assets and generates index.
+
+ async generate() {
+
+ internals.debuglog('Generating output');
+
+ const posts = await this._readPosts();
+
+ await StaticGenerator(this.postsDirectory, this.staticDirectory, posts);
+ await HTMLGenerator(this.templatesDirectory, this.staticDirectory, posts);
+ await RSSGenerator(this.templatesDirectory, this.staticDirectory, posts);
+ await TXTGenerator(this.templatesDirectory, this.staticDirectory, posts);