Shogun makes some small additions to your pages that allows the application to allow you to create your pages. These are non-destructive theme additions that are required for the app to run. 

Layout

A small addition is made to the theme.liquid file to allow Shogun to load the Shogun library files into the pages of your site. The code is as follows.

{% render 'shogun-head' %}

Shogun also adds a file called theme.shogun.landing.liquid to the layout folder, which allows you to create landing pages within Shogun.

Templates

In the template files, small additions are made to the already established theme template files to add Shogun dropzones to the templates. Shogun dropzones are what allow you to drop your content onto your page when you are inside of the Shogun editor.

In the product.liquid file and any product.*.liquid files, the following lines of code are added. There may be additional content between these lines of code.

{% render 'shogun-products', content: product %}
{{product.metafields.shogun.above}}

{{product.metafields.shogun.below}}

In the page.liquid file and any page.*.liquid files, the following lines of code are added. There may be additional content between these lines of code.

{% render 'shogun-products', content: page %}

In the collection.liquid file and any collection.*.liquid files, the following lines of code are added. There may be additional content between these lines of code.

{% render 'shogun-products', content: collection %}
{{collection.metafields.shogun.above}}

{{collection.metafields.shogun.below}}

In the article.liquid file and any article.*.liquid files, the following lines of code are added. There may be additional content between these lines of code.

{% render 'shogun-products', content: article %}


As well as modifying your theme files, Shogun also adds three files to your templates folder.

  • page.shogun.default.liquid allows you to create a default page within Shogun
  • page.shogun.landing.liquid allows you to create a landing page within Shogun
  • product.shogun.custom.liquid allows you to create custom product pages within Shogun

Snippets

Two snippets are added into the theme on installation of Shogun and are required in order to load the correct libraries into your Shogun pages.

  • shogun-head.liquid
  • shogun-products.liquid

Notes regarding Shogun theme files

Certain Shogun files may get re-written at any time and are not recommended to be edited, these are visible in the theme files and are marked with a comment explaining this at the top of the file.

{% comment %}
Auto-generated by Shogun.
This file can be re-written at any time.
{% endcomment %}

Did this answer your question?