%% date:: [[2022-12-31]] %% # [[How to display all blog posts in archive in Hugo]] In [[Hugo]], only 10 posts at a time are displayed in posts lists by default. You can change this behaviour by adding the `showAllPostsArchive` parameter. [^nizzlay] ## Update configuration file First, update the configuration file (`config.toml`) to add the new parameter, `showAllPostsArchive`, as well as its value. ```toml rss = true googleAnalyticsAsync = true showAllPostsArchive = true # This is what to add ``` ## Update the template for the posts archive HTML Then, update the template for the page you want to disable pagination on (in this case, `layouts/_default/list.html`): ```toml {{ range (sort .Paginator.Pages "Date" "desc") }} # REMOVE THIS and replace it with the lines below {{ $pages := .Paginator.Pages }} {{ if .Site.Params.showAllPostsArchive }} {{ $pages = .Pages }} {{ end }} {{ range (sort $pages "Date" "desc") }} ``` and ```toml {{ partial "pagination.html" . }} # REMOVE THIS and replace it with the lines below {{ if eq .Site.Params.showAllPostsArchive false }} {{ partial "pagination.html" . }} {{ end }} ``` That should do it! [^nizzlay]: @Nizzlay. (2020). *Create option to disable pagination in archive*. Retrieved from: https://github.com/monkeyWzr/hugo-theme-cactus/pull/9/files