Manhwa.Router (manhwa v0.1.1)

Copy Markdown View Source

Mounts the reader's routes into a host router.

import Manhwa.Router

scope "/" do
  pipe_through [:browser, :require_auth]
  manhwa_reader "/reader/manga"
end

With series_segments: 2 (the default) a series is addressed as /:source/:slug, so the reader page lives at /reader/manga/:source/:slug/:chapter; with series_segments: 1 it's /reader/:series/:chapter.

All settings, progress, image-proxy, and annotation API endpoints are mounted under the same prefix, so the package's templates and JS know their own URLs — the host never builds a reader URL by hand except the entry link to show.

Options:

  • :series_segments — 1 or 2 (default 2)
  • :controller — override the controller module (used by the manga package's manga_reader/2 to layer paged-mode dispatch on the same route surface)

Summary

Functions

manhwa_reader(path, opts \\ [])

(macro)