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

Inject JavaScript bundles and Readium CSS with WebPubs #59

Closed
wants to merge 1 commit into from

Conversation

mickael-menu
Copy link
Member

@mickael-menu mickael-menu commented Nov 19, 2021

JavaScript and Readium CSS were injected only for publications marked explicitly as EPUB. Instead, this will inject it for any HTML resource.

Note: I'm not yet sure this should be the default behavior for WebPubs.
See readium/webpub-manifest#65 (comment)

@mickael-menu
Copy link
Member Author

Superseded by #61

If you want to support pagination / user styles with a Readium Web Publication Manifest, add the following in the metadata:

{
  "metadata": {
    "conformsTo": "https://readium.org/webpub-manifest/profiles/epub"
  }
}

Alternatively, you can add it dynamically while opening the webpub with the Streamer with:

streamer.open(...,
    onCreatePublication = {
        manifest = manifest.copy(
            metadata = manifest.metadata.copy(
                conformsTo = listOf(Publication.Profile.EPUB)
            )
        )
    }
)

@mickael-menu mickael-menu deleted the fix/webpub branch November 26, 2021 16:28
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.

None yet

1 participant