Skip to content

imyelo/docsify-pagination

Folders and files

NameName
Last commit message
Last commit date
Mar 29, 2018
Jun 24, 2022
Jun 28, 2022
Apr 11, 2018
Dec 11, 2017
Dec 11, 2017
Mar 29, 2018
Sep 29, 2024
Apr 11, 2018
Sep 8, 2022
Apr 10, 2018
Dec 11, 2017
Nov 30, 2024

Repository files navigation

docsify-pagination

Pagination for docsify

npm license PRs Welcome

How does it look like?

screenshot

Install

  1. insert script into document
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
  1. specify the label text (optional)
window.$docsify = {
  // ...
  pagination: {
    previousText: '上一章节',
    // or
    nextText: {
      '/en/': 'NEXT',
      '/': '下一章节'
    },
    crossChapter: true,
    crossChapterText: true,
  },
}

Options

pagination.previousText

  • Default: 'PREVIOUS'
  • Type: String | Object
  • Description: The text of previous label.

pagination.nextText

  • Default: 'NEXT'
  • Type: String | Object
  • Description: The text of next label.

pagination.crossChapter

  • Default: false
  • Type: Boolean
  • Description: Allow navigation to previous/next chapter.

pagination.crossChapterText

  • Default: false
  • Type: Boolean
  • Description: Display chapter name.

pagination.routerMode

  • Deprecated
  • Default: window.$docsify.routerMode
  • Type: String
  • Description: Router mode. In most cases, you don't need to modify it. Docsify-Pagination will take care of it for you.

Example

Run example on local

How to open these?

$ git clone https://github.com/imyelo/docsify-pagination.git && cd docsify-pagination && yarn
$ yarn example

Online Showcase

Related

License

MIT © yelo