diff --git a/src/compiler/GardenPageCompiler.ts b/src/compiler/GardenPageCompiler.ts index ec08fe4d..4669829e 100644 --- a/src/compiler/GardenPageCompiler.ts +++ b/src/compiler/GardenPageCompiler.ts @@ -462,6 +462,13 @@ export class GardenPageCompiler { )(publishLinkedFile)(fileText); } + // compile dataview in transcluded text + const withDvCompiledText = await this.runCompilerSteps( + publishLinkedFile, + [this.convertDataViews], + )(fileText); + fileText = withDvCompiledText; + //This should be recursive up to a certain depth transcludedText = transcludedText.replace( transclusionMatch, diff --git a/src/dg-testVault/P Plugins/PD Dataview/PD5.1 Dataview in transclusions.md b/src/dg-testVault/P Plugins/PD Dataview/PD5.1 Dataview in transclusions.md new file mode 100644 index 00000000..f955a5ff --- /dev/null +++ b/src/dg-testVault/P Plugins/PD Dataview/PD5.1 Dataview in transclusions.md @@ -0,0 +1,10 @@ +--- +foo: bar +url: https://kagi.com +dg-publish: true +--- +This should say "bar" -> `=this.foo` + +This should be a working link -> [kagi](`=this.url`) + +See if those tran: [[PD5.2 Dataview in transclusions]] \ No newline at end of file diff --git a/src/dg-testVault/P Plugins/PD Dataview/PD5.2 Dataview in transclusions.md b/src/dg-testVault/P Plugins/PD Dataview/PD5.2 Dataview in transclusions.md new file mode 100644 index 00000000..84cfd0ab --- /dev/null +++ b/src/dg-testVault/P Plugins/PD Dataview/PD5.2 Dataview in transclusions.md @@ -0,0 +1,7 @@ +--- +dg-publish: true +--- +Transcluding the Dataview-containing [[PD5.1 Dataview in transclusions]] file below: +![[PD5.1 Dataview in transclusions]] + +The transcluded, Dataview-containing transclusion above should have been processed as expected with the Dataview having been processed. e.g. the text and link should use the frontmatter from the original file per the Dataview queries in that file. \ No newline at end of file diff --git a/src/test/snapshot/snapshot.md b/src/test/snapshot/snapshot.md index da1293df..893fdf2a 100644 --- a/src/test/snapshot/snapshot.md +++ b/src/test/snapshot/snapshot.md @@ -731,6 +731,8 @@ I'm a list of all files in this folder: - [[P Plugins/PD Dataview/PD2 Inline queries\|PD2 Inline queries]] - [[P Plugins/PD Dataview/PD3 Inline JS queries\|PD3 Inline JS queries]] - [[P Plugins/PD Dataview/PD4 DataviewJs queries\|PD4 DataviewJs queries]] +- [[P Plugins/PD Dataview/PD5.1 Dataview in transclusions\|PD5.1 Dataview in transclusions]] +- [[P Plugins/PD Dataview/PD5.2 Dataview in transclusions\|PD5.2 Dataview in transclusions]] - [[P Plugins/PE Excalidraw/PE1 Transcluded excalidraw\|PE1 Transcluded excalidraw]] - [[P Plugins/PE Excalidraw/PE2 excalidraw with image\|PE2 excalidraw with image]] @@ -764,7 +766,7 @@ P Plugins/PD Dataview/PD3 Inline JS queries.md 3 -108 +112
A paragraph
/img/user/A Assets/travolta.png @@ -782,6 +784,48 @@ P Plugins/PD Dataview/PD4 DataviewJs queries.mdname6 | link |
---|---|
005 Custom filters | 005 Custom filters |
006 Custom title | 006 Custom title |
007 Custom permalink | 007 Custom permalink |
011 Custom updatedAt | 011 Custom updatedAt |
013 Custom path | 013 Custom path |
014 Customer path and permalink | 014 Customer path and permalink |