summaryrefslogtreecommitdiff
path: root/_includes/pageview.html
blob: bb31b158f99502402aaa872d9cdeab419d5c0ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{%- include snippets/assign.html target=site.data.variables.default.pageview source0=page.pageview -%}
{%- assign _pageview = __return -%}


{%- if page.layout == "home" -%}

  {%- if jekyll.environment != "development" -%}
    {%- if site.pageview.provider == 'leancloud' -%}
      {%- include pageview-providers/leancloud/home.html -%}
    {%- elsif site.pageview.provider == 'custom' -%}
      {%- include pageview-providers/custom/home.html -%}
    {%- endif -%}
  {%- endif -%}


{%- elsif page.layout == "article" -%}
  {%- if _pageview -%}

    {%- if jekyll.environment != "development" and
      jekyll.environment != "beta" -%}
      {%- if site.pageview.provider == 'leancloud' -%}
        {%- include pageview-providers/leancloud/post.html -%}
      {%- elsif site.pageview.provider == 'custom' -%}
        {%- include pageview-providers/custom/post.html -%}
      {%- endif -%}
    {%- endif -%}

  {%- endif -%}
{%- endif -%}