Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'readers' config to Server #56

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

kristojorg
Copy link

This PR adds a simple configuration option to server.ts allowing a user to pass in an array of example readers which will then be shown on the /pub/:pubId page. This allows us to show different reader examples in that space that match our setup. It is used like this:

  const server = new Server({
    readers: [
      {
        title: "Dita Example",
        getUrl: (url) => `/viewer/index.html?url=${url}`,
      },
      {
        title: "Minimal",
        getUrl: (url) => `/viewer/index_minimal.html?url=${url}`,
      },
    ],
  });

If nothing is passed, the default readers will be used.

@kristojorg
Copy link
Author

This should also close #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant