Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Fixed current in pagination logic in BlogIndexPage.astro#6

Open
Tonel wants to merge 1 commit intoapostrophecms:mainfrom
Tonel:patch-1
Open

Fixed current in pagination logic in BlogIndexPage.astro#6
Tonel wants to merge 1 commit intoapostrophecms:mainfrom
Tonel:patch-1

Conversation

@Tonel
Copy link
Copy Markdown

@Tonel Tonel commented Feb 23, 2024

Summary

In BlogIndexPage.astro, there was the line page === currentPage. The problem is that page is an object while currentPage is a number, so that comparison was always false. Now, it has been fixed.

What are the specific steps to test this change?

  1. Run the site
  2. Log in as an admin
  3. Create more than 10 blog posts
  4. Verify that the pagination element matching the current page has the "current" class

What kind of change does this PR introduce?

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant