<meta property="og:title" content="title" />
<meta property="og:description" content="desc" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://url.com/" />
<meta property="og:image" content="http://url.com/image.jpg" />
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function targetBlank() { | |
| // remove subdomain of current site's url and setup regex | |
| var internal = location.host.replace("www.", ""); | |
| internal = new RegExp(internal, "i"); | |
| var a = document.getElementsByTagName('a'); // then, grab every link on the page | |
| for (var i = 0; i < a.length; i++) { | |
| var href = a[i].host; // set the host of each link | |
| if( !internal.test(href) ) { // make sure the href doesn't contain current site's host | |
| a[i].setAttribute('target', '_blank'); // if it doesn't, set attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Enqueue typekit fonts into WordPress using wp_enqueue_scripts. | |
| * | |
| * @author Robert Neu | |
| * @author Eric Fernandez | |
| * @copyright Copyright (c) 2014, Robert Neu | |
| * @license GPL-2.0+ | |
| * @link http://typekit.com | |
| */ |
SSH into your server and stay in the home directory of the user.
Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.
For the commands to be loaded from the bin directory run echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc. For the new config to be used run source ~/.bashrc or close and reopen your SSH session.
Replace an asset with a new file. Also renames the asset to the new name (Statamic will update references).
- The asset Browse button doesn't seem to work inside an action modal (statamic/cms#4785). Not a huge issue as you'll probably be uploading a new file anyway, but if it did work you could replace one asset with another, which might be useful.
- If you upload a new file and then click Cancel instead of Run the new file will remain at the root of the container.
- If you select multiple assets only the first will be replaced.