Follow

Site JS dynamic functionality is awesome.

1) I have a static homepage.
2) In project root, I create a folder: '.dymamic'
3) Inside that '.dynamic' folder I add a file 'test.js' with the counter code example from the Site JS docs: (sitejs.org/#dynamic-route-long) and save the file.
4) I go to `https://localhost/test` to find that the file has been auto-registered as a route with the same name as file name. 💚

I'm already thinking of ideas to treat my `.dynamic` folder as a public API where I can use something like VueJS (or insert your preferred JS framework) and consume that api from static files.

Show thread
Sign in to participate in the conversation
David Peach's Mastodon

An instance of one.