From cb844a1913c74d5134f86de49a6922a083034eb2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 17:18:10 -0400 Subject: [PATCH 1/8] Add liquid to languages.yml. --- lib/linguist/languages.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9cc180f1..497c7aba 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -816,6 +816,11 @@ HTML+PHP: group: HTML primary_extension: .phtml +HTML+Liquid: + type: markup + group: HTML + primary_extension: .html + HTTP: type: data primary_extension: .http @@ -1066,6 +1071,13 @@ LilyPond: extensions: - .ily +Liquid: + type: markup + lexer: Liquid + primary_extension: .liquid + extensions: + - .html + Literate Agda: type: programming group: Agda From ccce5475bfbf9456da02c5b0a571f63a9840fd5a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 17:45:16 -0400 Subject: [PATCH 2/8] Add Liquid samples. --- samples/Liquid/layout.liquid | 104 +++++++++++++++++++++++++++++++++ samples/Liquid/template.liquid | 70 ++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 samples/Liquid/layout.liquid create mode 100644 samples/Liquid/template.liquid diff --git a/samples/Liquid/layout.liquid b/samples/Liquid/layout.liquid new file mode 100644 index 00000000..7954c7ec --- /dev/null +++ b/samples/Liquid/layout.liquid @@ -0,0 +1,104 @@ + + + + + + {{shop.name}} - {{page_title}} + + {{ 'textile.css' | global_asset_url | stylesheet_tag }} + {{ 'lightbox/v204/lightbox.css' | global_asset_url | stylesheet_tag }} + + {{ 'prototype/1.6/prototype.js' | global_asset_url | script_tag }} + {{ 'scriptaculous/1.8.2/scriptaculous.js' | global_asset_url | script_tag }} + {{ 'lightbox/v204/lightbox.js' | global_asset_url | script_tag }} + {{ 'option_selection.js' | shopify_asset_url | script_tag }} + + {{ 'layout.css' | asset_url | stylesheet_tag }} + {{ 'shop.js' | asset_url | script_tag }} + + {{ content_for_header }} + + + + +

Skip to navigation.

+ + {% if cart.item_count > 0 %} + + {% endif %} + +
+ +
+
+ +
+
+ {{ content_for_layout }} +
+
+ +
+
+ + + + {% if tags %} + + {% endif %} + + + +
+ +

+ + + +
+
+ +
+ + + + diff --git a/samples/Liquid/template.liquid b/samples/Liquid/template.liquid new file mode 100644 index 00000000..5502c2e7 --- /dev/null +++ b/samples/Liquid/template.liquid @@ -0,0 +1,70 @@ +

We have wonderful products!

+ From 55ce1e8b93be06adee29932bc0a5beef3ca1cfc2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 18:02:33 -0400 Subject: [PATCH 3/8] Remove HTML+Liquid language. --- lib/linguist/languages.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 497c7aba..e55a1656 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -816,11 +816,6 @@ HTML+PHP: group: HTML primary_extension: .phtml -HTML+Liquid: - type: markup - group: HTML - primary_extension: .html - HTTP: type: data primary_extension: .http @@ -883,7 +878,7 @@ INI: - .prefs - .properties primary_extension: .ini - + Inno Setup: primary_extension: .iss lexer: Text only @@ -1022,7 +1017,7 @@ KRL: type: programming color: "#f5c800" primary_extension: .krl - + Kit: type: markup lexer: HTML From 915a11f2b6b5395b0978aebe4f8d859637d26569 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 18:12:10 -0400 Subject: [PATCH 4/8] type can also be "prose" --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e55a1656..ff5bc97d 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3,7 +3,7 @@ # All languages have an associated lexer for syntax highlighting. It # defaults to name.downcase, which covers most cases. # -# type - Either data, programming, markup, or nil +# type - Either data, programming, markup, prose, or nil # lexer - An explicit lexer String (defaults to name) # aliases - An Array of additional aliases (implicitly # includes name.downcase) From 6c3f8a7787b4631297fc4a14b7afc70e2e465837 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 18:12:19 -0400 Subject: [PATCH 5/8] For now, let's just use a Text-only Liquid lexer. --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ff5bc97d..cc10b8e0 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1068,7 +1068,7 @@ LilyPond: Liquid: type: markup - lexer: Liquid + lexer: Text only primary_extension: .liquid extensions: - .html From 3c21f8db51b93574d682fcc8d1859ef909cb8774 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 22:54:04 -0400 Subject: [PATCH 6/8] Update samples.json with Liquid samples. --- lib/linguist/samples.json | 178 +++++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 3 deletions(-) diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 874fd829..b9752913 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -262,6 +262,9 @@ "LFE": [ ".lfe" ], + "Liquid": [ + ".liquid" + ], "Literate Agda": [ ".lagda" ], @@ -671,8 +674,8 @@ ".gemrc" ] }, - "tokens_total": 588287, - "languages_total": 706, + "tokens_total": 588920, + "languages_total": 708, "tokens": { "ABAP": { "*/**": 1, @@ -33947,6 +33950,173 @@ "info": 1, "reproduce": 1 }, + "Liquid": { + "": 1, + "html": 1, + "PUBLIC": 1, + "W3C": 1, + "DTD": 2, + "XHTML": 1, + "1": 1, + "0": 1, + "Transitional": 1, + "EN": 1, + "http": 2, + "www": 1, + "w3": 1, + "org": 1, + "TR": 1, + "xhtml1": 2, + "transitional": 1, + "dtd": 1, + "": 1, + "xmlns=": 1, + "xml": 1, + "lang=": 2, + "": 1, + "": 1, + "equiv=": 1, + "content=": 1, + "": 1, + "{": 89, + "shop.name": 2, + "}": 89, + "-": 4, + "page_title": 1, + "": 1, + "|": 31, + "global_asset_url": 5, + "stylesheet_tag": 3, + "script_tag": 5, + "shopify_asset_url": 1, + "asset_url": 2, + "content_for_header": 1, + "": 1, + "": 1, + "id=": 28, + "

": 1, + "class=": 14, + "": 9, + "href=": 9, + "Skip": 1, + "to": 1, + "navigation.": 1, + "": 9, + "

": 1, + "%": 46, + "if": 5, + "cart.item_count": 7, + "
": 23, + "style=": 5, + "

": 3, + "There": 1, + "pluralize": 3, + "in": 8, + "title=": 3, + "your": 1, + "cart": 1, + "

": 3, + "

": 1, + "Your": 1, + "subtotal": 1, + "is": 1, + "cart.total_price": 2, + "money": 5, + ".": 3, + "

": 1, + "for": 6, + "item": 1, + "cart.items": 1, + "onMouseover=": 2, + "onMouseout=": 2, + "": 4, + "src=": 5, + "
": 23, + "endfor": 6, + "
": 2, + "endif": 5, + "

": 1, + "

": 1, + "onclick=": 1, + "View": 1, + "Mini": 1, + "Cart": 1, + "(": 1, + ")": 1, + "
": 3, + "content_for_layout": 1, + "
    ": 5, + "link": 2, + "linklists.main": 1, + "menu.links": 1, + "
  • ": 5, + "link.title": 2, + "link_to": 2, + "link.url": 2, + "
  • ": 5, + "
": 5, + "tags": 1, + "tag": 4, + "collection.tags": 1, + "": 1, + "link_to_add_tag": 1, + "": 1, + "highlight_active_tag": 1, + "link_to_tag": 1, + "linklists.footer.links": 1, + "All": 1, + "prices": 1, + "are": 1, + "shop.currency": 1, + "Powered": 1, + "by": 1, + "Shopify": 1, + "": 1, + "": 1, + "

": 1, + "We": 1, + "have": 1, + "wonderful": 1, + "products": 1, + "

