imdhemy-jekyll-theme 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c2766f041feb77f44c69b2775ad3232f72925dd1bff3e7906f9c2f093115c6e
4
- data.tar.gz: 8275b2d6b417f38d58932cb29303972b04d236351749a6050e217c272a74016f
3
+ metadata.gz: 8a463ed0b6941a805380e2a67a0ae64940b4f290b69c3133dd855ead50ea2086
4
+ data.tar.gz: fe1e6b40874ba68048ea0a9c8ca428c60d4492ecadb1ddd5afedf1c64c439eb7
5
5
  SHA512:
6
- metadata.gz: ec06e5d0fdbca089ccc979dbec4d13d1f648ccf4c14521e21fdf053f528a228def6a9224b2c09ce46846a8daf679926a829a02f6d4e69bff0e9b4a6e3b3e06e8
7
- data.tar.gz: 9a4b39872b6cc2e27ad53f04aad39e510777da81fc809ab8233468ba30a15859e0b9254a5e0600b554ce884050c895f287190fc2009dcb352902066a0f44b0bc
6
+ metadata.gz: '01144842bc51ae6288d8a3b13d510dbf092b254bebcda37eec9928f266e2fb780ccf30233fdcb57376fead1f8ba1d021a48b51a284b5e795d0fdc84319b4a7da'
7
+ data.tar.gz: e90bb37d243b1bd905b6682c6613e18de2cfcfe0e9b6785481b411a6bef6024e850b97ca0e4df1ebdb7073ace223f4eb40a58fa327626107dae47dc31e43d73a
@@ -37,6 +37,22 @@
37
37
  {% assign meta_image = page.image | default: default_image %}
38
38
  {% if meta_image %}
39
39
  {% assign meta_image_url = meta_image | absolute_url %}
40
+ {% assign meta_image_alt = page.image_alt | default: site.theme_seo.default_image_alt %}
41
+ {% assign meta_image_secure_url = '' %}
42
+ {% if meta_image_url contains 'https://' %}
43
+ {% assign meta_image_secure_url = meta_image_url %}
44
+ {% endif %}
45
+ {% assign meta_image_path = meta_image | split: '?' | first | downcase %}
46
+ {% assign meta_image_type = '' %}
47
+ {% if meta_image_path contains '.jpg' or meta_image_path contains '.jpeg' %}
48
+ {% assign meta_image_type = 'image/jpeg' %}
49
+ {% elsif meta_image_path contains '.png' %}
50
+ {% assign meta_image_type = 'image/png' %}
51
+ {% elsif meta_image_path contains '.webp' %}
52
+ {% assign meta_image_type = 'image/webp' %}
53
+ {% elsif meta_image_path contains '.gif' %}
54
+ {% assign meta_image_type = 'image/gif' %}
55
+ {% endif %}
40
56
  {% endif %}
41
57
  {% assign twitter_card = 'summary' %}
42
58
  {% if meta_image_url %}
@@ -72,8 +88,14 @@
72
88
  <meta property="og:type" content="{{ og_type }}">
73
89
  {% if meta_image_url %}
74
90
  <meta property="og:image" content="{{ meta_image_url }}">
75
- {% if page.image_alt or site.theme_seo.default_image_alt %}
76
- <meta property="og:image:alt" content="{{ page.image_alt | default: site.theme_seo.default_image_alt | escape }}">
91
+ {% if meta_image_secure_url != empty %}
92
+ <meta property="og:image:secure_url" content="{{ meta_image_secure_url }}">
93
+ {% endif %}
94
+ {% if meta_image_type != empty %}
95
+ <meta property="og:image:type" content="{{ meta_image_type }}">
96
+ {% endif %}
97
+ {% if meta_image_alt %}
98
+ <meta property="og:image:alt" content="{{ meta_image_alt | escape }}">
77
99
  {% endif %}
78
100
  {% endif %}
79
101
  {% if page.layout == 'post' %}
@@ -102,4 +124,7 @@
102
124
  {% endif %}
103
125
  {% if meta_image_url %}
104
126
  <meta name="twitter:image" content="{{ meta_image_url }}">
127
+ {% if meta_image_alt %}
128
+ <meta name="twitter:image:alt" content="{{ meta_image_alt | escape }}">
129
+ {% endif %}
105
130
  {% endif %}
@@ -0,0 +1,42 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+ [
5
+ {%- assign search_content_limit = site.theme_search.content_limit | default: 6000 -%}
6
+ {%- assign searchable_documents = site.posts | concat: site.pages -%}
7
+ {%- assign first_result = true -%}
8
+ {%- for doc in searchable_documents -%}
9
+ {%- assign excluded = false -%}
10
+ {%- if doc.search == false or doc.sitemap == false -%}
11
+ {%- assign excluded = true -%}
12
+ {%- endif -%}
13
+ {%- if doc.url == '/assets/search.json' or doc.url == '/feed.xml' or doc.url == '/robots.txt' -%}
14
+ {%- assign excluded = true -%}
15
+ {%- endif -%}
16
+ {%- if doc.title == nil or doc.title == empty -%}
17
+ {%- assign excluded = true -%}
18
+ {%- endif -%}
19
+ {%- unless excluded -%}
20
+ {%- assign doc_type = 'page' -%}
21
+ {%- assign doc_date = '' -%}
22
+ {%- if doc.collection == 'posts' -%}
23
+ {%- assign doc_type = 'post' -%}
24
+ {%- endif -%}
25
+ {%- if doc.date -%}
26
+ {%- assign doc_date = doc.date | date_to_xmlschema -%}
27
+ {%- endif -%}
28
+ {%- assign doc_content = doc.content | markdownify | strip_html | normalize_whitespace | truncate: search_content_limit, '' -%}
29
+ {%- unless first_result -%},{%- endunless -%}
30
+ {
31
+ "title": {{ doc.title | normalize_whitespace | jsonify }},
32
+ "url": {{ doc.url | relative_url | jsonify }},
33
+ "content": {{ doc_content | jsonify }},
34
+ "tags": {{ doc.tags | jsonify }},
35
+ "categories": {{ doc.categories | jsonify }},
36
+ "date": {{ doc_date | jsonify }},
37
+ "type": {{ doc_type | jsonify }}
38
+ }
39
+ {%- assign first_result = false -%}
40
+ {%- endunless -%}
41
+ {%- endfor -%}
42
+ ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imdhemy-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohamad Eldhemy
@@ -120,6 +120,7 @@ files:
120
120
  - assets/css/main.scss
121
121
  - assets/images/social.png
122
122
  - assets/js/dist/main.js
123
+ - assets/search.json
123
124
  - exe/imdhemy-image
124
125
  - lib/imdhemy/jekyll/theme/image_cli.rb
125
126
  homepage: https://imdhemy.com