Skip to content
Discussion options

You must be logged in to vote

To solve this change backlinks to async:

backlinks: async (data) => {

and await to template read:

const template = await otherNote.template.read()
const noteContent = template.content;

Here's the diff for you:

diff --git a/notes/notes.11tydata.js b/notes/notes.11tydata.js
index 8b22ef8..7d410e7 100644
--- a/notes/notes.11tydata.js
+++ b/notes/notes.11tydata.js
@@ -12,7 +12,7 @@ module.exports = {
     type: "note",
     eleventyComputed: {
         title: data => titleCase(data.title || data.page.fileSlug),
-        backlinks: (data) => {
+        backlinks: async (data) => {
             const notes = data.collections.notes;
             const currentFileSlug = data.page.filePathStem.re…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Julianoe
Comment options

Answer selected by Julianoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants