Skip to content

Commit

Permalink
Add pages path and return original config
Browse files Browse the repository at this point in the history
  • Loading branch information
rphillips-nz committed Jul 1, 2021
1 parent 6dae47d commit 393ac1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = function (eleventyConfig, defaultConfig = {}) {
dir: {
input: defaultConfig.dir?.input ?? '.',
data: defaultConfig.dir?.data ?? '_data', // relative to input
pages: defaultConfig.dir?.pages ?? '', // relative to input
includes: defaultConfig.dir?.includes ?? '_includes', // relative to input
layouts: defaultConfig.dir?.layouts ?? '_includes', // relative to input
}
Expand Down
2 changes: 2 additions & 0 deletions cloudcannon/info.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ eleventyExcludeFromCollections: true
permalink: /_cloudcannon/info.json
---
{%- set inputPath %}{% ccPath 'input' %}{% endset -%}
{%- set pagesPath %}{% ccPath 'pages' %}{% endset -%}
{%- set dataPath %}{% ccPath 'data' %}{% endset -%}
{%- set includesPath %}{% ccPath 'includes' %}{% endset -%}
{%- set layoutsPath %}{% ccPath 'layouts' %}{% endset -%}
Expand Down Expand Up @@ -75,6 +76,7 @@ permalink: /_cloudcannon/info.json
{% if cloudcannon.uploads_dir %}
"uploads": "{{ cloudcannon.uploads_dir }}",
{% endif %}
"pages": {{ pagesPath | ccJsonify | safe }},
"data": {{ dataPath | ccJsonify | safe }},
"collections": "",
"includes": {{ includesPath | ccJsonify | safe }},
Expand Down
1 change: 1 addition & 0 deletions cloudcannon/inject-cloudcannon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ module.exports = function (eleventyConfig) {

const config = defaultConfig?.apply(this, arguments);
eleventyConfig.addPlugin(pluginCloudCannon, eleventyConfig.cloudcannonOptions ?? config);
return config;
};

0 comments on commit 393ac1f

Please sign in to comment.