PhoenixKitPublishing.Routes (PhoenixKitPublishing v0.1.5)

Copy Markdown View Source

Publishing module routes.

Provides route definitions for content management (publishing groups and posts).

Summary

Functions

Returns quoted admin LiveView route declarations for the shared admin live_session (localized).

Returns quoted admin LiveView route declarations for the shared admin live_session (non-localized).

Returns quoted code for publishing non-LiveView routes via generate/1. No-op — public routes are provided via public_routes/1 instead, which is placed later in the route order to avoid catch-all conflicts.

Public blog/publishing catch-all routes.

Functions

admin_locale_routes()

@spec admin_locale_routes() :: Macro.t()

Returns quoted admin LiveView route declarations for the shared admin live_session (localized).

admin_routes()

@spec admin_routes() :: Macro.t()

Returns quoted admin LiveView route declarations for the shared admin live_session (non-localized).

generate(url_prefix)

Returns quoted code for publishing non-LiveView routes via generate/1. No-op — public routes are provided via public_routes/1 instead, which is placed later in the route order to avoid catch-all conflicts.

public_routes(url_prefix)

@spec public_routes(String.t()) :: Macro.t()

Public blog/publishing catch-all routes.

Placed AFTER all other routes by phoenix_kit's compile_external_public_routes to prevent the /:group catch-all from intercepting admin or other paths.

Includes :phoenix_kit_optional_scope pipeline so AdminEditHelper can show edit buttons for logged-in admins/owners on public pages.