You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.5 KiB

+++ authors = ["author-demo"] categories = ["paige", "shortcodes"] description = "Demonstration of the request shortcode." tags = ["request", "figures"] title = "Request" +++

The paige/request shortcode displays the content for a URL.

Basic

Code:

<pre>
{{</* paige/request "https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" */>}}
</pre>

Result:

{{< paige/request "https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" >}}

Method parameter

Code:

<pre>
{{</* paige/request method="get" url="https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" */>}}
</pre>

Result:

{{< paige/request method="get" url="https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" >}}

Url parameter

Code:

<pre>
{{</* paige/request url="https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" */>}}
</pre>

Result:

{{< paige/request url="https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" >}}

Figure

Code:

{{</* paige/figure caption="License" */>}}
<pre>
{{</* paige/request "https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" */>}}
</pre>
{{</* /paige/figure */>}}

Result:

{{< paige/figure caption="License" >}}

{{< paige/request "https://raw.githubusercontent.com/willfaught/paige/master/LICENSE" >}}

{{< /paige/figure >}}