I realized the problem I’m having with pagination is that I’m trying to implement page based pagination but WPGraphQL has been optimized for cursor based pagination.
Category: Web Development
Pagination (take four)
Why do this at all if LLMs can write adequate code and blog posts? The short answer is that they can’t, yet. The longer answer follows from LLM’s lack of understanding and common sense.
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:
Pagination (take two)
This works, but it creates ugly URLs: /blog/archive/YXJyYXljb25uZWN0aW9uOjk4. It’s also not a great user interface. It needs to supply more context and ways of skipping around and filtering batches of posts.
Loading More Posts From an Archive Route
Yesterday I added an archive route to the Remix app. Visiting the archive route loads the first 15 posts from the WordPress site. Today I’ll figure out how to load more posts after the initial batch of 15.
Archive and Category Index pages
The next step is to link each of the top level headings on the /blog page to index pages that display all of the posts that fall under the heading.
A sticky footer in 2024
This task gets its own post because it’s something I struggled with back in the day (2013 or so.) Here’s the problem. I made a basic Footer component:
Link to posts from the index page
A small update from yesterday. Viewing the production site on mobile, I noticed that long links found in excerpts could cause content to extend past its container
Pulling Data from WordPress to Remix
To pull in real data from the WordPress site, I need to write a GraphQL query that returns the 5 most recently created posts on the site, and also pulls in up to 5 posts for each of the site’s categories.
A WordPress index page for Remix
In my last post I wrote that authentication was the next item on my list. I’ve changed my mind and am going to create a WordPress index page instead.