j1-template 2021.0.4 → 2021.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/modules/navigator/generator.html +6 -6
  3. data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +1 -1
  4. data/_layouts/raw.html +1 -1
  5. data/assets/data/fam.html +1 -1
  6. data/assets/data/gallery_customizer.html +1 -1
  7. data/assets/data/mdi_icons.json +69582 -14640
  8. data/assets/data/mmenu_toc.html +1 -1
  9. data/assets/themes/j1/adapter/js/fam.js +2 -2
  10. data/assets/themes/j1/core/css/animate.min.css +1 -7
  11. data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +3 -10
  12. data/assets/themes/j1/core/css/icon-fonts/fontawesome.min.css +1 -1
  13. data/assets/themes/j1/core/css/icon-fonts/materialdesign.css +12505 -4812
  14. data/assets/themes/j1/core/css/icon-fonts/materialdesign.min.css +1 -1
  15. data/assets/themes/j1/core/css/icon-fonts/twemoji.min.css +1 -1
  16. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +79 -49
  17. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +1 -6
  18. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +78 -48
  19. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -6
  20. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +102 -50
  21. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -8
  22. data/assets/themes/j1/core/css/vendor.css +2 -2
  23. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  24. data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/eot/materialdesignicons-webfont.eot +0 -0
  25. data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/materialdesignicons-webfont.woff +0 -0
  26. data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/materialdesignicons-webfont.woff2 +0 -0
  27. data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/svg/materialdesignicons-webfont.svg +0 -0
  28. data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/ttf/materialdesignicons-webfont.ttf +0 -0
  29. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/eot/materialdesignicons-webfont.eot +0 -0
  30. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/materialdesignicons-webfont.woff +0 -0
  31. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/materialdesignicons-webfont.woff2 +0 -0
  32. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/preview.html +717 -0
  33. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/svg/materialdesignicons-webfont.svg +10188 -0
  34. data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/ttf/materialdesignicons-webfont.ttf +0 -0
  35. data/assets/themes/j1/core/fonts/material_design_icons/fonts/eot/materialdesignicons-webfont.eot +0 -0
  36. data/assets/themes/j1/core/fonts/material_design_icons/fonts/materialdesignicons-webfont.woff +0 -0
  37. data/assets/themes/j1/core/fonts/material_design_icons/fonts/materialdesignicons-webfont.woff2 +0 -0
  38. data/assets/themes/j1/core/fonts/material_design_icons/fonts/svg/materialdesignicons-webfont.svg +10188 -0
  39. data/assets/themes/j1/core/fonts/material_design_icons/fonts/ttf/materialdesignicons-webfont.ttf +0 -0
  40. data/assets/themes/j1/core/fonts/{materialdesign_icons → material_design_icons}/metadata/icons.json +0 -0
  41. data/assets/themes/j1/core/fonts/{materialdesign_icons → material_design_icons}/metadata/icons.yml +0 -0
  42. data/assets/themes/j1/core/js/template.min.js +23 -1
  43. data/assets/themes/j1/modules/jquery/js/jquery-3.5.1.min.map +1 -0
  44. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.css +110 -0
  45. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.min.css +110 -0
  46. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/jquery.justifiedGallery.js +1245 -0
  47. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/jquery.justifiedGallery.min.js +8 -0
  48. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.min.zip +0 -0
  49. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.zip +0 -0
  50. data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.css +110 -0
  51. data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.min.css +110 -0
  52. data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.css +11 -10
  53. data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.min.css +3 -106
  54. data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.js +147 -146
  55. data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.min.js +3 -3
  56. data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.min.js +1 -2
  57. data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
  58. data/assets/themes/j1/modules/lunrSearch/js/quicksearch.min.js +1 -1
  59. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +20 -5
  60. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +1 -1
  61. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +115 -0
  62. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +15 -0
  63. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.new.js +111 -0
  64. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.old.js +103 -0
  65. data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +2 -2
  66. data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +3 -3
  67. data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.css +4 -4
  68. data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.min.css +1 -1
  69. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +46 -45
  70. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +1 -1
  71. data/lib/j1/version.rb +1 -1
  72. data/lib/starter_web/Gemfile +18 -17
  73. data/lib/starter_web/_config.yml +3 -3
  74. data/lib/starter_web/_data/apps/light_gallery.yml +1 -1
  75. data/lib/starter_web/_data/j1_config.yml +3 -3
  76. data/lib/starter_web/_data/modules/defaults/quicksearch.yml +13 -4
  77. data/lib/starter_web/_data/modules/navigator_menu.yml +2 -64
  78. data/lib/starter_web/_data/resources.yml +3 -26
  79. data/lib/starter_web/_includes/attributes.asciidoc +276 -90
  80. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -1
  81. data/lib/starter_web/_includes/tables/template_variables.asciidoc +1 -1
  82. data/lib/starter_web/_plugins/lunr_index.rb +20 -1
  83. data/lib/starter_web/_plugins/minifyJS.rb +3 -0
  84. data/lib/starter_web/assets/images/modules/attics/machine-generator-1920x1280.jpg +0 -0
  85. data/lib/starter_web/assets/images/modules/attics/modules-apps-1920x1280.jpg +0 -0
  86. data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
  87. data/lib/starter_web/assets/images/modules/attics/responsive-text-1920x1280.jpg +0 -0
  88. data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +1 -1
  89. data/lib/starter_web/assets/images/pages/panels/modules-apps-1920x800.jpg +0 -0
  90. data/lib/starter_web/assets/images/pages/panels/no-time-1920x800.jpg +0 -0
  91. data/lib/starter_web/assets/images/pages/panels/the-place-1920x800.jpg +0 -0
  92. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_icon-800x200.jpg +0 -0
  93. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_icon.jpg +0 -0
  94. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_input-800x200.jpg +0 -0
  95. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_input.jpg +0 -0
  96. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_results_jekyll-.jpg +0 -0
  97. data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_results_jekyll.jpg +0 -0
  98. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +10 -13
  99. data/lib/starter_web/collections/posts/public/featured/_posts/{2018-05-01-confusion-about-base-url.adoc → 2020-04-01-confusion-about-base-url.adoc} +6 -4
  100. data/lib/starter_web/collections/posts/public/featured/_posts/{2019-05-01-top-open-source-static-site-generators.adoc → 2020-05-01-top-open-source-static-site-generators.adoc} +15 -13
  101. data/lib/starter_web/collections/posts/public/featured/_posts/{2019-06-01-about-cookies.adoc → 2020-06-01-about-cookies.adoc} +9 -23
  102. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +6 -17
  103. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +6 -16
  104. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +6 -16
  105. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +6 -16
  106. data/{assets/themes/j1/modules/mdiPreviewer/js → lib/starter_web/collections/posts/public/series/_posts/_includes/documents}/readme +0 -0
  107. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +5 -4
  108. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +13 -3
  109. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +13 -3
  110. data/lib/starter_web/favicon.ico +0 -0
  111. data/lib/starter_web/index.html +1 -1
  112. data/lib/starter_web/package.json +3 -3
  113. data/lib/starter_web/pages/public/about/about_site.adoc +1827 -9
  114. data/lib/starter_web/pages/public/about/become_a_patron.adoc +26 -1
  115. data/lib/starter_web/pages/public/blog/navigator/archive.html +2 -0
  116. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -1
  117. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +2 -0
  118. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +2 -0
  119. data/lib/starter_web/pages/public/blog/navigator/index.html +2 -0
  120. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +3 -3
  121. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +6 -2
  122. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -3
  123. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
  124. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +5 -4
  125. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +1 -1
  126. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
  127. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
  128. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +39 -19
  129. data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +417 -0
  130. data/lib/starter_web/pages/public/learn/roundtrip/610_fam.adoc +2 -2
  131. data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +3 -0
  132. data/lib/starter_web/pages/public/learn/where_to_go.adoc +1 -1
  133. data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +1 -1
  134. data/lib/starter_web/pages/public/legal/en/100_impress.adoc +1 -1
  135. data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +1 -1
  136. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
  137. data/lib/starter_web/pages/public/legal/en/400_license_agreement.adoc +1 -1
  138. data/lib/starter_web/pages/public/legal/en/500_support.adoc +1 -1
  139. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +16 -5
  140. data/lib/starter_web/pages/public/previewer/_includes/attributes.asciidoc +5 -81
  141. data/lib/starter_web/pages/public/previewer/_includes/documents/rouge/100_language_examples.asciidoc +119 -0
  142. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
  143. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
  144. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -1
  145. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
  146. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
  147. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +4 -4
  148. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
  149. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
  150. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
  151. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
  152. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
  153. data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/200_rouge_attributes.asciidoc +41 -0
  154. data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/300_supported_languages.asciidoc +857 -0
  155. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
  156. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
  157. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
  158. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
  159. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
  160. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +116 -78
  161. data/lib/starter_web/pages/public/previewer/iframer.adoc +1 -1
  162. data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
  163. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +41 -108
  164. data/lib/starter_web/pages/public/previewer/rouge.adoc +38 -353
  165. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +2 -2
  166. data/lib/starter_web/utilsrv/_defaults/package.json +2 -2
  167. data/lib/starter_web/utilsrv/package.json +3 -3
  168. metadata +58 -22
  169. data/lib/starter_web/_plugins/simple_search_filter.rb +0 -32
  170. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/documents/unsplash-badge.asciidoc +0 -31
  171. data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/100-docker-using-shared-folders.asciidoc +0 -430
  172. data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/loop.sh +0 -28
  173. data/lib/starter_web/pages/public/learn/roundtrip/600_lunr.adoc +0 -335
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- FOLDER=/Users/jadams/test_files/
4
- TEST_FILES_PATH=${FOLDER}/files/
5
- FILE=name
6
- COUNT=3
7
- SIZE=1M
8
- SLICE=1M
9
- TYPE=random
10
-
11
- # Do write test of $COUNT files
12
- $(dd if=/dev/urandom bs=${SIZE} count=${COUNT} 2> ${FILE}.measures | split -b ${SLICE} - ${TEST_FILES_PATH}${FILE}.)
13
-
14
- dd_write=$(cat ${FILE}.measures | grep -v records | sed 's/.* s,//')
15
- echo ${dd_write}
16
-
17
-
18
- FILES=$(find ${TEST_FILES_PATH} -type f -print)
19
-
20
- for f in $FILES; do
21
- # echo "Processing $f file..."
22
- dd_read+=$(dd if=${f} of=/dev/null 2>&1 | grep -v records | sed 's/.* s,//')
23
- done
24
-
25
- echo ${dd_read}
26
-
27
- cd ..
28
- rm -f ${TEST_FILES_PATH}${FILE}\.*
@@ -1,335 +0,0 @@
1
- ---
2
- title: Lunr
3
- tagline: full index search
4
- date: 2020-11-08 12:00:00
5
- description: >
6
- The search engine Lunr is fully integrated with
7
- J1 Template. Designed to be small, yet full featured,
8
- to provide a great search experience without the
9
- need for external, server-side, search services.
10
-
11
- tags: [ Roundtrip, Introduction ]
12
- categories: [ Search ]
13
-
14
- toc: true
15
- scrollbar: false
16
-
17
- permalink: /pages/public/learn/roundtrip/lunr/
18
- regenerate: true
19
-
20
- resources: [ lunr, rouge ]
21
- resource_options:
22
- - attic:
23
- padding_top: 400
24
- padding_bottom: 50
25
- opacity: 0.5
26
- slides:
27
- - url: /assets/images/modules/attics/banner/lunr-banner-1280x800.jpg
28
- alt: Lunr
29
- ---
30
-
31
- // Page Initializer
32
- // =============================================================================
33
- // Enable the Liquid Preprocessor
34
- :page-liquid:
35
-
36
- // Set page (local) attributes here
37
- // -----------------------------------------------------------------------------
38
- // :page--attr: <attr-value>
39
-
40
- // Load Liquid procedures
41
- // -----------------------------------------------------------------------------
42
- {% capture load_attributes %}themes/{{site.template.name}}/procedures/global/attributes_loader.proc{%endcapture%}
43
-
44
- // Load page attributes
45
- // -----------------------------------------------------------------------------
46
- {% include {{load_attributes}} scope="all" %}
47
-
48
-
49
- // Page content
50
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
-
52
- The search engine Lunr is fully integrated with J1 Template. Designed to be
53
- small, yet full featured, to provide a great search experience without the
54
- need for external, server-side search services.
55
-
56
- Searching a website using Lunr a different in compare to search engines
57
- like Google or Microsoft Bing. These search platforms using complex algorithm
58
- to provide a simple interface to the public using a lot of artificial
59
- intelligence (AI) methods to make senseful results out of a handfull words
60
- given for a search.
61
-
62
- Nevertheless, a QuickSearch, the J1 implementation of Lunr, is simple like
63
- searching at Google, but offers additional features to do searches more
64
- specific. QuickSearch provides a easy to use query language for better results.
65
-
66
- == Core concepts
67
-
68
- Understanding some of the concepts and terminology that QuickSearch (based on
69
- Lunr) uses will allow you to provide powerful search functionality to get more
70
- relevant search results.
71
-
72
- === Indexing documnents
73
-
74
- QuickSearch, the J1 implementation of Lunr, offers searches on *all* documents
75
- of website generated by J1, but only for this site. No internet access is done,
76
- or needed. Searches are based on a pre-build *local index* generated by the
77
- Jekyll plugin `lunr_index.rb` located in the `_plugins` folder.
78
-
79
- The index is generated at build-time:
80
-
81
- .Index creation at buildtime
82
- ----
83
- Startup the site ..
84
- Configuration file: ...
85
-
86
- Incremental build: enabled
87
- Generating...
88
- J1 LunrSearch: creating search index ...
89
- J1 LunrSearch: finished, index ready.
90
- ....
91
- ----
92
-
93
- Or, if you're running a website in development mode, the index gets refreshed
94
- for all files added or modified.
95
-
96
- .Index creation if files added, or modified
97
- ----
98
- site: Regenerating: n file(s) changed at ...
99
- site: ...
100
- site: J1 LunrSearch: creating search index ...
101
- site: J1 LunrSearch: finished, index ready.
102
- ...
103
- ----
104
-
105
- === Documents
106
-
107
- The searchable data in an index is organized as documents that contains the
108
- text that you want to be able to search. A document is a JSON object with one
109
- or more fields and an identifier that is returned in the results from a search.
110
- A document representing an article might look like this:
111
-
112
- [ source, json ]
113
- ----
114
- {
115
- "id": 0,
116
- "title": "Web in a Day",
117
- "tagline": "meet & greet jekyll",
118
- "url": "/pages/public/learn/kickstarter/web_in_a_day/meet_and_greet/",
119
- "date": "2018-05-01 00:00:00 +0000",
120
- "tags": [
121
- "Introduction"
122
- ],
123
- "categories": [
124
- "Jekyll",
125
- "Knowledge",
126
- "Tutorial"
127
- ],
128
- "description": "Web in a Day is the first in a series of tutorials ... J1 Template\n",
129
- "is_post": false
130
- }
131
- ----
132
-
133
- In this document there are several fields, like `title`, `tagline`, or
134
- `description` that could be used for *full-text* searches. But additional
135
- fields are available, like `tags` or `categories` that can be used for
136
- more specific searches based on `identifiers`.
137
-
138
- To do a simple full-text search as well as more specific searches, QuickSearch
139
- offers a query language, a DSL (domain specific language). Find more about
140
- *QuickSearch DSL* queries below.
141
-
142
- === Scoring
143
-
144
- The relevance (the `score`) of a document is calculated by an algorithm
145
- called BM25, along with other factors. You don’t need to worry too much about
146
- the details of how BM25 works. To summarize, the more a search term occurs in
147
- a single document, the more that term will increase that document’s score,
148
- but the more a search term occurs in the *overall collection* of documents,
149
- the less that term will increase a document’s score. In other words: seldom
150
- words count, increase the score.
151
-
152
- Scoring information, generated by the BM25 algorithm, is added to the (local)
153
- index. This allows a very fast calculation of the relevance of documents for
154
- a query.
155
-
156
- For example, imagine you’re website contains documents about Jekyll. The
157
- term `Jekyll` may occur very frequently throughout the entire website
158
- (used quite often for the content), so finding a document that mentions the
159
- term Jekyll isn’t very significant.
160
-
161
- However, if you’re searching for `Jekyll Generator`, only some documents of
162
- the website have the term `Generator` in them, and that will bring the score
163
- (relevance) for documents having both terms (words) in them at a higher score,
164
- bring them higher up in your search results.
165
-
166
- Matching and scoring is used by all search engines; the same to J1 QuickSearch.
167
- You'll see for QuickSearch a similiar behavior in *sorting* search results as
168
- you already know from internet search engines like Google. The top results
169
- are the more relevant ones.
170
-
171
- == Searching
172
-
173
- Search queries looks like simple text. But the search `engine` Lunr under the
174
- hood transforms the given search string (text) always into a search query.
175
- This supports special syntax, the DSL, for defining more complex queries.
176
-
177
- As always: start simple!
178
-
179
- === Simple searches
180
-
181
- The simplest way to run a search is to pass the text (words) on which you
182
- want to search on:
183
-
184
- ----
185
- jekyll
186
- ----
187
-
188
- The above will return details of all documents that match the term
189
- `jekyll`. Searches for *multiple* terms (words) are also supported. If
190
- a document matches *at least* one of the search terms, it will show in the
191
- results. The search terms are combined with `OR`.
192
-
193
- ----
194
- jekyll generator
195
- ----
196
-
197
- The above example will match documents that contain either `jekyll` *or*
198
- `generator`. Documents that contain _both_ will score more highly and will
199
- be returned first.
200
-
201
- NOTE: In difference to a Google search (terms are combined at Google by
202
- `AND`) a Quicksearch combines the terms by `OR`.
203
-
204
- === Wildcards
205
-
206
- QuickSearch supports wildcards when performing searches. A wildcard is
207
- represented as an asterisk (`*`) and can appear anywhere in a search
208
- term. For example, the following will match all documents with words
209
- beginning with `Jek`:
210
-
211
- ----
212
- jek*
213
- ----
214
-
215
- This will match all documents that end with `kyll`:
216
-
217
- ----
218
- *kyll
219
- ----
220
-
221
- Leading wildcards, as in the above example, should be used sparingly.
222
- They can have a negative impact on the performance of a search,
223
- especially in large indexes.
224
-
225
- Finally, a wildcard can be in the middle of a term. The following will
226
- match any documents that contain a term that begins with “f” and ends in
227
- “o”:
228
-
229
- [source, javascript]
230
- ----
231
- idx.search('f*o')
232
- ----
233
-
234
- It is also worth noting that, when a search term contains a wildcard, no
235
- stemming is performed on the search term.
236
-
237
- === Fields
238
-
239
- By default, Lunr will search all fields in a document for the query
240
- term, and it is possible to restrict a term to a specific field. The
241
- following example searches for the term “foo” in the field title:
242
-
243
- [source, javascript]
244
- ----
245
- idx.search('title:foo')
246
- ----
247
-
248
- The search term is prefixed with the name of the field, followed by a
249
- colon (`:`). The field _must_ be one of the fields defined when building
250
- the index. Unrecognised fields will lead to an error.
251
-
252
- Field-based searches can be combined with all other term modifiers and
253
- wildcards, as well as other terms. For example, to search for words
254
- beginning with “foo” in the title or with “bar” in any field the
255
- following query can be used:
256
-
257
- [source, javascript]
258
- ----
259
- idx.search('title:foo* bar')
260
- ----
261
-
262
- === Boosts
263
-
264
- In multi-term searches, a single term may be important than others. For
265
- these cases Lunr supports term level boosts. Any document that matches a
266
- boosted term will get a higher relevance score, and appear higher up in
267
- the results. A boost is applied by appending a caret (`^`) and then a
268
- positive integer to a term.
269
-
270
- [source, javascript]
271
- ----
272
- idx.search('foo^10 bar')
273
- ----
274
-
275
- The above example weights the term “foo” 10 times higher than the term
276
- “bar”. The boost value can be any positive integer, and different terms
277
- can have different boosts:
278
-
279
- [source, javascript]
280
- ----
281
- idx.search('foo^10 bar^5 baz')
282
- ----
283
-
284
- === Fuzzy Matches
285
-
286
- Lunr supports fuzzy matching search terms in documents, which can be
287
- helpful if the spelling of a term is unclear, or to increase the number
288
- of search results that are returned. The amount of fuzziness to allow
289
- when searching can also be controlled. Fuzziness is applied by appending
290
- a tilde (`~`) and then a positive integer to a term. The following
291
- search matches all documents that have a word within 1 edit distance of
292
- “foo”:
293
-
294
- [source, javascript]
295
- ----
296
- idx.search('foo~1')
297
- ----
298
-
299
- An edit distance of 1 allows words to match if either adding, removing,
300
- changing or transposing a character in the word would lead to a match.
301
- For example “boo” requires a single edit (replacing “f” with “b”) and
302
- would match, but “boot” would not as it also requires an additional “t”
303
- at the end.
304
-
305
- === Term Presence
306
-
307
- By default, Lunr combines multiple terms together in a search with a
308
- logical OR. That is, a search for “foo bar” will match documents that
309
- contain “foo” or contain “bar” or contain both. This behaviour is
310
- controllable at the term level, i.e. the presence of each term in
311
- matching documents can be specified. By default each term is optional in
312
- a matching document, though a document must have at least one matching
313
- term. It is possible to specify that a term must be present in matching
314
- documents, or that it must be absent in matching documents.
315
-
316
- To indicate that a term must be present in matching documents the term
317
- should be prefixed with a plus (`+`) and to indicate that a term must be
318
- absent the term should be prefixed with a minus (`-`). Without either
319
- prefix the term’s presence in matching documents is optional.
320
-
321
- The below example searches for documents that must contain “foo”, might
322
- contain “bar” and must not contain “baz”:
323
-
324
- [source, javascript]
325
- ----
326
- idx.search("+foo bar -baz")
327
- ----
328
-
329
- To simulate a logical AND search of “foo AND bar” mark both terms as
330
- required:
331
-
332
- [source, javascript]
333
- ----
334
- idx.search("+foo +bar")
335
- ----