Crate tera_shortcodes

source ·

Structs§

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

Functions§

  • 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.
  • 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.