PhoenixKit.Pages (phoenix_kit v1.6.4)
View SourcePages module for file-based content management.
Provides filesystem operations for creating, editing, and organizing files and folders in a web-based interface.
Summary
Functions
Disables the Pages module.
Enables the Pages module.
Checks if Pages module is enabled.
Ensures the configured not found page exists on disk.
Returns true when PhoenixKit should keep the 404 inside the Pages module.
Returns the relative file path (with .md) for the configured not found page.
Returns the stored slug (without extension) used for custom 404 pages.
Gets the root directory path for pages.
Enables or disables the custom 404 handler.
Updates the slug used for the custom 404 page.
Functions
Disables the Pages module.
Enables the Pages module.
Checks if Pages module is enabled.
Examples
iex> PhoenixKit.Pages.enabled?()
true
Ensures the configured not found page exists on disk.
Creates a published markdown file with sensible defaults if missing.
Returns true when PhoenixKit should keep the 404 inside the Pages module.
Returns the relative file path (with .md) for the configured not found page.
Returns the stored slug (without extension) used for custom 404 pages.
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"
Enables or disables the custom 404 handler.
Updates the slug used for the custom 404 page.