{twitter}

Description

Renders a Twitter/X "Tweet" share button - the standard anchor that the Twitter/X widgets script turns into a live share button on the current page. Takes no parameters and always emits the same fixed markup; it does not insert a specific URL or text (the widget shares the page it loads on). As a side effect it queues the platform widgets script (platform.twitter.com/widgets.js) to be loaded; the script tag is only emitted where the page template has a generate:HEAD (or generate:FOOT) spot, so without that spot the button stays an inert plain link. Output is raw HTML, so examples are illustrative rather than asserted. Note: X (formerly Twitter) has changed its widget platform since this command was written; verify the button still activates on your install.

Examples

virtual{generate:HEAD}{twitter}
Expected(at render: a generate spot marker plus the Tweet anchor; the page template emits the queued widgets.js at the HEAD spot)
Actual
The button is just an anchor until the Twitter/X widgets script runs. The command queues that script via addRequire; the page template must contain a generate:HEAD (or generate:FOOT) spot for the script tag to actually be emitted. Without a generate spot the button stays an inert text link. Output is illustrative.
virtual<div class="share">{facebook:https://example.org/article} {twitter}</div>
Expected(at render: a div containing the Facebook share iframe and the Tweet button anchor)
Actual
A typical placement: a share row in an article template combining the Facebook and Twitter share buttons. {facebook:} takes the page URL to share; {twitter} takes no URL - its widget shares whatever page the script loads on, so put it on the page you want shared.
virtual{twitter}
Expected
Tweet">Actual
The command takes no parameters and always emits this exact anchor. The Twitter/X widgets script (queued by the command) turns it into a live Tweet button in the browser; the widget shares the URL of the page it loads on.