@anyblades/eleventy-blades 0.28.0-beta.2 → 0.28.0-beta.3
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/eleventy.config.js +11 -3
- package/src/admin/index.html +0 -12
package/package.json
CHANGED
package/src/eleventy.config.js
CHANGED
|
@@ -45,7 +45,9 @@ try {
|
|
|
45
45
|
}
|
|
46
46
|
/* Data */
|
|
47
47
|
import yaml from "js-yaml";
|
|
48
|
-
|
|
48
|
+
/* System */
|
|
49
|
+
import fs from "node:fs";
|
|
50
|
+
import path from "node:path";
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* Eleventy Configuration
|
|
@@ -58,7 +60,13 @@ export default function (eleventyConfig) {
|
|
|
58
60
|
/* Jekyll parity */
|
|
59
61
|
eleventyConfig.addPassthroughCopy("assets");
|
|
60
62
|
eleventyConfig.addGlobalData("layout", "default");
|
|
61
|
-
eleventyConfig.setLiquidOptions({
|
|
63
|
+
eleventyConfig.setLiquidOptions({
|
|
64
|
+
dynamicPartials: false, // allows unquoted Jekyll-style includes
|
|
65
|
+
root: [
|
|
66
|
+
inputDir + "_includes", // default
|
|
67
|
+
fs.realpathSync(path.resolve("./node_modules/@anyblades/blades/_includes")), // for symlinks to work after https://github.com/harttle/liquidjs/pull/870
|
|
68
|
+
],
|
|
69
|
+
});
|
|
62
70
|
eleventyConfig.addFilter("relative_url", (content) => content); // dummy
|
|
63
71
|
|
|
64
72
|
/* Plugins */
|
|
@@ -96,7 +104,7 @@ export default function (eleventyConfig) {
|
|
|
96
104
|
eleventyConfig.addCollection("feed", (collectionApi) => collectionApi.getAll().filter((item) => item.data.revised));
|
|
97
105
|
let siteData = {};
|
|
98
106
|
try {
|
|
99
|
-
siteData = yaml.load(readFileSync(`${inputDir}/_data/site.yml`, "utf8"));
|
|
107
|
+
siteData = yaml.load(fs.readFileSync(`${inputDir}/_data/site.yml`, "utf8"));
|
|
100
108
|
} catch (e) {
|
|
101
109
|
// _data/site.yml not found
|
|
102
110
|
}
|
package/src/admin/index.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!-- https://sveltiacms.app/en/docs/start#manual-installation -->
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<meta name="robots" content="noindex" />
|
|
7
|
-
<title>Sveltia CMS</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<script src="https://cdn.jsdelivr.net/npm/@sveltia/cms@0.128/dist/sveltia-cms.min.js"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|