Source widget does not work with dynamic inclusion #18

Open
opened 2024-04-29 22:14:45 +00:00 by xrdawson · 2 comments
xrdawson commented 2024-04-29 22:14:45 +00:00 (Migrated from extrastatic.dev)

It is nice when you can use something like <svekyll-source/> and automatically include the Source.svelte file, etc (https://extrastatic.dev/svekyll/svekyll-cli/-/merge_requests/1). But, this does not work, currently, with the Source.svelte file because it requires the {post} and this is not included when the source is rewritten.

EDIT: The solution is to use something like this in your PostRoll.svelte file. Future versions should support <svekyll-source/> but not right now, you need to manually include the post.

<script>
  export let post;
</script>

<svekyll-source {post}/>
It is nice when you can use something like `<svekyll-source/>` and automatically include the Source.svelte file, etc (https://extrastatic.dev/svekyll/svekyll-cli/-/merge_requests/1). But, this does not work, currently, with the Source.svelte file because it requires the `{post}` and this is not included when the source is rewritten. EDIT: The solution is to use something like this in your PostRoll.svelte file. Future versions should support `<svekyll-source/>` but not right now, you need to manually include the post. ``` <script> export let post; </script> <svekyll-source {post}/> ```
xrdawson commented 2024-04-29 22:15:17 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
xrdawson commented 2024-04-29 22:19:40 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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
svekyll/svekyll-cli#18
No description provided.