PhoenixKitWeb.BlogHTML (phoenix_kit v1.6.16)

View Source

HTML rendering functions for BlogController.

Summary

Functions

Builds the public URL for a blog listing page. Default language gets clean URLs without locale prefix.

Builds a post URL based on mode. Default language gets clean URLs without locale prefix.

Extracts and renders an excerpt from post content. Returns content before <!-- more --> tag, or first paragraph if no tag. Renders markdown and strips HTML tags for plain text display.

Resolves a featured image URL for a post, falling back to the original variant.

Formats a date for display.

Formats a date for URL.

Formats time for URL (HH:MM).

Pluralizes a word based on count.

Functions

all_blogs(assigns)

blog_listing_path(language, blog_slug, params \\ [])

Builds the public URL for a blog listing page. Default language gets clean URLs without locale prefix.

build_post_url(blog_slug, post, language)

Builds a post URL based on mode. Default language gets clean URLs without locale prefix.

extract_excerpt(content)

Extracts and renders an excerpt from post content. Returns content before <!-- more --> tag, or first paragraph if no tag. Renders markdown and strips HTML tags for plain text display.

format_date(datetime)

Formats a date for display.

format_date_for_url(datetime)

Formats a date for URL.

format_time_for_url(datetime)

Formats time for URL (HH:MM).

index(assigns)

pluralize(count, singular, plural)

Pluralizes a word based on count.

show(assigns)