### Bug description

On [realworlddatascience.net](https://realworlddatascience.net/) homepage, I'm using custom page layout with grid listings to show selections of different types of blog content.

For the "latest content" block, I show the three most recently published articles from across the site using the following YAML:

```yaml
listing:
  - id: latest-content
    contents: 
    - /case-studies
    - /ideas
    - /careers
    - /viewpoints
    - "!index.qmd"
    - "!flowers.qmd"
    sort: "date desc"
    type: grid
    categories: false
    sort-ui: false
    filter-ui: false
    max-items: 3
    feed: false
```
I noticed yesterday than when the number of items eligible to be included in the listing passed 20, a listing pagination button appeared within the "latest content" block. When I deleted an article from the site to reduce the eligible listings to 19, the pagination button disappeared. I then tried uploading a new dummy article to bring the number of eligible items back above 20, and the pagination button reappeared.

On the live version of the site, I've removed the button via a css workaround. 

```css
.content-container .listing-pagination {
  display: none;
}
```

However, the bug is visible in this forked repo: https://github.com/fatso-jetson/listing-bug-demo. 

Screenshot of the rendered main [index.qmd](https://github.com/fatso-jetson/listing-bug-demo/blob/main/index.qmd) file is below:

![Screenshot 2023-04-13 160525](https://user-images.githubusercontent.com/91419526/231802770-0a1d7fbc-588f-44ba-b85e-9650a5e0f5ed.png)

Quarto version: 1.3.319
OS: Windows 10 Home, build 19044.2846
Editor: VS Code, 1.77.3, with Quarto extension, v.1.80.0

`quarto check` output:
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK       
[>] Checking Quarto installation......OK
      Version: 1.3.319
      Path: 
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.10.5
      Path: 
      Jupyter: 4.10.0
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
dragonstyle
2023-04-13T15:26:34Z
brtarran
bug
v1.4
open
listing-pagination shows up even when max items is set
https://github.com/quarto-dev/quarto-cli/issues/5178