{"id":34725862,"url":"https://github.com/liquidlight/typo3-shortcodes","last_synced_at":"2026-01-16T10:08:13.144Z","repository":{"id":62517624,"uuid":"428168110","full_name":"liquidlight/typo3-shortcodes","owner":"liquidlight","description":"Wordpress-style shortcodes for TYPO3","archived":false,"fork":false,"pushed_at":"2026-01-14T08:20:02.000Z","size":130,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T12:12:11.988Z","etag":null,"topics":["extension","typo3","typo3-cms-extension","typo3-extension"],"latest_commit_sha":null,"homepage":"https://extensions.typo3.org/extension/shortcodes","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liquidlight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-15T07:45:37.000Z","updated_at":"2026-01-14T08:19:24.000Z","dependencies_parsed_at":"2025-12-08T19:11:33.210Z","dependency_job_id":null,"html_url":"https://github.com/liquidlight/typo3-shortcodes","commit_stats":{"total_commits":82,"total_committers":3,"mean_commits":"27.333333333333332","dds":0.04878048780487809,"last_synced_commit":"7614d59bd3b9d69daf7b5aee6d724c6bcfb16e7d"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/liquidlight/typo3-shortcodes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-shortcodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-shortcodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-shortcodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-shortcodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liquidlight","download_url":"https://codeload.github.com/liquidlight/typo3-shortcodes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-shortcodes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","typo3","typo3-cms-extension","typo3-extension"],"created_at":"2025-12-25T02:27:13.656Z","updated_at":"2026-01-16T10:08:13.115Z","avatar_url":"https://github.com/liquidlight.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortcodes\n\nWordpress style shortcodes for embedding external content in TYPO3.\n\n## Installation\n\n```\ncomposer req liquidlight/typo3-shortcodes\n```\n\n## Usage\n\nOut of the box the extension comes with plenty of shortcodes to get you started; including YouTube, Vimeo, Facebook, Twitter and several others.\n\nTo use the shortcodes, you can use a shorthand syntax or follow the Wordpress, HTML inspired method.\n\nMore details below as to the exact usage for each tag, but as an example, the YouTube one could be used like one of the following:\n\n**⚠️ If using a full URL, it is worth leaving a space between the end of the link and the closing square bracket - this prevents the `]` being used in the link**\n\n### Shorthand colon syntax\n\n```\n[youtube: https://www.youtube.com/watch?v=JrFFN9lag2w ]\n```\n\n### Shorthand equals syntax\n\n```\n[youtube=https://www.youtube.com/watch?v=JrFFN9lag2w ]\n```\n\n### Wordpress Long-form syntax\n\n```\n[youtube url=\"https://www.youtube.com/watch?v=JrFFN9lag2w\" ]\n```\n\n## Creating your own keyword\n\nIn the land of shortcodes, keyword is the \"service\" used to trigger the shortcode (e.g. `youtube` in the examples above).\n\nRegistering your own keyword requires a new class which extends `LiquidLight\\Shortcodes\\Keywords\\AbstractKeyword`.\n\nAn example of how to extend and use can be found in the Classes/Keywords folder - anything but the `AbstractKeyword` class can be copied and used.\n\nOnce created, you can add it via the `ext_localconf.php` where `new` is the name of the keyword.\n\n```php\n$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['shortcodes']['processShortcode']['new'] =\n    \\Vendor\\Ext\\Keywords\\NewKeyword::class;\n```\n\nUsing this method allows you to overwrite existing keywords if you wish to alter their output. The only requirement is that you return a string.\n\n## Existing Shortcodes\n\nAll shortcodes allow `title` as an attribute to add a title to `iframe` based shortcodes. If it is not added, it will default to the type (e.g. \"Google Maps\")\n\n### Facebook\n\n`[facebook]`\n\nCopy the URL of a facebook post or video\n\n```\n[facebook=https://www.facebook.com/20531316728/posts/10154009990506729/ ]\n```\n\n**Properties:**\n\n- url\n- width\n- height\n\n**Defaults:**\n\n```\n[facebook=LINK width=\"500\"]\n```\n\n### Google Maps\n\n`[googlemaps]`\n\n**⚠️ Google Maps [requires an API key setting up](https://developers.google.com/maps/documentation/embed/cloud-setup) - see the setup section below for adding your key**\n\nShows a place, satellite, directions or streetview of a place.\n\n```\n[googlemaps search=\"Paris\" ]\n```\n\n**Properties:**\n\nAll the properties are of that listed [in the documentation](https://developers.google.com/maps/documentation/embed/embedding-map).\n\nThe only differences are:\n\n- `search` can be used instead of `q`\n- The addition of `loading` - defaults to `lazy` but can be set to `eager`\n\n#### Setup\n\nTo use the `googlemaps` shortcode, an API key must be set.\n\nBy default, it will look in your `$_ENV` variables for `GOOGLE_MAP_API`.\n\nHowever it can be set in `ext_localconf` however you see fit (please don't commit your API key).\n\n```php\n$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['shortcodes']['config']['api']['googlemaps'] = '123';\n```\n\n**If you restrict the API key type**, ensure you have the following enabled\n\n- Maps Embed API\n- Maps JavaScript API\n- Maps Static API\n\n### Iframe\n\n`[iframe]`\n\nAllows a generic iframe to be rendered with the passed in URL\n\n```\n[iframe: https://typo3.com/ ]\n```\n\n**Properties:**\n\n- src\n- width\n- height\n- ratio - iframe ratio in a colon or slash format (e.g. `ratio=\"4:3\"` or ``ratio=\"16/9\"``) - rendered as a `data-ratio` attribute\n- allowfullscreen\n- allow\n- frameBorder\n\n\n### Instagram\n\n`[instagram]`\n\nEmbeds an Instagram post\n\n```\n[instagram=https://www.instagram.com/p/CWI-FeDs-us/ ]\n```\n\n### LinkedIn\n\n`[linkedin]`\n\nEmbeds an Linked post - ensure the url has `urn:li:activity` or similar in it.\n\nFor example:\n\n```\n[linkedin=https://www.linkedin.com/feed/update/urn:li:activity:6856570271759949825/ ]\n```\n\n**Properties:**\n\n- height\n- width\n- loading - defaults to `lazy` but can be set to `eager`\n\n**Defaults:**\n\n```\n[linkedin=LINK width=\"100%\" height=\"600\"]\n```\n\n### Soundcloud\n\n`[soundcloud]`\n\nShows a Soundcloud player for a track or artists - can have the size \u0026 colour customised. Use the URL\n\nFor example:\n\n```\n[soundcloud=https://soundcloud.com/cbschmidt/seodriven-331 ]\n```\n\n**Properties:**\n\n- url\n- maxwidth\n- maxheight - can be 166 or 450\n- color\n- auto_play\n- show_comments\n\n### Spotify\n\n`[spotify]`\n\nGo to Spotify and click on what you want to embed - song, artist, playlist etc.\n\nClick the 3 dots -\u003e Share -\u003e Copy Link\n\n```\n[spotify=https://open.spotify.com/track/3gdewACMIVMEWVbyb8O9sY?si=145df8aede6a4b04 ]\n```\n\n**Properties:**\n\n- height - can be 80 or 380\n- theme - can be 1 or 0 (disables the coloured background)\n- loading - defaults to `lazy` but can be set to `eager`\n\n**Defaults:**\n\n```\n[spotify=LINK height=\"380\" theme=\"1\"]\n```\n\n### X\n\n`[x | twitter | tweet]`\n\nCopy the URL (or the status code) of a tweet\n\n```\n[x=https://twitter.com/Interior/status/463440424141459456 ]\n```\n\n**Properties:**\n\nAny properties are passed through to the [oembed-api](https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/oembed-api), so the list \u0026 defaults can be found there\n\n```\n[tweet=https://twitter.com/Interior/status/463440424141459456 theme=\"light\"]\n```\n\n### Video\n\n`[video]`\n\nThe video element outputs an `\u003ciframe\u003e` with the src of that passed in. It allows an arbitrary URL to a video to be passed in and it will wrap it in a `\u003cdiv\u003e` for responsive styling purposes.\n\n```\n[video=https://www.liquidlight.co.uk/path/to/video ]\n```\n\n**Properties**\n\n- code - optional if using the shorthand syntax\n- url - optional if using the shorthand syntax\n- width\n- height\n- ratio - video ratio in a colon format (e.g. `ratio=\"4:3\"`) - defaults to `16:9` - rendered as a `data-ratio` attribute for styling\n- loading - defaults to `lazy` but can be set to `eager`\n\n### Vimeo\n\n`[vimeo]`\n\nRenders a Vimeo iframe embed. Can take a full URL or code.\n\n```\n[vimeo=]\n```\n\nSee [Video](#video) for properties and use.\n\n### YouTube\n\n`[youtube]`\n\nRenders a YouTube iframe embed. Can take a full URL or code.\n\n```\n[youtube=https://www.youtube.com/watch?v=JrFFN9lag2w ]\n```\n\nSee [Video](#video) for properties and use.\n\n## Semantic HTML\n\nTo ensure your HTML remains semantic, shortcode elements will break out of typographic elements and remove any empty sibling elements.\n\nFor example, if your editor had entered the following in the RTE:\n\n```html\n\u003cp\u003eYou can watch our latest video [youtube code=123] here\u003c/p\u003e\n```\n\nYou will find the following HTML output\n\n```html\n\u003cp\u003eYou can watch our latest video\u003c/p\u003e\n\u003cdiv class=\"shortcode video youtube\" data-ratio=\"16:9\"\u003e\u003ciframe src=\"https://www.youtube-nocookie.com/embed/123\" title=\"Youtube\" loading=\"lazy\" allowfullscreen=\"\"\u003e\u003c/iframe\u003e\u003c/div\u003e\n\u003cp\u003ehere\u003c/p\u003e\n```\n\nIf, once the shortcode is placed after it's original element, the original element would be empty, it gets removed from the HTML.\n\nElements which the shortcode will break out from:\n\n- pre\n- h1\n- h2\n- h3\n- h4\n- h5\n- h6\n- p\n\nThe extension will also ensure inline elements (such as `span`, `a` etc.) are closed appropriately.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidlight%2Ftypo3-shortcodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliquidlight%2Ftypo3-shortcodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidlight%2Ftypo3-shortcodes/lists"}