@slybridges/kiss 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/data/computeMeta.js +4 -3
package/package.json
CHANGED
package/src/data/computeMeta.js
CHANGED
|
@@ -47,7 +47,7 @@ const computeIsPost = ({ content, isPost }) => isPost || !!content
|
|
|
47
47
|
|
|
48
48
|
computeIsPost.kissDependencies = ["content", "isPost"]
|
|
49
49
|
|
|
50
|
-
const computeOutputPath = ({ permalink }, config) => {
|
|
50
|
+
const computeOutputPath = ({ permalink, _meta }, config) => {
|
|
51
51
|
if (!permalink) {
|
|
52
52
|
return null
|
|
53
53
|
}
|
|
@@ -56,13 +56,14 @@ const computeOutputPath = ({ permalink }, config) => {
|
|
|
56
56
|
if (outputPath.endsWith("/")) {
|
|
57
57
|
return path.join(outputPath, "index.html")
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
// don't rely on path.extname because permalink can include dots
|
|
60
|
+
if (_meta.outputType === "HTML" && !outputPath.endsWith(".html")) {
|
|
60
61
|
return outputPath + ".html"
|
|
61
62
|
}
|
|
62
63
|
return outputPath
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
computeOutputPath.kissDependencies = ["permalink"]
|
|
66
|
+
computeOutputPath.kissDependencies = ["permalink", "_meta.outputType"]
|
|
66
67
|
|
|
67
68
|
module.exports = {
|
|
68
69
|
computeAscendants: computeAscendants,
|