Example configuration with custom template
Is your feature request related to a problem? Please describe. I'm a Node-amateur and find the interplay of CommonJS and ES modules terribly confusing.
Describe the solution you’d like Show me an example config that includes a custom post template, or "local" preset, using v1.0.0
Describe alternatives you’ve considered I've tried every permutation of ES and CJS I can think of, have searched GitHub for useful examples in the wild.
👋
I'm a Node-amateur and find the interplay of CommonJS and ES modules terribly confusing.
Been there! Was far worse back in the day when there was no standard… AMD, UMD, CJS… put me off learning JavaScript for many, many years.
Nowadays it’s a little more straight forward. ES modules, as the name implies, are the standard and thus the syntax that’ll stick around. Indiekit kit uses ES modules throughout.
Show me an example config that includes a custom post template, or "local" preset, using v1.0.0
Interesting. There’s the example-config repo, but that’s for v0.x.x branch. Given the impending release of v1.x.x, and that the website documents the new configuration format, this repo is likely causing more confusion, than helping anybody.
I was considering removing/archiving it, but what you outline is a good case for keeping it around, with it showing an example of a server configured with a custom preset. I’ll look to update the example with this use case in mind.
I've tried every permutation of ES and CJS I can think of, have searched GitHub for useful examples in the wild.
Although Node.js supports ES modules, CommonJS is what it has used historically and remains its default module format. To enable ES modules, you either need to name a file with the extension .mjs, or add "type": "module" to your package.json file. Have you tried this?
I'm past this, just named everything .cjs … of course I'll happily point to my config for reference once it's actually working!
Maybe this is a duplicate of #400, really
I have finally updated the example configuration, which should hopefully resolve this issue. #400 is frankly causing epic levels of procrastination at the moment, but closing this issue gets me one step closer to updating and expanding this project’s getting started guide!