3
1
Fork
You've already forked experimental-plugins
1

Markdoc Plugin #29

Merged
kwaa merged 2 commits from main into main 2023年10月12日 18:46:52 +02:00
kwaa commented 2023年10月12日 08:04:49 +02:00 (Migrated from github.com)
Copy link
https://github.com/lumeland/lume/issues/277
oscarotero left a comment
Copy link

Hey,
thanks a lot for this. I think it's a great starting point. I just have a comment about how the data is passed.

Hey, thanks a lot for this. I think it's a great starting point. I just have a comment about how the data is passed.
@ -0,0 +1,59 @@
import loader from "lume/core/loaders/text.ts";

I think the data should be passed directly, so you can do {% $title %} instead of {% $markdoc.frontmatter.title %}. And the data from the config object should override the page data. So I suggest:

variables: {
 ...data,
 ...(this.options.config?.variables ?? {}),
}
I think the data should be passed directly, so you can do `{% $title %}` instead of `{% $markdoc.frontmatter.title %}`. And the data from the config object should override the page data. So I suggest: ```js variables: { ...data, ...(this.options.config?.variables ?? {}), } ```
kwaa commented 2023年10月12日 11:03:39 +02:00 (Migrated from github.com)
Copy link
@oscarotero Updated. also checkout my message on Discord: https://discord.com/channels/794537085641818124/794537086278828094/1161907857281794078

Thank you!

Thank you!
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lume/experimental-plugins!29
Reference in a new issue
lume/experimental-plugins
No description provided.
Delete branch "main"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?