partials-collection
v0.1.0
Published
A collection of partials.
Downloads
5
Readme
partials-collection
A collection of partials that are usable in a number of layouts.
google-tag-manager.html
Adds the necessary script for Google Tag Manager.
Requires a GTM ID.
Example usage in a Liquid template:
{% include google-tag-manager.html id=site.google_tag_manager %}
Keep in sync with Google Tag Manager for Web Tracking - Quick Start Guide.
disqus-comments.html
Adds the necessary script for Disqus comments.
Requires the site shortname and an optional page identifier.
Example usage in a Liquid template:
{% if page.comments %}
{% include disqus-comments.html
shortname=site.disqus_shortname
identifier=site.disqus_identifier | append:page.url | replace:"index.html", ""
%}
{% endif %}
Keep in sync with Disqus Setup Instructions for Universal Code.
Liquid Partials
The following partials use Liquid syntax.
liquid/head.html
Adds a container for various head partials. All of the partials listed in the next section are included.
Head Partials
liquid/head-canonical.html
Add a canonical URL.
Requires the URL of the page, the base URL for the page, the URL for the site, and the title of the page.
Example usage in a Liquid template:
{% include head-canonical.html
url=page.url
baseurl=site.baseurl
siteurl=site.url
title=site.title
%}
liquid/head-description.html
Add a description of the page, based on either the page content or a description of the whole site.
liquid/head-title.html
Add a title for the page, based on either the page itself or the title of the whole site.
head-charset-utf-8.html
Adds the UTF-8 charset meta tag.
head-fonts.html
This can be overridden in order to provide font information.
head-styles.html
This can be overridden in order to provide style information.
head-ie-legacy-document-mode.html
Adds settings for Internet Explorer Legacy Document mode.
head-viewport.html
Adds the viewport settings.
homescreen-android.html
Add tags for setting a homescreen link on Android.
homescreen-ios.html
Add tags for setting a homescreen link on iOS.
homescreen-win8.html
Add tags for setting the icon on Windows 8.