Skip to content

Instantly share code, notes, and snippets.

View rameshanandakrishnan's full-sized avatar

Ramesh Anandakrishnan rameshanandakrishnan

View GitHub Profile
<?= \Uri::create('assets/img/preloaders/large-search-preloader.gif');?>
<?php echo Lang::get('my_account') ?>
<?php echo Casset::img('test.jpg', 'alt text', array('width' => 200)); ?>
<a href="whatsapp://send?text={{ product.title | escape }} {{ shop.url | escape }}{{ product.url | escape }}">
<!-- It is important to understand that SwiftType uses Shopify's robots.txt to know which pages to crawl for suggestions.
So it will look at 'page' pages, blog pages, collection pages and product pages.
It will also crawl the home page and /serach page unless those are deleted in the SwiftType account under Pages.
It will look at collection-agnostic product URLs, because that's what robots.txt tells it to do.
So no collection-aware product pages will be crawled. -->
<!-- Other important consideration: as title for the suggestion, SwiftType uses the content of the title tag, or any h1 or h2 tags, on the page.
For most searches, the content title will show up nicely: product title if searching for a product, collection title if searching for a collection, etc.
Since Shopify 2, one can set up a SEO title for each product, and we don't want it to come up, so we can force a few things for product pages:
product title, also add vendor name, product type, product tags, and product image...-->
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
<!-- Find Current URL for og:url tag
https://github.com/joshuacc/Shopify-Snippets/blob/master/find-current-url.liquid -->
{% assign current_url = '' %}
{% case template %}
{% when 'page' %}
{% assign current_url = page.url %}
{% when 'blog' %}
{% assign current_url = blog.url %}
{% when 'article' %}
{% assign current_url = blog.url %}
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod
@rameshanandakrishnan
rameshanandakrishnan / Shopify Blog Archives
Last active August 29, 2015 14:26 — forked from zakhardage/Shopify Blog Archives
Archives widget for shopify blog sidebar
{% capture dates %}2013 2014 2015 2016 2017 2018 2019 2020{% endcapture %}
{% capture tags %}{% for tag in blog.all_tags %}{{ tag }} {% endfor %}{% endcapture %}
<div id="categories" class="widget">
<h2>Categories</h2>
{% for tag in blog.all_tags %}
{% assign check = tag | downcase | split:' ' %}
{% unless dates contains check[0] %}
<a href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>
{% endunless %}
{% endfor %}
@rameshanandakrishnan
rameshanandakrishnan / flightplan-deploy.md
Created November 23, 2015 15:54 — forked from learncodeacademy/flightplan-deploy.md
Deploy Node.js Apps with Flightplan

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file