Skip to content

Remove pager from front page #1647

Answered by mbostock
mcmcclur asked this question in Q&A
Discussion options

You must be logged in to vote

It’s possible to do this with the pager field and the pages config option. The pager field declares the page’s page group, and all pages within the same page group are linked together via the footer. The default page group is main, and the home page /index is always in the main page group. Therefore, if you declare a different page group for all your other pages, say alt, you’ll effectively disable the pager for the home page since the main page group will only have a single page in it. That might look like this in your observablehq.config.js:

export default {
  pages: [
    {name: "Page one", pager: "alt", path: "/one"},
    {name: "Page two", pager: "alt", path: "/two"},
    {name: "Pag…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mcmcclur
Comment options

Answer selected by mcmcclur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants