diff --git a/lib/social-media-image-generator.cjs b/lib/social-media-image-generator.cjs index 1faebe8aca..57e211a499 100644 --- a/lib/social-media-image-generator.cjs +++ b/lib/social-media-image-generator.cjs @@ -146,7 +146,7 @@ class SocialMediaImageGenerator { }); await this.createImage(fileName, tempFile); - await this.createThumb(fileName, tempFile); + await this.createThumb(fileName); return; } diff --git a/themes/landscape/scripts/not-used/_obsolete_generator-meta.js b/scripts/_not-used/_obsolete_generator-meta.js similarity index 100% rename from themes/landscape/scripts/not-used/_obsolete_generator-meta.js rename to scripts/_not-used/_obsolete_generator-meta.js diff --git a/themes/landscape/scripts/not-used/tag-post-permalink.js b/scripts/_not-used/tag-post-permalink.js similarity index 100% rename from themes/landscape/scripts/not-used/tag-post-permalink.js rename to scripts/_not-used/tag-post-permalink.js diff --git a/themes/landscape/scripts/not-used/tag-pre-highlight.js b/scripts/_not-used/tag-pre-highlight.js similarity index 100% rename from themes/landscape/scripts/not-used/tag-pre-highlight.js rename to scripts/_not-used/tag-pre-highlight.js diff --git a/themes/landscape/scripts/not-used/tag-sample_fancybox.js b/scripts/_not-used/tag-sample_fancybox.js similarity index 100% rename from themes/landscape/scripts/not-used/tag-sample_fancybox.js rename to scripts/_not-used/tag-sample_fancybox.js diff --git a/themes/landscape/scripts/console-webmentions.js b/scripts/console/console-webmentions.js similarity index 100% rename from themes/landscape/scripts/console-webmentions.js rename to scripts/console/console-webmentions.js diff --git a/scripts/_test.js b/scripts/events/_test.js similarity index 100% rename from scripts/_test.js rename to scripts/events/_test.js diff --git a/scripts/on-generateBefore-get-dynamic-about.js b/scripts/events/on-generateBefore-get-dynamic-about.js similarity index 88% rename from scripts/on-generateBefore-get-dynamic-about.js rename to scripts/events/on-generateBefore-get-dynamic-about.js index 0be938aa93..eb549a9fb7 100644 --- a/scripts/on-generateBefore-get-dynamic-about.js +++ b/scripts/events/on-generateBefore-get-dynamic-about.js @@ -1,7 +1,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); -const { getMD, ensurePermaLink } = require("../lib/tools.cjs"); +const { getMD, ensurePermaLink } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("ABOUT") + " ..."); diff --git a/scripts/on-generateBefore-get-dynamic-apps.js b/scripts/events/on-generateBefore-get-dynamic-apps.js similarity index 94% rename from scripts/on-generateBefore-get-dynamic-apps.js rename to scripts/events/on-generateBefore-get-dynamic-apps.js index 1d95a62a93..0418904060 100644 --- a/scripts/on-generateBefore-get-dynamic-apps.js +++ b/scripts/events/on-generateBefore-get-dynamic-apps.js @@ -2,7 +2,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); const fs = require('hexo-fs'); -const { getMD, getHelpers } = require("../lib/tools.cjs"); +const { getMD, getHelpers } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("APPS") + " ..."); diff --git a/scripts/on-generateBefore-get-dynamic-blogroll.js b/scripts/events/on-generateBefore-get-dynamic-blogroll.js similarity index 96% rename from scripts/on-generateBefore-get-dynamic-blogroll.js rename to scripts/events/on-generateBefore-get-dynamic-blogroll.js index e2eddd732d..a957ba3c37 100644 --- a/scripts/on-generateBefore-get-dynamic-blogroll.js +++ b/scripts/events/on-generateBefore-get-dynamic-blogroll.js @@ -3,7 +3,7 @@ const { magenta } = require('chalk'); const path = require('path'); const fs = require('hexo-fs'); const front = require('hexo-front-matter'); -const { getMD, updateMDField } = require("../lib/tools.cjs"); +const { getMD, updateMDField } = require("../../lib/tools.cjs"); const _rootDir = hexo.source_dir.replace("source", ""); diff --git a/scripts/on-generateBefore-get-dynamic-console.js b/scripts/events/on-generateBefore-get-dynamic-console.js similarity index 90% rename from scripts/on-generateBefore-get-dynamic-console.js rename to scripts/events/on-generateBefore-get-dynamic-console.js index b2c5ce63e8..aa4de7b8f1 100644 --- a/scripts/on-generateBefore-get-dynamic-console.js +++ b/scripts/events/on-generateBefore-get-dynamic-console.js @@ -1,7 +1,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); -const { getMD } = require("../lib/tools.cjs"); +const { getMD } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("CONSOLE") + " ..."); diff --git a/scripts/on-generateBefore-get-dynamic-feeds.js b/scripts/events/on-generateBefore-get-dynamic-feeds.js similarity index 90% rename from scripts/on-generateBefore-get-dynamic-feeds.js rename to scripts/events/on-generateBefore-get-dynamic-feeds.js index e5ba1085b2..98a44446fc 100644 --- a/scripts/on-generateBefore-get-dynamic-feeds.js +++ b/scripts/events/on-generateBefore-get-dynamic-feeds.js @@ -1,7 +1,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); -const { getMD, getHelpers } = require("../lib/tools.cjs"); +const { getMD, getHelpers } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("FEEDS") + " ..."); diff --git a/scripts/on-generateBefore-get-dynamic-photos.js b/scripts/events/on-generateBefore-get-dynamic-photos.js similarity index 99% rename from scripts/on-generateBefore-get-dynamic-photos.js rename to scripts/events/on-generateBefore-get-dynamic-photos.js index a6bf856b40..9ee78a2308 100644 --- a/scripts/on-generateBefore-get-dynamic-photos.js +++ b/scripts/events/on-generateBefore-get-dynamic-photos.js @@ -3,7 +3,7 @@ const { magenta } = require('chalk'); const path = require('path'); const fs = require('hexo-fs'); const front = require('hexo-front-matter'); -const { getMD, updateMDField } = require("../lib/tools.cjs"); +const { getMD, updateMDField } = require("../../lib/tools.cjs"); const _rootDir = hexo.source_dir.replace("source", ""); diff --git a/scripts/on-generateBefore-get-dynamic-search.js b/scripts/events/on-generateBefore-get-dynamic-search.js similarity index 89% rename from scripts/on-generateBefore-get-dynamic-search.js rename to scripts/events/on-generateBefore-get-dynamic-search.js index 457350012d..e86e39a96b 100644 --- a/scripts/on-generateBefore-get-dynamic-search.js +++ b/scripts/events/on-generateBefore-get-dynamic-search.js @@ -1,7 +1,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); -const { getMD, getHelpers } = require("../lib/tools.cjs"); +const { getMD, getHelpers } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("SEARCH") + " ..."); diff --git a/scripts/on-generateBefore-get-dynamic-slashes.js b/scripts/events/on-generateBefore-get-dynamic-slashes.js similarity index 90% rename from scripts/on-generateBefore-get-dynamic-slashes.js rename to scripts/events/on-generateBefore-get-dynamic-slashes.js index e168290433..a0f5837c58 100644 --- a/scripts/on-generateBefore-get-dynamic-slashes.js +++ b/scripts/events/on-generateBefore-get-dynamic-slashes.js @@ -1,7 +1,7 @@ const log = require('hexo-log')({ debug: false, silent: false }); const { magenta } = require('chalk'); const path = require('path'); -const { getMD } = require("../lib/tools.cjs"); +const { getMD } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting Dynamic Page " + magenta("SLASHES") + " ..."); diff --git a/scripts/on-generateBefore-get-notes.js b/scripts/events/on-generateBefore-get-notes.js similarity index 99% rename from scripts/on-generateBefore-get-notes.js rename to scripts/events/on-generateBefore-get-notes.js index fa7452b1ed..f89da5fe22 100644 --- a/scripts/on-generateBefore-get-notes.js +++ b/scripts/events/on-generateBefore-get-notes.js @@ -4,7 +4,7 @@ const path = require("path"); const fs = require("hexo-fs"); const front = require("hexo-front-matter"); const moment = require("moment"); -const { getDataFromCardlinkCodeBlock, compileHandlebar } = require("../lib/tools.cjs"); +const { getDataFromCardlinkCodeBlock, compileHandlebar } = require("../../lib/tools.cjs"); hexo.on('generateBefore', function() { log.info("Getting " + magenta("NOTES") + " ..."); diff --git a/scripts/on-new-get-photo-for-post.js b/scripts/events/on-new-get-photo-for-post.js similarity index 90% rename from scripts/on-new-get-photo-for-post.js rename to scripts/events/on-new-get-photo-for-post.js index 992b6a8b1f..867a2b4ffe 100644 --- a/scripts/on-new-get-photo-for-post.js +++ b/scripts/events/on-new-get-photo-for-post.js @@ -7,7 +7,7 @@ const log = require('hexo-log')({ const front = require('hexo-front-matter'); const fs = require('hexo-fs'); -const photoSelector = require("../lib/photograph-selector.cjs").Selector; +const photoSelector = require("../../lib/photograph-selector.cjs").Selector; hexo.on('new', function(data) { @@ -23,7 +23,6 @@ hexo.on('new', function(data) { post.photograph.name = photo.name; post.photograph.link = photo.link; - let postStr = front.stringify(post); postStr = '---\n' + postStr; diff --git a/scripts/on-ready-generate-social-media-images.js b/scripts/events/on-ready-generate-social-media-images.js similarity index 77% rename from scripts/on-ready-generate-social-media-images.js rename to scripts/events/on-ready-generate-social-media-images.js index 91d2990d6c..a512eb7134 100644 --- a/scripts/on-ready-generate-social-media-images.js +++ b/scripts/events/on-ready-generate-social-media-images.js @@ -1,4 +1,4 @@ -const SocialMediaImageGenerator = require("../lib/social-media-image-generator.cjs").SocialMediaImageGenerator; +const SocialMediaImageGenerator = require("../../lib/social-media-image-generator.cjs").SocialMediaImageGenerator; hexo.on("ready", function() { diff --git a/scripts/filter-before-post-render-ensure-photograph.js b/scripts/filter/filter-before-post-render-ensure-photograph.js similarity index 89% rename from scripts/filter-before-post-render-ensure-photograph.js rename to scripts/filter/filter-before-post-render-ensure-photograph.js index 442d86f2f7..18eb79a708 100644 --- a/scripts/filter-before-post-render-ensure-photograph.js +++ b/scripts/filter/filter-before-post-render-ensure-photograph.js @@ -1,4 +1,4 @@ -const photoSelector = require("../lib/photograph-selector.cjs").Selector; +const photoSelector = require("../../lib/photograph-selector.cjs").Selector; const log = require('hexo-log')({ debug: false, diff --git a/themes/landscape/scripts/generator-dynamic-about.js b/scripts/generators/generator-dynamic-about.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-about.js rename to scripts/generators/generator-dynamic-about.js diff --git a/themes/landscape/scripts/generator-dynamic-apps.js b/scripts/generators/generator-dynamic-apps.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-apps.js rename to scripts/generators/generator-dynamic-apps.js diff --git a/themes/landscape/scripts/generator-dynamic-blogroll.js b/scripts/generators/generator-dynamic-blogroll.js similarity index 98% rename from themes/landscape/scripts/generator-dynamic-blogroll.js rename to scripts/generators/generator-dynamic-blogroll.js index 8a76dcb0db..a2197cd106 100644 --- a/themes/landscape/scripts/generator-dynamic-blogroll.js +++ b/scripts/generators/generator-dynamic-blogroll.js @@ -5,7 +5,7 @@ const axios = require('axios'); const fs = require("hexo-fs"); const feed2json = require('feed2json'); const handlebars = require("handlebars"); -const { getHelpers } = require("../../../lib/tools.cjs"); +const { getHelpers } = require("../../lib/tools.cjs"); const _helpers = getHelpers(hexo); const _rootDir = hexo.source_dir.replace("source", ""); diff --git a/themes/landscape/scripts/generator-dynamic-console.js b/scripts/generators/generator-dynamic-console.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-console.js rename to scripts/generators/generator-dynamic-console.js diff --git a/themes/landscape/scripts/generator-dynamic-feeds.js b/scripts/generators/generator-dynamic-feeds.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-feeds.js rename to scripts/generators/generator-dynamic-feeds.js diff --git a/themes/landscape/scripts/generator-dynamic-photos.js b/scripts/generators/generator-dynamic-photos.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-photos.js rename to scripts/generators/generator-dynamic-photos.js diff --git a/themes/landscape/scripts/generator-dynamic-search.js b/scripts/generators/generator-dynamic-search.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-search.js rename to scripts/generators/generator-dynamic-search.js diff --git a/themes/landscape/scripts/generator-dynamic-slashes.js b/scripts/generators/generator-dynamic-slashes.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-slashes.js rename to scripts/generators/generator-dynamic-slashes.js diff --git a/themes/landscape/scripts/generator-dynamic-trello.js b/scripts/generators/generator-dynamic-trello.js similarity index 100% rename from themes/landscape/scripts/generator-dynamic-trello.js rename to scripts/generators/generator-dynamic-trello.js diff --git a/themes/landscape/scripts/generator-feed-custom.js b/scripts/generators/generator-feed-custom.js similarity index 100% rename from themes/landscape/scripts/generator-feed-custom.js rename to scripts/generators/generator-feed-custom.js diff --git a/themes/landscape/scripts/generator-index.js b/scripts/generators/generator-index.js similarity index 100% rename from themes/landscape/scripts/generator-index.js rename to scripts/generators/generator-index.js diff --git a/themes/landscape/scripts/generator-notes.js b/scripts/generators/generator-notes.js similarity index 100% rename from themes/landscape/scripts/generator-notes.js rename to scripts/generators/generator-notes.js diff --git a/themes/landscape/scripts/generator-sitemap.js b/scripts/generators/generator-sitemap.js similarity index 98% rename from themes/landscape/scripts/generator-sitemap.js rename to scripts/generators/generator-sitemap.js index a0c9419856..4b7c3a089a 100644 --- a/themes/landscape/scripts/generator-sitemap.js +++ b/scripts/generators/generator-sitemap.js @@ -4,7 +4,7 @@ const path = require('path'); const axios = require('axios'); const fs = require("hexo-fs"); const handlebars = require("handlebars"); -const { getHelpers, getNewestDateString, ensurePermaLink } = require("../../../lib/tools.cjs"); +const { getHelpers, getNewestDateString, ensurePermaLink } = require("../../lib/tools.cjs"); const _helpers = getHelpers(hexo); const _rootDir = hexo.source_dir.replace("source", ""); diff --git a/themes/landscape/scripts/generator-wellknown-webfinger.js b/scripts/generators/generator-wellknown-webfinger.js similarity index 100% rename from themes/landscape/scripts/generator-wellknown-webfinger.js rename to scripts/generators/generator-wellknown-webfinger.js diff --git a/themes/landscape/scripts/helper-excerpt-plain.js b/scripts/helper/helper-excerpt-plain.js similarity index 100% rename from themes/landscape/scripts/helper-excerpt-plain.js rename to scripts/helper/helper-excerpt-plain.js diff --git a/themes/landscape/scripts/helper-is-anything.js b/scripts/helper/helper-is-anything.js similarity index 100% rename from themes/landscape/scripts/helper-is-anything.js rename to scripts/helper/helper-is-anything.js diff --git a/themes/landscape/scripts/helper-is-dynamic.js b/scripts/helper/helper-is-dynamic.js similarity index 100% rename from themes/landscape/scripts/helper-is-dynamic.js rename to scripts/helper/helper-is-dynamic.js diff --git a/themes/landscape/scripts/helper-json.js b/scripts/helper/helper-json.js similarity index 100% rename from themes/landscape/scripts/helper-json.js rename to scripts/helper/helper-json.js diff --git a/themes/landscape/scripts/helper-slugify.js b/scripts/helper/helper-slugify.js similarity index 100% rename from themes/landscape/scripts/helper-slugify.js rename to scripts/helper/helper-slugify.js diff --git a/themes/landscape/scripts/tag-alertbox.js b/scripts/tags/tag-alertbox.js similarity index 100% rename from themes/landscape/scripts/tag-alertbox.js rename to scripts/tags/tag-alertbox.js diff --git a/themes/landscape/scripts/tag-anchor.js b/scripts/tags/tag-anchor.js similarity index 100% rename from themes/landscape/scripts/tag-anchor.js rename to scripts/tags/tag-anchor.js diff --git a/themes/landscape/scripts/tag-anchorlist.js b/scripts/tags/tag-anchorlist.js similarity index 100% rename from themes/landscape/scripts/tag-anchorlist.js rename to scripts/tags/tag-anchorlist.js diff --git a/themes/landscape/scripts/tag-blockquote_alt.js b/scripts/tags/tag-blockquote_alt.js similarity index 100% rename from themes/landscape/scripts/tag-blockquote_alt.js rename to scripts/tags/tag-blockquote_alt.js diff --git a/themes/landscape/scripts/tag-blockquote_details.js b/scripts/tags/tag-blockquote_details.js similarity index 100% rename from themes/landscape/scripts/tag-blockquote_details.js rename to scripts/tags/tag-blockquote_details.js diff --git a/themes/landscape/scripts/tag-cardlink.js b/scripts/tags/tag-cardlink.js similarity index 96% rename from themes/landscape/scripts/tag-cardlink.js rename to scripts/tags/tag-cardlink.js index 01e865aec4..59a45693d6 100644 --- a/themes/landscape/scripts/tag-cardlink.js +++ b/scripts/tags/tag-cardlink.js @@ -13,7 +13,7 @@ -> see Obsidian Auto Card Links -> https://github.com/nekoshita/obsidian-auto-card-link */ -const { getDataFromCardlinkCodeBlock, compileHandlebar } = require("../../../lib/tools.cjs"); +const { getDataFromCardlinkCodeBlock, compileHandlebar } = require("../../lib/tools.cjs"); hexo.extend.tag.register("cardlink", function(args, content){ diff --git a/themes/landscape/scripts/tag-codepen.js b/scripts/tags/tag-codepen.js similarity index 100% rename from themes/landscape/scripts/tag-codepen.js rename to scripts/tags/tag-codepen.js diff --git a/themes/landscape/scripts/tag-codesandbox.js b/scripts/tags/tag-codesandbox.js similarity index 100% rename from themes/landscape/scripts/tag-codesandbox.js rename to scripts/tags/tag-codesandbox.js diff --git a/themes/landscape/scripts/tag-discovery.js b/scripts/tags/tag-discovery.js similarity index 100% rename from themes/landscape/scripts/tag-discovery.js rename to scripts/tags/tag-discovery.js diff --git a/themes/landscape/scripts/tag-download-link.js b/scripts/tags/tag-download-link.js similarity index 100% rename from themes/landscape/scripts/tag-download-link.js rename to scripts/tags/tag-download-link.js diff --git a/themes/landscape/scripts/tag-feed-link.js b/scripts/tags/tag-feed-link.js similarity index 100% rename from themes/landscape/scripts/tag-feed-link.js rename to scripts/tags/tag-feed-link.js diff --git a/themes/landscape/scripts/tag-feed-microformats.js b/scripts/tags/tag-feed-microformats.js similarity index 100% rename from themes/landscape/scripts/tag-feed-microformats.js rename to scripts/tags/tag-feed-microformats.js diff --git a/themes/landscape/scripts/tag-github-readme.js b/scripts/tags/tag-github-readme.js similarity index 100% rename from themes/landscape/scripts/tag-github-readme.js rename to scripts/tags/tag-github-readme.js diff --git a/themes/landscape/scripts/tag-github-user-and-repo-card.js b/scripts/tags/tag-github-user-and-repo-card.js similarity index 100% rename from themes/landscape/scripts/tag-github-user-and-repo-card.js rename to scripts/tags/tag-github-user-and-repo-card.js diff --git a/themes/landscape/scripts/tag-image-compare.js b/scripts/tags/tag-image-compare.js similarity index 100% rename from themes/landscape/scripts/tag-image-compare.js rename to scripts/tags/tag-image-compare.js diff --git a/themes/landscape/scripts/tag-image-link.js b/scripts/tags/tag-image-link.js similarity index 100% rename from themes/landscape/scripts/tag-image-link.js rename to scripts/tags/tag-image-link.js diff --git a/themes/landscape/scripts/tag-image-masonry.js b/scripts/tags/tag-image-masonry.js similarity index 100% rename from themes/landscape/scripts/tag-image-masonry.js rename to scripts/tags/tag-image-masonry.js diff --git a/themes/landscape/scripts/tag-image-slide.js b/scripts/tags/tag-image-slide.js similarity index 100% rename from themes/landscape/scripts/tag-image-slide.js rename to scripts/tags/tag-image-slide.js diff --git a/themes/landscape/scripts/tag-indienews-link.js b/scripts/tags/tag-indienews-link.js similarity index 100% rename from themes/landscape/scripts/tag-indienews-link.js rename to scripts/tags/tag-indienews-link.js diff --git a/themes/landscape/scripts/tag-indiepen.js b/scripts/tags/tag-indiepen.js similarity index 100% rename from themes/landscape/scripts/tag-indiepen.js rename to scripts/tags/tag-indiepen.js diff --git a/themes/landscape/scripts/tag-match-grid.js b/scripts/tags/tag-match-grid.js similarity index 100% rename from themes/landscape/scripts/tag-match-grid.js rename to scripts/tags/tag-match-grid.js diff --git a/themes/landscape/scripts/tag-moreinfo.js b/scripts/tags/tag-moreinfo.js similarity index 100% rename from themes/landscape/scripts/tag-moreinfo.js rename to scripts/tags/tag-moreinfo.js diff --git a/themes/landscape/scripts/tag-photo-list.js b/scripts/tags/tag-photo-list.js similarity index 100% rename from themes/landscape/scripts/tag-photo-list.js rename to scripts/tags/tag-photo-list.js diff --git a/themes/landscape/scripts/tag-photo-masonry.js b/scripts/tags/tag-photo-masonry.js similarity index 100% rename from themes/landscape/scripts/tag-photo-masonry.js rename to scripts/tags/tag-photo-masonry.js diff --git a/themes/landscape/scripts/tag-project-links.js b/scripts/tags/tag-project-links.js similarity index 100% rename from themes/landscape/scripts/tag-project-links.js rename to scripts/tags/tag-project-links.js diff --git a/themes/landscape/scripts/tag-source.js b/scripts/tags/tag-source.js similarity index 100% rename from themes/landscape/scripts/tag-source.js rename to scripts/tags/tag-source.js diff --git a/themes/landscape/scripts/tag-thinkbox.js b/scripts/tags/tag-thinkbox.js similarity index 100% rename from themes/landscape/scripts/tag-thinkbox.js rename to scripts/tags/tag-thinkbox.js diff --git a/themes/landscape/scripts/tag-video.js b/scripts/tags/tag-video.js similarity index 100% rename from themes/landscape/scripts/tag-video.js rename to scripts/tags/tag-video.js