This is an attempt to combine Jekyll and Svelte so that we can use the best of both worlds.
-
Clone the repository
-
Install dependencies
npm run setup
-
Run dev app
npm run dev
. Site will be served onhttp://127.0.0.1:4000
with live-reload -
Build app
npm run build
-
Create a Svelte component say Example.svelte in
/svelte/src/
directory. -
Add it to
svelte/src/main.js
as shown below
import Example from "./Example.svelte";
const exampleDiv = document.querySelector("#example");
// mount the component only if the dom node is present
exampleDiv &&
new Example({
target: exampleDiv,
});
-
Add
html <div id="example"></div>
in any page where you want theExample.svelte
component to be mounted. -
Contribute to the project.