Crate tera_shortcodes

Source

Structs§

Shortcodes
A struct that manages shortcode functions for use in Tera templates.

Functions§

fetch_shortcode
Sends an HTTP request to the provided URL using either the GET or POST method and returns the response as a String. This function handles asynchronous requests but executes them in a synchronous context using Tokio function block_in_place. Note: This function is slow. For better performance, consider using the fetch_shortcode_js function instead.
fetch_shortcode_js
Generates a JavaScript snippet that asynchronously fetches data from a URL using either the GET or POST HTTP method and injects the response into the DOM. The function also provides fallback content for crawlers/robots that do not support JavaScript. If the response has JavaScript code like , it will be executable.