Feature Request: Add Configurable HTML Partial Template for Streaming Info #3

Open
opened 2024-06-12 22:51:39 +02:00 by Aroy · 0 comments
Owner

Description:
I would like to request the addition of a configurable HTML partial template to the Rinkusu theme, designed to display streaming information primarily from OwnCast, but also supporting other streaming platforms. This feature will enhance the theme by providing users with a flexible way to showcase live streaming data on their websites.

Rationale:
Integrating streaming information directly into the Hugo theme will greatly benefit users who host live streams. By displaying real-time data from OwnCast and other platforms, site visitors can easily see live stream details, enhancing user engagement and providing a seamless experience.

Use Cases:

  1. Live Streamers: Users who broadcast live content via OwnCast or other platforms can prominently display their stream information on their website.
  2. Event Hosts: Event organizers can use this feature to show live event details and updates directly on their site.
  3. Community Platforms: Websites that aggregate content from various live streamers can utilize this template to dynamically display streaming information from multiple sources.

Implementation Ideas:

  1. Configurable Template:
    • Create a new partial template (e.g., streaming.html) in the theme.
    • Allow users to configure the template via the config.toml file or other configuration options.
  2. Platform Support:
    • Integrate support for OwnCast API to fetch and display stream data.
    • Provide a flexible structure to support additional platforms by allowing users to specify API endpoints and data fields.
  3. Customization:
    • Enable customization of the displayed data (e.g., stream title, viewer count, stream status).
    • Allow users to style the template via custom CSS.
  4. Documentation:
    • Include clear documentation on how to configure and use the streaming info template.
    • Provide examples for integrating with OwnCast and other platforms.

Additional Context:
Some Rinkusu theme users are content creators and streamers who would benefit from having their live streaming information seamlessly integrated into their website. By supporting platforms like OwnCast, this feature aligns with the needs of these users, offering a modern and interactive experience.

Example configuration in config.toml:

[params.streaming]
enabled = true
platform = "OwnCast" # Other platforms can be specified here
api_url = "https://owncast.example.com/api/status"
title_field = "name"
viewer_count_field = "viewer_count"
status_field = "online"

Example usage in a Hugo template:

{{ if .Site.Params.streaming.enabled }}
  {{ partial "streaming.html" . }}
{{ end }}

Example streaming.html partial template:

{{ if .Site.Params.streaming.enabled }}
  <div class="streaming-info">
    <h2>Live Stream: {{ .Site.Params.streaming.title }}</h2>
    <p>Status: {{ if .Site.Params.streaming.status }} Online {{ else }} Offline {{ end }}</p>
    <p>Viewers: {{ .Site.Params.streaming.viewer_count }}</p>
  </div>
{{ end }}

By adding this feature, the Hugo theme will cater to a wider audience and provide valuable functionality for users who incorporate live streaming into their web presence.

**Description**: I would like to request the addition of a configurable HTML partial template to the Rinkusu theme, designed to display streaming information primarily from OwnCast, but also supporting other streaming platforms. This feature will enhance the theme by providing users with a flexible way to showcase live streaming data on their websites. **Rationale**: Integrating streaming information directly into the Hugo theme will greatly benefit users who host live streams. By displaying real-time data from OwnCast and other platforms, site visitors can easily see live stream details, enhancing user engagement and providing a seamless experience. **Use Cases**: 1. **Live Streamers**: Users who broadcast live content via OwnCast or other platforms can prominently display their stream information on their website. 2. **Event Hosts**: Event organizers can use this feature to show live event details and updates directly on their site. 3. **Community Platforms**: Websites that aggregate content from various live streamers can utilize this template to dynamically display streaming information from multiple sources. **Implementation Ideas**: 1. **Configurable Template**: - Create a new partial template (e.g., `streaming.html`) in the theme. - Allow users to configure the template via the `config.toml` file or other configuration options. 2. **Platform Support**: - Integrate support for OwnCast API to fetch and display stream data. - Provide a flexible structure to support additional platforms by allowing users to specify API endpoints and data fields. 3. **Customization**: - Enable customization of the displayed data (e.g., stream title, viewer count, stream status). - Allow users to style the template via custom CSS. 4. **Documentation**: - Include clear documentation on how to configure and use the streaming info template. - Provide examples for integrating with OwnCast and other platforms. **Additional Context**: Some Rinkusu theme users are content creators and streamers who would benefit from having their live streaming information seamlessly integrated into their website. By supporting platforms like OwnCast, this feature aligns with the needs of these users, offering a modern and interactive experience. Example configuration in `config.toml`: ```toml [params.streaming] enabled = true platform = "OwnCast" # Other platforms can be specified here api_url = "https://owncast.example.com/api/status" title_field = "name" viewer_count_field = "viewer_count" status_field = "online" ``` Example usage in a Hugo template: ```html {{ if .Site.Params.streaming.enabled }} {{ partial "streaming.html" . }} {{ end }} ``` Example `streaming.html` partial template: ```html {{ if .Site.Params.streaming.enabled }} <div class="streaming-info"> <h2>Live Stream: {{ .Site.Params.streaming.title }}</h2> <p>Status: {{ if .Site.Params.streaming.status }} Online {{ else }} Offline {{ end }}</p> <p>Viewers: {{ .Site.Params.streaming.viewer_count }}</p> </div> {{ end }} ``` By adding this feature, the Hugo theme will cater to a wider audience and provide valuable functionality for users who incorporate live streaming into their web presence.
Aroy added the
Kind/Feature
label 2024-06-12 22:51:39 +02:00
Aroy added the
Priority
Low
label 2024-11-07 23:59:25 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Aroy/Rinkusu#3
No description provided.