Skip to content

Instantly share code, notes, and snippets.

View guillaumebcom's full-sized avatar

guillaumebcom

View GitHub Profile
@guillaumebcom
guillaumebcom / tumblrgeo3.js
Last active December 7, 2017 15:06
Tumblr geo-tagging 3
{block:HasTags}
<script type="text/javascript">
var tags = new Array();
{block:Tags}
tags.push({JSTag});
{/block:Tags}
$(document).ready(function(){
$("#post-{PostID}").data('tags', tags)
});
// find the address/location in the tags
@guillaumebcom
guillaumebcom / tumblrgeo2.html
Last active December 7, 2017 15:07
Tumblr Geo-tagging 2
{block:IfEnableGeotag}
<div id="map-wrap">
<section id="map-canvas"/>
</div>
{/block:IfEnableGeotag}
@guillaumebcom
guillaumebcom / Tumblrgeo.js
Created December 7, 2017 14:18
Tumblr Geo-tagging - 1
{block:IfEnableGeotag}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={text:Google Maps Key}&sensor=false"></script>
<script type="text/javascript">
var map; // global Google Map object
google.maps.visualRefresh = true; // enable new gmap look for opt-inners
// start Google Map
google.maps.event.addDomListener(window, 'load', function() {
var mapOptions = {
<script>
$.ajax(document.location.href, {type: 'HEAD'}).fail(function (jqXHR, textStatus, errorThrown) {
if (jqXHR.status == 404)
location.href = document.location.protocol + '//' + document.domain + '/YOUR_CUSTOM_404_PAGE_NAME';
});
</script>
@guillaumebcom
guillaumebcom / SnapWidget
Created December 28, 2016 14:54
Corrected SnapWidget
<!-- SnapWidget -->
<script src="https://snapwidget.com/js/snapwidget.js"></script>
<object data src="https://snapwidget.com/embed/code/220805" class="snapwidget-widget" allowTransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:100%; "></object>
@guillaumebcom
guillaumebcom / Snapwidget
Created December 28, 2016 14:49
Snapwidget
<!-- SnapWidget -->
<script src="https://snapwidget.com/js/snapwidget.js"></script>
<iframe src="https://snapwidget.com/embed/code/220805" class="snapwidget-widget" allowTransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:100%; "></iframe>
@guillaumebcom
guillaumebcom / geestreamgist
Created December 27, 2016 14:22
Tumblr Gist
.gist{text-shadow:none!important;border-bottom:0px!important;}
.gist tbody{background:#F9F9F3; color:#222!important;}
.blob-num{color:#777!important;}
.blob-code-inner{ color:#222!important; }
.gist-meta{display:none!important;}
.gist .gist-file{border-top:0px!important; border-right:0px!important; border-left:1px solid #DE5E60 !important;}
.gist .gist-data {border-bottom:0px!important;}
@guillaumebcom
guillaumebcom / Meta Keywords
Last active December 19, 2016 17:19
Tumblr SEO
<meta name=”keywords” content=”
{block:IndexPage}Enter keyword for the Index Page{/block:IndexPage}
{block:PermalinkPage}{block:Posts}{block:Tags}{Tag}, {/block:Tags}{/block:Posts}{/block:PermalinkPage}
” />
@guillaumebcom
guillaumebcom / Twitter card
Created December 19, 2016 15:09
Tumblr SEO
{block:PermalinkPage}
<meta name="twitter:url" content="{Permalink}"/>
<meta name="twitter:site" content="@myblogstwitter">
<meta name="twitter:creator" content="@authortwitter">
{block:Posts}
{block:Text}
<meta name="twitter:card" content="summary">
{block:Title}<meta name="twitter:title" content="{PlaintextTitle}"/>{/block:Title}
@guillaumebcom
guillaumebcom / Open Graph
Created December 19, 2016 15:05
Tumblr SEO
<meta property="og:type" content="blog" />
<meta property="og:site_name" content="{Title}" />
<meta property="og:title" content="
{block:IndexPage}Write a description specifically for Facebook{/block:IndexPage}
{block:PostSummary}{PostSummary}{/block:PostSummary}"
/>
<meta property="og:url" content="
{block:IndexPage}YOUR BLOG URL{/block:IndexPage}
{block:PermalinkPage}{Permalink}{/block:PermalinkPage}"
/>