": 1, + "image": 1, + "product.images": 1, + "forloop.first": 1, + "rel=": 2, + "alt=": 2, + "else": 1, + "product.title": 1, + "Vendor": 1, + "product.vendor": 1, + "link_to_vendor": 1, + "Type": 1, + "product.type": 1, + "link_to_type": 1, + "": 1, + "product.price_min": 1, + "product.price_varies": 1, + "product.price_max": 1, + "": 1, + "
": 1, + "action=": 1, + "method=": 1, + "": 1, + "": 1, + "type=": 2, + "
": 1, + "product.description": 1, + "": 1 + }, "Literate Agda": { "documentclass": 1, "{": 35, @@ -61962,6 +62132,7 @@ "Latte": 759, "Less": 39, "LFE": 1711, + "Liquid": 633, "Literate Agda": 478, "Literate CoffeeScript": 275, "LiveScript": 123, @@ -62137,6 +62308,7 @@ "Latte": 2, "Less": 1, "LFE": 4, + "Liquid": 2, "Literate Agda": 1, "Literate CoffeeScript": 1, "LiveScript": 1, @@ -62236,5 +62408,5 @@ "YAML": 2, "Zephir": 2 }, - "md5": "9cc12f291dc1b2d049fb7696ac69c345" + "md5": "6b0c98c8e022758367e53a8295a3c997" } \ No newline at end of file From cbcbb969d5014cbcd15a4dc83a1669b8f540c451 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 23 Apr 2014 23:02:19 -0400 Subject: [PATCH 7/8] Add XML, HTML and JSON samples for Liquid. --- lib/linguist/languages.yml | 2 + lib/linguist/samples.json | 271 ++++++++++++++++++++++++++++++------- samples/Liquid/feed.xml | 44 ++++++ samples/Liquid/jekyll.html | 84 ++++++++++++ samples/Liquid/posts.json | 1 + 5 files changed, 355 insertions(+), 47 deletions(-) create mode 100644 samples/Liquid/feed.xml create mode 100644 samples/Liquid/jekyll.html create mode 100644 samples/Liquid/posts.json diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index cc10b8e0..e2deec79 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1072,6 +1072,8 @@ Liquid: primary_extension: .liquid extensions: - .html + - .json + - .xml Literate Agda: type: programming diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index b9752913..9dfd0466 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -263,7 +263,10 @@ ".lfe" ], "Liquid": [ - ".liquid" + ".html", + ".json", + ".liquid", + ".xml" ], "Literate Agda": [ ".lagda" @@ -674,8 +677,8 @@ ".gemrc" ] }, - "tokens_total": 588920, - "languages_total": 708, + "tokens_total": 589521, + "languages_total": 711, "tokens": { "ABAP": { "*/**": 1, @@ -33951,6 +33954,220 @@ "reproduce": 1 }, "Liquid": { + "": 1, + "version=": 2, + "encoding=": 1, + "": 1, + "xmlns": 6, + "content=": 2, + "wfw=": 1, + "dc=": 1, + "atom=": 1, + "sy=": 1, + "slash=": 1, + "": 1, + "": 4, + "xml": 2, + "lang=": 3, + "Jekyll": 6, + "Simple": 3, + "blog": 3, + "-": 17, + "aware": 3, + "static": 5, + "sites": 3, + "": 4, + "": 1, + "type=": 3, + "href=": 19, + "rel=": 3, + "": 3, + "http": 8, + "//jekyllrb.com/": 2, + "": 3, + "": 2, + "{": 119, + "site.time": 2, + "|": 39, + "date_to_rfc822": 3, + "}": 119, + "": 2, + "": 1, + "": 1, + "": 1, + "en": 1, + "US": 1, + "": 1, + "": 1, + "v": 1, + "jekyll.version": 1, + "": 1, + "": 3, + "Transform": 3, + "your": 7, + "plain": 3, + "text": 3, + "into": 3, + "websites": 3, + "and": 6, + "blogs.": 3, + "": 3, + "": 1, + "": 1, + "//jekyllrb.com/img/logo": 1, + "rss.png": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "": 1, + "%": 58, + "for": 11, + "post": 1, + "in": 12, + "site.posts": 2, + "": 1, + "post.title": 1, + "xml_escape": 4, + "//jekyllrb.com": 2, + "post.url": 2, + "post.date": 1, + "": 1, + "post.author": 1, + "": 1, + "tag": 6, + "post.tags": 1, + "": 2, + "": 2, + "endfor": 9, + "cat": 2, + "post.categories": 1, + "": 1, + "isPermaLink=": 1, + "": 1, + "post.content": 1, + "": 1, + "": 1, + "": 1, + "
": 4, + "class=": 58, + "
": 41, + "

": 12, + "&": 10, + "nbsp": 4, + ";": 10, + "

": 12, + "
": 41, + "
": 4, + "

": 7, + "

": 7, + "No": 1, + "more": 2, + "databases": 1, + "comment": 1, + "moderation": 1, + "or": 2, + "pesky": 1, + "updates": 1, + "to": 3, + "install": 2, + "just": 1, + "": 3, + "content": 1, + "": 3, + ".": 5, + "": 18, + "How": 1, + "works": 1, + "rarr": 4, + "": 18, + "Static": 2, + "Markdown": 1, + "(": 2, + "Textile": 1, + ")": 2, + "Liquid": 1, + "HTML": 1, + "": 15, + "amp": 1, + "": 15, + "CSS": 1, + "go": 1, + "in.": 1, + "come": 1, + "out": 1, + "ready": 1, + "deployment.": 1, + "template": 1, + "guide": 1, + "Blog": 1, + "Permalinks": 1, + "categories": 1, + "pages": 1, + "posts": 1, + "custom": 2, + "layouts": 1, + "are": 3, + "all": 1, + "first": 1, + "class": 1, + "citizens": 1, + "here.": 1, + "Migrate": 1, + "

": 2, + "Get": 1, + "up": 1, + "running": 1, + "seconds": 1, + "

": 2, + "Quick": 1, + "start": 1, + "Instructions": 1, + "gem": 1, + "jekyll": 3, + "new": 1, + "my": 2, + "awesome": 3, + "site": 4, + "cd": 1, + "/my": 1, + "serve": 1, + "#": 1, + "Now": 1, + "browse": 1, + "//localhost": 1, + "": 5, + "src=": 6, + "width=": 1, + "height=": 1, + "alt=": 3, + "": 1, + "Free": 1, + "hosting": 2, + "": 1, + "with": 2, + "GitHub": 4, + "Pages": 3, + "Sick": 1, + "of": 1, + "dealing": 1, + "companies": 1, + "powered": 1, + "by": 2, + "so": 1, + "you": 1, + "can": 1, + "easily": 1, + "deploy": 1, + "using": 1, + "free": 1, + "mdash": 1, + "domain": 1, + "name": 1, + "all.": 1, + "Learn": 1, + "about": 1, "": 1, "html": 1, "PUBLIC": 1, @@ -33961,7 +34178,6 @@ "0": 1, "Transitional": 1, "EN": 1, - "http": 2, "www": 1, "w3": 1, "org": 1, @@ -33971,20 +34187,11 @@ "dtd": 1, "": 1, "xmlns=": 1, - "xml": 1, - "lang=": 2, "": 1, "": 1, "equiv=": 1, - "content=": 1, - "": 1, - "{": 89, "shop.name": 2, - "}": 89, - "-": 4, "page_title": 1, - "": 1, - "|": 31, "global_asset_url": 5, "stylesheet_tag": 3, "script_tag": 5, @@ -33994,45 +34201,24 @@ "": 1, "": 1, "id=": 28, - "

": 1, - "class=": 14, - "": 9, - "href=": 9, "Skip": 1, - "to": 1, "navigation.": 1, - "": 9, - "

": 1, - "%": 46, "if": 5, "cart.item_count": 7, - "
": 23, "style=": 5, - "

": 3, "There": 1, "pluralize": 3, - "in": 8, "title=": 3, - "your": 1, "cart": 1, - "

": 3, - "

": 1, "Your": 1, "subtotal": 1, "is": 1, "cart.total_price": 2, "money": 5, - ".": 3, - "

": 1, - "for": 6, "item": 1, "cart.items": 1, "onMouseover=": 2, "onMouseout=": 2, - "": 4, - "src=": 5, - "
": 23, - "endfor": 6, "
": 2, "endif": 5, "

": 1, @@ -34041,8 +34227,6 @@ "View": 1, "Mini": 1, "Cart": 1, - "(": 1, - ")": 1, "
": 3, "content_for_layout": 1, "
    ": 5, @@ -34056,23 +34240,19 @@ "": 5, "
": 5, "tags": 1, - "tag": 4, "collection.tags": 1, - "": 1, "link_to_add_tag": 1, - "": 1, "highlight_active_tag": 1, "link_to_tag": 1, "linklists.footer.links": 1, "All": 1, "prices": 1, - "are": 1, "shop.currency": 1, "Powered": 1, - "by": 1, "Shopify": 1, "": 1, "": 1, + "jsonify": 1, "

": 1, "We": 1, "have": 1, @@ -34082,8 +34262,6 @@ "image": 1, "product.images": 1, "forloop.first": 1, - "rel=": 2, - "alt=": 2, "else": 1, "product.title": 1, "Vendor": 1, @@ -34111,7 +34289,6 @@ "": 1, "": 1, "": 1, - "type=": 2, "": 1, "product.description": 1, "