A static web site, generated with data from the WordPress API.
This is a work in progress 🚧
I’m using it to practice with new tools, and to help a family member who’s publishing recipes & pictures 🍎 🖼
If you’d like to re-use this code to make your own web site based on WordPress, the basic steps are…
-
Install Deno (version
1.43.6
or greater). -
Edit the URLs in
_config.js
so they point to your WordPress installation -
Delete the example data in
_api
and_pictures
-
Update the layouts and styles to your liking
-
From the root of your project, generate the site...
deno task build
This will create a folder called _site
that you can publish to a static host like Netlify or Vercel. You can also set up your own web site, using the included file server.
You can test the site locally by running...
deno task dev
This project is an experiment to see how easily a web site can be created with the benefits of both a CMS (like WordPress) and static site (like Jekyll)…
- Content can be created and updated with an easy-to-use CMS, like WordPress
- Changes to the content are versioned with a tool like Git
- The web site can be continuously deployed in a way that is reliable, scalable and secure
- The CMS can be hosted separately from the site, with limited access
- The web site is still available, even if something goes wrong in the CMS
These projects and guides have been super helpful, while working on this…
- https://www.smashingmagazine.com/2020/02/headless-wordpress-site-jamstack/
- https://hacks.mozilla.org/category/es6-in-depth/
- https://github.com/developit/htm
- https://www.pika.dev/
The code for this project (except for the recipes, photos and other content) is available under an open source license.