Toggle Open/Collapse On Click

Looking into displaying posts in a child route of a category archive parent route, the first thing that comes to mind is that the archive’s posts listing on the parent route needs to expand/collapse on click.

Route configuration

The goal of this project was to display the text “Hello World!” at https://hello.zalgorithm.com. It somehow morphed into creating a Remix client application that consumes a headless WordPress site. I’ve been working without much of a plan. That’s starting to show in the application’s URL structure.

Featured posts

With pagiation out of the way, it’s time to clean up the home page. Instead of displaying the 5 most recent posts at the top of the page, it’s going to pull in the site’s “featured” posts. I’ll mark posts as featured by giving them a “featured” tag.

Pagination (take three)

Yesterday I added pagination to the app’s Archive route with the useFetcher hook and the fetcher.Form component. This works, but using forms to create navigation elements feels weird. It also adds some complexity to the code: