-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
eleventy 🕚⚡️
A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
See this project hosted on Netlify at headless-wordpress-11ty.netlify.app, or skip the tutorial altogether and view the Git repo at github.com/thedavedavies/Headless-WordPress-11ty.
node-fetch -- We'll use this to fetch our data from the WordPress REST API.
At this point, it's best practice to remove your API endpoint URLs from your code and use a .env file instead. So let's do that by installing the dotenv package: npm i dotenv. Next, create a .env file in the root of your project. This is where we'll add all of our secret endpoint URLs. If you created a .gitignore file earlier, make sure to have .env* in the file. This will tell git to ignore all .env files.
If you've never used Eleventy before, then there's loads of great resources at https://www.11ty.dev. In the meantime, create a fresh project (we'll call ours Headless-WordPress-11ty) and open that new project in your code editor (I'm using VS Code).