A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
<?php | |
/** | |
* YouTube Preg Match Test Case. | |
* | |
* @author Mario "Kuroir" Ricalde | |
*/ | |
// Regular Expression (the magic). | |
$youtube_regexp = "/^http:\/\/(?:www\.)?(?:youtube.com|youtu.be)\/(?:watch\?(?=.*v=([\w\-]+))(?:\S+)?|([\w\-]+))$/"; |
<?php | |
/** | |
* Insert thumbnail by URL | |
* Is very good to execute wp_insert_post | |
* | |
* @author Lenivene Bezerra | |
* @param string $url Image url external or no | |
* @param int $post_ID Post id to insert thumbnail | |
* @return ID Thumbnail | WP_Error | |
*/ |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="Table de courbes de Lissajous"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Table de courbes de Lissajous</title> | |
<style type="text/css"> | |
body { background-color: black; } | |
</style> |
curl -L http://bit.ly/10hA8iC | bash |
new Swipe(document.getElementById("gallery"), function(event, direction) { | |
event.preventDefault(); | |
switch (direction) { | |
case "up": | |
// Handle Swipe Up | |
break; | |
case "down": | |
// Handle Swipe Down | |
break; |
<?php | |
add_action( 'wp_enqueue_scripts', function () { | |
wp_register_script( 'my-script', get_stylesheet_directory_uri() . '/assets/js/my-script.js' ); | |
wp_enqueue_script( 'my-script' ); | |
} ); | |
add_filter( 'script_loader_tag', function ( $tag, $handle ) { |
// Functions and mixin to convert `px` values into `em` units | |
// | |
// px-to-em can easily be changed to `rem` values | |
// Change any instance of `em` to `rem` | |
// | |
// EXAMPLE: | |
// .foo { | |
// @include em(margin, 10px auto); | |
// padding: em(1px 2 3px 4); | |
// } |
<?php // Don't copy this line if you are inserting in a file that has it already. | |
/** | |
* ACF Options Page | |
* | |
* Instructions: | |
* Add more languages to the array below: $languages | |
* | |
* @author: Zeshan Ahmed <https://zeshanahmed.com/> | |
*/ |
license: gpl-3.0 | |
height: 570 | |
border: no |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes: