From 4e4f74244bd19713ea62e98b1922cc93d2554e49 Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Sun, 22 Jan 2023 15:22:57 +0200 Subject: [PATCH] fix: use permalink from template config --- src/generators/output/to-disk.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/output/to-disk.js b/src/generators/output/to-disk.js index 630a4095..fedbc12a 100644 --- a/src/generators/output/to-disk.js +++ b/src/generators/output/to-disk.js @@ -139,7 +139,7 @@ module.exports = async (env, spinner, config) => { ...config.events }) - const destination = config.permalink || file + const destination = get(compiled, 'config.permalink', file) /** * Generate plaintext @@ -150,7 +150,7 @@ module.exports = async (env, spinner, config) => { // Check if plaintext: true globally, fallback to template's front matter const plaintextConfig = get(templateConfig, 'plaintext', get(compiled.config, 'plaintext', false)) - const plaintextPath = get(plaintextConfig, 'destination.path', config.permalink || file) + const plaintextPath = get(plaintextConfig, 'destination.path', destination) if (Boolean(plaintextConfig) || !isEmpty(plaintextConfig)) { await Plaintext