This file contains 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
/** | |
* Search by Google Custom Search Engine JSON API | |
* @param options : (object) | |
*/ | |
var GoogleCustomSearch = function(options) { | |
SearchService.apply(this, arguments); | |
var self = this; | |
var endpoint = "https://www.googleapis.com/customsearch/v1"; | |
/** |
This file contains 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
<form id="contact-form" action="//formspree.io/[email protected]" method="post"> | |
<input type="text" name="Name" placeholder="Name" required> | |
<input type="email" name="Email" placeholder="Email" required> | |
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea> | |
<!-- CONFIG --> | |
<input class="is-hidden" type="text" name="_gotcha"> | |
<input type="hidden" name="_subject" value="Subject"> | |
<input type="hidden" name="_cc" value="[email protected]"> | |
<!-- /CONFIG --> | |
<input class="submit" type="submit" value="Send"> |
This file contains 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
- Arts: | |
- Design | |
- Fashion & Beauty | |
- Food | |
- Literature | |
- Performing Arts | |
- Spoken Word | |
- Visual Arts | |
- Business: | |
- Business News |
This file contains 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
var sys = require("sys"), | |
fs = require("fs"); | |
function processImageDir(path, outFilename, cb) { | |
fs.readdir(path, function(err, files) { | |
var imgfiles = []; | |
// Check for images and push on the array if it's a match. | |
files.forEach(function(name) { |
This file contains 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
Yes, you can achieve this without getting your hands dirty. Just add the actors in the front matter of any posts: | |
actors: | |
- Brad | |
- Matt | |
Then you can add post.actors to your theme, exactly the same as the default post.tags. | |
With the official theme landscape, just modify layout/article.ejs. | |
If you want to list all the actors of all the posts, you should check HEXO/lib/plugins/helper/list.js. It's not hard to implement a list_actors(). |
This file contains 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
# http://blog.konstantinpavlov.net/2015/01/17/hexo-useful-tips/ | |
# If you want your tags and categories on your language and the URLs still look nice in ASCII, | |
# you may use tag_map and category_map parameters in _config.yml file of your blog. | |
# You can even set one URL prefix for two different tags. | |
tag_map: | |
tag1: supertag | |
по-русски: in-russian | |
fun: fun and jokes | |
jokes: fun and jokes |
This file contains 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
# code is from http://helw.net/2015/07/19/migrating-to-hugo-from-hexo/ | |
# Ran fine on Windows 10 with MSysGit installed | |
# cd to directory with all the md files from Hexo | |
# bash hexo2hugo.sh | |
--- | |
# ensure dates don't start with single quotes | |
for file in *; do awk '{ | |
if ($1 == "date:") { | |
gsub("\047", "", $0); print; | |
} else { |