Search documentation of phoenix_kit

# PhoenixKit.Pages (phoenix_kit v1.6.19)

View Source

Pages module for file-based content management.

Provides filesystem operations for creating, editing, and organizing files and folders in a web-based interface.

# Summary

## Functions

disable_system()

Disables the Pages module.

enable_system()

Enables the Pages module.

enabled?()

Checks if Pages module is enabled.

ensure_not_found_page_exists()

Ensures the configured not found page exists on disk.

handle_not_found?()

Returns true when PhoenixKit should keep the 404 inside the Pages module.

not_found_file_path()

Returns the relative file path (with `.md`) for the configured not found page.

not_found_slug()

Returns the stored slug (without extension) used for custom 404 pages.

root_path()

Gets the root directory path for pages.

update_handle_not_found(enabled?)

Enables or disables the custom 404 handler.

update_not_found_slug(slug)

Updates the slug used for the custom 404 page.

# Functions

# disable_system()

Disables the Pages module.

# enable_system()

Enables the Pages module.

# enabled?()

Checks if Pages module is enabled.

## Examples

    iex> PhoenixKit.Pages.enabled?()
    true

# ensure_not_found_page_exists()

Ensures the configured not found page exists on disk.

Creates a published markdown file with sensible defaults if missing.

# handle_not_found?()

Returns true when PhoenixKit should keep the 404 inside the Pages module.

# not_found_file_path()

Returns the relative file path (with `.md`) for the configured not found page.

# not_found_slug()

Returns the stored slug (without extension) used for custom 404 pages.

# root_path()

Gets the root directory path for pages.

Creates the directory if it doesn't exist. Uses the parent application's directory, not PhoenixKit's dependency directory.

## Examples

    iex> PhoenixKit.Pages.root_path()
    "/path/to/app/priv/static/pages"

# update_handle_not_found(enabled?)

Enables or disables the custom 404 handler.

# update_not_found_slug(slug)

Updates the slug used for the custom 404 page.