diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-08 21:01:15 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-08 21:01:15 -0300 |
commit | 42a81b7172c856ad611431ef7d7b468d5b1ffbfd (patch) | |
tree | ab343a6c25699b41c41ec369fa7a5ca69e793fe3 /src/content/dependencies/linkPathFromRoot.js | |
parent | 6645e6e8e0e58c59d1660767181bb32efbf7930a (diff) |
content: transformContent: support [[site/media/root:path]]
Diffstat (limited to 'src/content/dependencies/linkPathFromRoot.js')
-rw-r--r-- | src/content/dependencies/linkPathFromRoot.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/content/dependencies/linkPathFromRoot.js b/src/content/dependencies/linkPathFromRoot.js new file mode 100644 index 00000000..dab3ac1f --- /dev/null +++ b/src/content/dependencies/linkPathFromRoot.js @@ -0,0 +1,13 @@ +export default { + contentDependencies: ['linkTemplate'], + + relations: (relation) => + ({link: relation('linkTemplate')}), + + data: (path) => + ({path}), + + generate: (data, relations) => + relations.link + .slot('path', ['shared.path', data.path]), +}; |