mirror of
https://github.com/kemko/liquid.git
synced 2026-01-05 17:55:40 +03:00
Add favicon and better metadata
This commit is contained in:
@@ -16,12 +16,29 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
|
||||
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
|
||||
<link rel="icon" type="image/png" href="{{ '/images/icons/water-drop-32x.png' | prepend: site.baseurl }}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ '/images/icons/water-drop-64x.png' | prepend: site.baseurl }}" sizes="64x64">
|
||||
<link rel="icon" href="{{ '/images/icons/water-drop.svg' | prepend: site.baseurl }}">
|
||||
<link rel="canonical" href="{{ page.url | replace: 'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
|
||||
|
||||
<meta property="og:site_name" content="{{ site.title }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="{{ site.url | append: site.baseurl }}">
|
||||
<meta property="og:title" content="{{ page.title | default: site.title }}">
|
||||
<meta property="og:description" content="{{ page.description | default: site.description }}">
|
||||
|
||||
<meta name="twitter:site" content="{{ site.title }}">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:url" content="{{ site.url | append: site.baseurl }}">
|
||||
<meta name="twitter:title" content="{{ page.title | default: site.title }}">
|
||||
<meta name="twitter:description" content="{{ page.description | default: site.description }}">
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{% include sidebar.html %}
|
||||
|
||||
<div class="content__overlay"></div>
|
||||
@@ -35,6 +52,6 @@
|
||||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
<script src="{{ '/js/script.js' | prepend: site.baseurl }}"></script>
|
||||
</body>
|
||||
<script src="{{ '/js/script.js' | prepend: site.baseurl }}"></script>
|
||||
</html>
|
||||
|
||||
53
filters/compact.md
Normal file
53
filters/compact.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: compact
|
||||
description: Liquid filter that removes nil values from an array.
|
||||
---
|
||||
|
||||
Removes any `nil` values from an array.
|
||||
|
||||
For this example, assume `site.pages` is an array of content pages for a website, and some of these pages have an attribute called `category` that specifies their content category. If we `map` those categories to an array, some of the array items might be `nil` if any pages do not have a `category` attribute.
|
||||
|
||||
|
||||
<p class="code-label">Input</p>
|
||||
{% raw %}
|
||||
```liquid
|
||||
{% assign site_categories = site.pages | map: 'category' %}
|
||||
|
||||
{% for category in site_categories %}
|
||||
{{ category }}
|
||||
{% endfor %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
<p class="code-label">Output</p>
|
||||
```text
|
||||
business
|
||||
celebrities
|
||||
|
||||
lifestyle
|
||||
sports
|
||||
|
||||
technology
|
||||
```
|
||||
|
||||
By using `compact` when we create our `site_categories` array, we can remove all the `nil` values in the array.
|
||||
|
||||
<p class="code-label">Input</p>
|
||||
{% raw %}
|
||||
```liquid
|
||||
{% assign site_categories = site.pages | map: 'category' | compact %}
|
||||
|
||||
{% for category in site_categories %}
|
||||
{{ category }}
|
||||
{% endfor %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
<p class="code-label">Output</p>
|
||||
```text
|
||||
business
|
||||
celebrities
|
||||
lifestyle
|
||||
sports
|
||||
technology
|
||||
```
|
||||
BIN
images/icons/water-drop-128x.png
Normal file
BIN
images/icons/water-drop-128x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
BIN
images/icons/water-drop-32x.png
Normal file
BIN
images/icons/water-drop-32x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
images/icons/water-drop-64x.png
Normal file
BIN
images/icons/water-drop-64x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
1
images/icons/water-drop.svg
Normal file
1
images/icons/water-drop.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26.505 40"><g fill="#BCBEC0"><path d="M25.454 21.09l-8.9-18.87C16.004.85 14.734 0 13.254 0s-2.75.85-3.27 2.17l-8.95 18.97c-1.52 3.77-1.36 8.02.45 11.66 1.67 3.36 4.52 5.74 8.02 6.7 1.22.33 2.48.5 3.75.5s2.53-.17 3.75-.5c3.5-.96 6.35-3.34 8.02-6.71 1.81-3.63 1.97-7.88.43-11.7zm-2.22 10.82c-1.41 2.84-3.81 4.86-6.76 5.66-2.08.57-4.35.57-6.44 0-2.95-.8-5.35-2.82-6.76-5.66-1.55-3.13-1.69-6.78-.41-9.97l8.95-18.97c.36-.9 1.19-.97 1.44-.97s1.08.07 1.47 1.02l8.9 18.87c1.31 3.24 1.16 6.89-.39 10.02z"/><path d="M13.724 35.01c-.01.55-.45.99-1 .99h-.01c-3.45-.05-6.47-2.21-7.51-5.36-.86-2.6-.98-4.32-.46-6.56.12-.52.28-1.06.5-1.64.16-.46.37-.93.66-1.53l5.64-11.35c.24-.5.84-.7 1.34-.46.49.25.7.85.45 1.34l-.87 1.76-4.76 9.6c-.27.52-.44.93-.58 1.31-.19.52-.33.98-.43 1.42-.43 1.87-.33 3.25.41 5.48.78 2.34 3.02 3.94 5.61 3.99h.03c.55.01.99.46.98 1.01z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 909 B |
1
images/water-drop.svg
Normal file
1
images/water-drop.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26.505 40"><g fill="#BCBEC0"><path d="M25.454 21.09l-8.9-18.87C16.004.85 14.734 0 13.254 0s-2.75.85-3.27 2.17l-8.95 18.97c-1.52 3.77-1.36 8.02.45 11.66 1.67 3.36 4.52 5.74 8.02 6.7 1.22.33 2.48.5 3.75.5s2.53-.17 3.75-.5c3.5-.96 6.35-3.34 8.02-6.71 1.81-3.63 1.97-7.88.43-11.7zm-2.22 10.82c-1.41 2.84-3.81 4.86-6.76 5.66-2.08.57-4.35.57-6.44 0-2.95-.8-5.35-2.82-6.76-5.66-1.55-3.13-1.69-6.78-.41-9.97l8.95-18.97c.36-.9 1.19-.97 1.44-.97s1.08.07 1.47 1.02l8.9 18.87c1.31 3.24 1.16 6.89-.39 10.02z"/><path d="M13.724 35.01c-.01.55-.45.99-1 .99h-.01c-3.45-.05-6.47-2.21-7.51-5.36-.86-2.6-.98-4.32-.46-6.56.12-.52.28-1.06.5-1.64.16-.46.37-.93.66-1.53l5.64-11.35c.24-.5.84-.7 1.34-.46.49.25.7.85.45 1.34l-.87 1.76-4.76 9.6c-.27.52-.44.93-.58 1.31-.19.52-.33.98-.43 1.42-.43 1.87-.33 3.25.41 5.48.78 2.34 3.02 3.94 5.61 3.99h.03c.55.01.99.46.98 1.01z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 909 B |
Reference in New Issue
Block a user