j1-template 2020.0.22 → 2020.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_page.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_post.html +63 -161
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +14 -0
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +1 -3
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +37 -24
- data/_includes/themes/j1/modules/navigator/generator.html +8 -3
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +36 -26
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
- data/_includes/themes/j1/procedures/posts/create_series_header.proc +9 -5
- data/assets/data/banner.html +1 -1
- data/assets/data/fam.html +124 -0
- data/assets/data/mmenu_sidebar.html +3 -3
- data/assets/data/panel.html +9 -9
- data/assets/data/quicklinks.html +13 -13
- data/assets/error_pages/HTTP204.html +1 -0
- data/assets/error_pages/HTTP400.html +3 -2
- data/assets/error_pages/HTTP401.html +3 -2
- data/assets/error_pages/HTTP403.html +3 -2
- data/assets/error_pages/HTTP404.html +3 -2
- data/assets/error_pages/HTTP500.html +3 -2
- data/assets/error_pages/HTTP501.html +3 -2
- data/assets/error_pages/HTTP502.html +3 -2
- data/assets/error_pages/HTTP503.html +3 -2
- data/assets/error_pages/HTTP520.html +3 -2
- data/assets/error_pages/HTTP521.html +3 -2
- data/assets/error_pages/HTTP533.html +3 -2
- data/assets/themes/j1/adapter/js/{ssm.js → fam.js} +248 -138
- data/assets/themes/j1/adapter/js/framer.js +72 -56
- data/assets/themes/j1/adapter/js/gallery_customizer.js +2 -1
- data/assets/themes/j1/adapter/js/j1.js +8 -2
- data/assets/themes/j1/adapter/js/{searcher.js → lunr_search.js} +68 -65
- data/assets/themes/j1/adapter/js/toccer.js +62 -30
- data/assets/themes/j1/core/css/bootstrap.css +7154 -0
- data/assets/themes/j1/core/css/bootstrap.min.css +6 -0
- data/assets/themes/j1/core/css/custom.scss +28 -0
- data/assets/themes/j1/core/css/globals.css +14523 -0
- data/assets/themes/j1/core/css/globals.min.css +1 -0
- data/assets/themes/j1/core/css/globals.scss +28 -0
- data/assets/themes/j1/core/css/theme_extensions.css +11558 -0
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -0
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +7 -4
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +2 -2
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +7 -4
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +2 -2
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +514 -417
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +2 -2
- data/assets/themes/j1/core/css/uno.css +11823 -0
- data/assets/themes/j1/core/css/uno.min.css +1 -0
- data/assets/themes/j1/core/css/uno.scss +28 -0
- data/assets/themes/j1/core/css/vendor.css +5 -4
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.scss +28 -0
- data/assets/themes/j1/core/js/template.js +6 -11
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js +6 -0
- data/assets/themes/j1/modules/cash/js/cash.js +1374 -0
- data/assets/themes/j1/modules/cash/js/cash.min.js +42 -0
- data/assets/themes/j1/modules/fam/css/uno/fam.css +369 -0
- data/assets/themes/j1/modules/fam/js/fam.js +477 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +1 -1
- data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.js → resizer.js} +0 -0
- data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.map → resizer.map} +0 -0
- data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.min.js → resizer.min.js} +0 -0
- data/assets/themes/j1/modules/jquery/js/require.js +2145 -0
- data/assets/themes/j1/modules/jquery/js/require.min.js +5 -0
- data/assets/themes/j1/modules/lunrSearch/css/lunr_search.css +32 -0
- data/assets/themes/j1/modules/lunrSearch/css/lunr_search.min.css +25 -0
- data/assets/themes/j1/modules/lunrSearch/js/dateformat.js +125 -0
- data/assets/themes/j1/modules/lunrSearch/js/dateformat.min.js +14 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr.js +3475 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr.min.js +51 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr_search.js +184 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr_search.min.js +17 -0
- data/assets/themes/j1/modules/lunrSearch/js/mustache.js +772 -0
- data/assets/themes/j1/modules/lunrSearch/js/mustache.min.js +772 -0
- data/assets/themes/j1/modules/lunrSearch/js/uri.js +2340 -0
- data/assets/themes/j1/modules/lunrSearch/js/uri.min.js +93 -0
- data/assets/themes/j1/modules/materialize/js/anime.js +1283 -0
- data/assets/themes/j1/modules/materialize/js/anime.min.js +34 -0
- data/assets/themes/j1/modules/materialize/js/autocomplete.js +450 -0
- data/assets/themes/j1/modules/materialize/js/buttons.js +409 -0
- data/assets/themes/j1/modules/materialize/js/cards.js +40 -0
- data/assets/themes/j1/modules/materialize/js/carousel.js +717 -0
- data/assets/themes/j1/modules/materialize/js/cash-dom.js +1044 -0
- data/assets/themes/j1/modules/materialize/js/cash.js +960 -0
- data/assets/themes/j1/modules/materialize/js/characterCounter.js +136 -0
- data/assets/themes/j1/modules/materialize/js/chips.js +481 -0
- data/assets/themes/j1/modules/materialize/js/collapsible.js +275 -0
- data/assets/themes/j1/modules/materialize/js/component.js +44 -0
- data/assets/themes/j1/modules/materialize/js/datepicker.js +975 -0
- data/assets/themes/j1/modules/materialize/js/dropdown.js +617 -0
- data/assets/themes/j1/modules/materialize/js/forms.js +275 -0
- data/assets/themes/j1/modules/materialize/js/global.js +427 -0
- data/assets/themes/j1/modules/materialize/js/materialbox.js +453 -0
- data/assets/themes/j1/modules/materialize/js/modal.js +382 -0
- data/assets/themes/j1/modules/materialize/js/parallax.js +138 -0
- data/assets/themes/j1/modules/materialize/js/pushpin.js +145 -0
- data/assets/themes/j1/modules/materialize/js/range.js +263 -0
- data/assets/themes/j1/modules/materialize/js/ripple.js +335 -0
- data/assets/themes/j1/modules/materialize/js/scrollspy.js +295 -0
- data/assets/themes/j1/modules/materialize/js/select.js +432 -0
- data/assets/themes/j1/modules/materialize/js/sidenav.js +580 -0
- data/assets/themes/j1/modules/materialize/js/slider.js +359 -0
- data/assets/themes/j1/modules/materialize/js/tabs.js +402 -0
- data/assets/themes/j1/modules/materialize/js/tapTarget.js +314 -0
- data/assets/themes/j1/modules/materialize/js/timepicker.js +647 -0
- data/assets/themes/j1/modules/materialize/js/toasts.js +310 -0
- data/assets/themes/j1/modules/materialize/js/tooltip.js +303 -0
- data/assets/themes/j1/modules/materialize/js/waves.js +335 -0
- data/assets/themes/j1/modules/materialize/scss/components/_badges.scss +55 -0
- data/assets/themes/j1/modules/materialize/scss/components/_buttons.scss +322 -0
- data/assets/themes/j1/modules/materialize/scss/components/_cards.scss +195 -0
- data/assets/themes/j1/modules/materialize/scss/components/_carousel.scss +90 -0
- data/assets/themes/j1/modules/materialize/scss/components/_chips.scss +90 -0
- data/assets/themes/j1/modules/materialize/scss/components/_collapsible.scss +91 -0
- data/assets/themes/j1/modules/materialize/scss/components/_color-classes.scss +32 -0
- data/assets/themes/j1/modules/materialize/scss/components/_color-variables.scss +370 -0
- data/assets/themes/j1/modules/materialize/scss/components/_datepicker.scss +191 -0
- data/assets/themes/j1/modules/materialize/scss/components/_dropdown.scss +85 -0
- data/assets/themes/j1/modules/materialize/scss/components/_global.scss +769 -0
- data/assets/themes/j1/modules/materialize/scss/components/_grid.scss +156 -0
- data/assets/themes/j1/modules/materialize/scss/components/_icons-material-design.scss +5 -0
- data/assets/themes/j1/modules/materialize/scss/components/_materialbox.scss +43 -0
- data/assets/themes/j1/modules/materialize/scss/components/_modal.scss +94 -0
- data/assets/themes/j1/modules/materialize/scss/components/_navbar.scss +208 -0
- data/assets/themes/j1/modules/materialize/scss/components/_normalize.scss +447 -0
- data/assets/themes/j1/modules/materialize/scss/components/_preloader.scss +334 -0
- data/assets/themes/j1/modules/materialize/scss/components/_pulse.scss +34 -0
- data/assets/themes/j1/modules/materialize/scss/components/_sidenav.scss +216 -0
- data/assets/themes/j1/modules/materialize/scss/components/_slider.scss +92 -0
- data/assets/themes/j1/modules/materialize/scss/components/_table_of_contents.scss +33 -0
- data/assets/themes/j1/modules/materialize/scss/components/_tabs.scss +99 -0
- data/assets/themes/j1/modules/materialize/scss/components/_tapTarget.scss +103 -0
- data/assets/themes/j1/modules/materialize/scss/components/_timepicker.scss +183 -0
- data/assets/themes/j1/modules/materialize/scss/components/_toast.scss +58 -0
- data/assets/themes/j1/modules/materialize/scss/components/_tooltip.scss +32 -0
- data/assets/themes/j1/modules/materialize/scss/components/_transitions.scss +13 -0
- data/assets/themes/j1/modules/materialize/scss/components/_typography.scss +60 -0
- data/assets/themes/j1/modules/materialize/scss/components/_variables.scss +349 -0
- data/assets/themes/j1/modules/materialize/scss/components/_waves.scss +114 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_checkboxes.scss +200 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_file-input.scss +44 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_forms.scss +22 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_input-fields.scss +354 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_radio-buttons.scss +115 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_range.scss +161 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_select.scss +180 -0
- data/assets/themes/j1/modules/materialize/scss/components/forms/_switches.scss +89 -0
- data/assets/themes/j1/modules/materialize/scss/materialize.scss +41 -0
- data/assets/themes/j1/modules/{bsThemeSwitcher → themeSwitcher}/js/switcher.js +0 -0
- data/assets/themes/j1/modules/{bsThemeSwitcher → themeSwitcher}/js/switcher.min.js +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +12 -16
- data/lib/starter_web/_config.yml +95 -21
- data/lib/starter_web/_data/blocks/banner.yml +1 -1
- data/lib/starter_web/_data/blocks/panel.yml +6 -6
- data/lib/starter_web/_data/j1_config.yml +7 -6
- data/lib/starter_web/_data/layouts/home.yml +13 -3
- data/lib/starter_web/_data/layouts/page.yml +10 -0
- data/lib/starter_web/_data/layouts/post.yml +10 -0
- data/lib/starter_web/_data/modules/defaults/{ssm.yml → fam.yml} +12 -15
- data/lib/starter_web/_data/modules/defaults/lunr_search.yml +171 -0
- data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -4
- data/lib/starter_web/_data/modules/defaults/toccer.yml +4 -2
- data/lib/starter_web/_data/modules/fam.yml +158 -0
- data/lib/starter_web/_data/modules/{back2top.yml → lunr_search.yml} +15 -9
- data/lib/starter_web/_data/modules/navigator.yml +2 -2
- data/lib/starter_web/_data/modules/navigator_menu.yml +57 -6
- data/lib/starter_web/_data/modules/toccer.yml +0 -73
- data/lib/starter_web/_data/resources.yml +151 -104
- data/lib/starter_web/_includes/attributes.asciidoc +2 -2
- data/lib/starter_web/_includes/breadcrumbs.html +11 -0
- data/lib/starter_web/_plugins/debug.rb +0 -1
- data/lib/starter_web/_plugins/filters.rb +0 -1
- data/lib/starter_web/_plugins/{lorem-inline.rb → lorem_inline.rb} +1 -2
- data/lib/starter_web/_plugins/lunr_index.rb +313 -0
- data/lib/starter_web/_plugins/prettify.rb +0 -3
- data/lib/starter_web/_plugins/simple_search_filter.rb +0 -1
- data/lib/starter_web/_plugins/symlink_watcher.rb +2 -3
- data/lib/starter_web/assets/images/modules/attics/banner/lunr-banner-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/coordinate-map.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/kibana-powershell.jpg +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/option_ignore_outgoing.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/winlogbeat-dashboard.png +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc +2 -4
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-05-01-top-open-source-static-site-generators.adoc +4 -2
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +3 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2018-11-01-docker-using-shared-folders.adoc +5 -4
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +144 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +146 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +146 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +146 -0
- data/lib/starter_web/collections/posts/public/test_posts/_posts/2020-09-11-test_post.adoc +2 -4
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +2 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +2 -7
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +2 -6
- data/lib/starter_web/index.html +16 -10
- data/lib/starter_web/package.json +5 -2
- data/lib/starter_web/pages/public/about/about_site.adoc +0 -2
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +1 -3
- data/lib/starter_web/pages/public/blog/navigator/archive.html +8 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +7 -3
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +8 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +7 -2
- data/lib/starter_web/pages/public/blog/navigator/index.html +6 -2
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +3 -4
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/200_preparations.adoc +3 -4
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/300_first_awesome_web.adoc +3 -4
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +25 -20
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +14 -12
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +20 -20
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +13 -8
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +14 -9
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +9 -6
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +62 -8
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +9 -7
- data/lib/starter_web/pages/public/learn/roundtrip/600_lunr.adoc +237 -0
- data/lib/starter_web/pages/public/learn/roundtrip/610_fam.adoc +302 -0
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +3 -7
- data/lib/starter_web/pages/public/legal/de/100_impress.adoc +3 -2
- data/lib/starter_web/pages/public/legal/de/200_terms_of_use.adoc +2 -1
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +2 -1
- data/lib/starter_web/pages/public/legal/de/400_license_agreement.adoc +2 -1
- data/lib/starter_web/pages/public/legal/de/500_support.adoc +2 -1
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +30 -27
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +8 -5
- data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +12 -8
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +7 -0
- data/lib/starter_web/pages/public/legal/en/400_license_agreement.adoc +8 -1
- data/lib/starter_web/pages/public/legal/en/500_support.adoc +8 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +3 -1
- data/lib/starter_web/pages/public/previewer/iframer.adoc +36 -28
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +2 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +2 -1
- data/lib/starter_web/pages/public/previewer/rouge.adoc +4 -2
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +2 -1
- data/lib/starter_web/pages/public/test_pages/breadcrumbs_tester.adoc +62 -0
- data/lib/starter_web/pages/public/test_pages/deck_of_posts.adoc +3 -0
- data/lib/starter_web/pages/public/test_pages/floating_actions_button.adoc +523 -0
- data/lib/starter_web/pages/public/test_pages/floating_ad.adoc +1 -0
- data/lib/starter_web/pages/public/test_pages/floating_div.adoc +1 -0
- data/lib/starter_web/pages/public/test_pages/lunr_tester.adoc +89 -0
- data/lib/starter_web/pages/public/test_pages/nav_pagination_tester.adoc +1 -0
- data/lib/starter_web/pages/public/test_pages/page_attribute_tester.adoc +1 -0
- data/lib/starter_web/pages/public/test_pages/responsive_images.adoc +3 -2
- data/lib/starter_web/pages/public/test_pages/responsive_tables.adoc +1 -0
- data/lib/starter_web/pages/public/test_pages/toccer_tester.adoc +2245 -0
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +137 -29
- data/assets/data/search.json +0 -165
- data/assets/data/ssm.html +0 -242
- data/assets/themes/j1/adapter/js/back2top.js +0 -231
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.js +0 -468
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.min.js +0 -6
- data/assets/themes/j1/modules/tocbot/css/theme/uno.css +0 -95
- data/assets/themes/j1/modules/tocbot/css/theme/uno.min.css +0 -15
- data/assets/themes/j1/modules/tocbot/css/tocbot.css +0 -75
- data/assets/themes/j1/modules/tocbot/css/tocbot.min.css +0 -19
- data/assets/themes/j1/modules/tocbot/js/tocbot.js +0 -19
- data/assets/themes/j1/modules/tocbot/js/tocbot.min.js +0 -19
- data/lib/starter_web/_data/modules/defaults/back2top.yml +0 -146
- data/lib/starter_web/_data/modules/defaults/stickybits.yml +0 -36
- data/lib/starter_web/_data/modules/ssm.yml +0 -142
@@ -133,7 +133,7 @@ end::urls[]
|
|
133
133
|
// -----------------------------------------------------------------------------
|
134
134
|
tag::tags[]
|
135
135
|
|
136
|
-
:browser-window--new: window="
|
136
|
+
:browser-window--new: window="_blank"
|
137
137
|
:clipboard--noclip: noclip
|
138
138
|
:level--beginner: icon:battery-quarter[role="md-blue"]
|
139
139
|
:level--advanced: icon:battery-full[role="md-blue"]
|
@@ -182,7 +182,7 @@ end::tables[]
|
|
182
182
|
// -----------------------------------------------------------------------------
|
183
183
|
tag::products[]
|
184
184
|
:j1-license: MIT License
|
185
|
-
:j1-version: 2020.0.
|
185
|
+
:j1-version: 2020.0.24
|
186
186
|
end::products[]
|
187
187
|
|
188
188
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div id="breadcrumbs" class="mb-3">
|
2
|
+
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
|
3
|
+
<a href="/">Home</a>
|
4
|
+
{% for crumb in crumbs offset: 1 %}
|
5
|
+
{% if forloop.last %}
|
6
|
+
• {{ page.title }}
|
7
|
+
{% else %}
|
8
|
+
• <a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a>
|
9
|
+
{% endif %}
|
10
|
+
{% endfor %}
|
11
|
+
</div>
|
@@ -9,7 +9,6 @@
|
|
9
9
|
#
|
10
10
|
# J1 Template is licensed under the MIT License.
|
11
11
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
-
#
|
13
12
|
# ------------------------------------------------------------------------------
|
14
13
|
# USAGE:
|
15
14
|
# Can be used anywhere liquid syntax is parsed with templates, includes,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# ------------------------------------------------------------------------------
|
2
|
-
# ~/_plugins/asciidoctor-extensions/
|
2
|
+
# ~/_plugins/asciidoctor-extensions/lorem_inline.rb
|
3
3
|
# Asciidoctor extension for J1 Template
|
4
4
|
#
|
5
5
|
# Product/Info:
|
@@ -9,7 +9,6 @@
|
|
9
9
|
#
|
10
10
|
# J1 Template is licensed under the MIT License.
|
11
11
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
-
#
|
13
12
|
# ------------------------------------------------------------------------------
|
14
13
|
# An extension that implements several type of (lorem) blind text
|
15
14
|
#
|
@@ -0,0 +1,313 @@
|
|
1
|
+
# ------------------------------------------------------------------------------
|
2
|
+
# ~/_plugins/lunr_index.rb
|
3
|
+
# Creates an lunr index file (json) to be used by J1LunrSearch
|
4
|
+
#
|
5
|
+
# Product/Info:
|
6
|
+
# http://jekyll.one
|
7
|
+
#
|
8
|
+
# Copyright (C) 2020 Juergen Adams
|
9
|
+
#
|
10
|
+
# J1 Template is licensed under the MIT License.
|
11
|
+
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
+
# ------------------------------------------------------------------------------
|
13
|
+
require 'fileutils'
|
14
|
+
require 'net/http'
|
15
|
+
require 'json'
|
16
|
+
require 'uri'
|
17
|
+
require 'execjs'
|
18
|
+
require 'yaml'
|
19
|
+
|
20
|
+
module Jekyll
|
21
|
+
module J1LunrSearch
|
22
|
+
#noinspection RubyTooManyInstanceVariablesInspection
|
23
|
+
class Indexer < Jekyll::Generator
|
24
|
+
def initialize(config = {})
|
25
|
+
super(config)
|
26
|
+
|
27
|
+
@mode = config['environment']
|
28
|
+
@template = config['theme']
|
29
|
+
@module_config_path = File.join(File.dirname(__FILE__), '..', config['data_dir'], 'modules')
|
30
|
+
|
31
|
+
@module_config_default = YAML::load(File.open(File.join(@module_config_path, 'defaults', 'lunr_search.yml')))
|
32
|
+
@module_config_user = YAML::load(File.open(File.join(@module_config_path,'lunr_search.yml')))
|
33
|
+
|
34
|
+
@module_config_default_settings = @module_config_default['defaults']
|
35
|
+
@module_config_user_settings = @module_config_user['settings']
|
36
|
+
@module_config = @module_config_default_settings.merge!(@module_config_user_settings)
|
37
|
+
|
38
|
+
@lunr_config = {
|
39
|
+
'excludes' => [],
|
40
|
+
'strip_index_html' => false,
|
41
|
+
'min_length' => 3,
|
42
|
+
'stopwords' => 'stopwords.txt',
|
43
|
+
'fields' => {
|
44
|
+
'title' => 10,
|
45
|
+
'tagline' => 10,
|
46
|
+
'tags' => 20,
|
47
|
+
'categories' => 20,
|
48
|
+
'description' => 20,
|
49
|
+
'body' => 1
|
50
|
+
}
|
51
|
+
}.merge!(@module_config || {})
|
52
|
+
|
53
|
+
@module_dir = @lunr_config['module_dir']
|
54
|
+
@index_dir = @lunr_config['index_dir']
|
55
|
+
@index_name = @lunr_config['index_name']
|
56
|
+
|
57
|
+
# calculate the module path
|
58
|
+
# if NO template GEM is used (dev system), @module_path points
|
59
|
+
# in the project folder, otherwise (runtime system) to the Ruby
|
60
|
+
# GEM installation folder!
|
61
|
+
#
|
62
|
+
if @template.nil?
|
63
|
+
@module_path = File.join(File.dirname(__FILE__), '../', @module_dir)
|
64
|
+
else
|
65
|
+
@gem_path = `bundle info --path j1-template`
|
66
|
+
@module_path = File.join(@gem_path.chomp, @module_dir)
|
67
|
+
end
|
68
|
+
|
69
|
+
@lunr_path = File.join(@module_path, 'lunr.min.js')
|
70
|
+
raise "Could not find #{@lunr_path}" unless File.exist?(@lunr_path)
|
71
|
+
|
72
|
+
lunr_src = open(@lunr_path).read
|
73
|
+
ctx = ExecJS.compile(lunr_src)
|
74
|
+
|
75
|
+
@docs = {}
|
76
|
+
@excludes = @lunr_config['excludes']
|
77
|
+
|
78
|
+
# if web host supports index.html as default doc, then
|
79
|
+
# optionally exclude it from the url
|
80
|
+
#
|
81
|
+
@strip_index_html = @lunr_config['strip_index_html']
|
82
|
+
|
83
|
+
# stop word exclusion configuration
|
84
|
+
#
|
85
|
+
@min_length = @lunr_config['min_length']
|
86
|
+
@stopwords_file = @lunr_config['stopwords']
|
87
|
+
end
|
88
|
+
|
89
|
+
# Index all pages except pages matching any value in config['lunr_excludes']
|
90
|
+
# or with frontmatter settings (exclude_from_search: true)
|
91
|
+
#
|
92
|
+
def generate(site)
|
93
|
+
Jekyll.logger.info 'J1 LunrSearch:', 'creating search index ...'
|
94
|
+
|
95
|
+
@site = site
|
96
|
+
# gather posts and pages
|
97
|
+
#
|
98
|
+
items = pages_to_index(site)
|
99
|
+
content_renderer = PageRenderer.new(site)
|
100
|
+
# index = []
|
101
|
+
|
102
|
+
index_js = open(@lunr_path).read
|
103
|
+
# all settings must be added within the index function
|
104
|
+
#
|
105
|
+
index_js << 'var idx = lunr(function() {'
|
106
|
+
|
107
|
+
@lunr_config['fields'].each_pair do |name, boost|
|
108
|
+
index_js << "this.field('#{name}', {'boost': #{boost}});"
|
109
|
+
end
|
110
|
+
|
111
|
+
items.each_with_index do |item, i|
|
112
|
+
entry = SearchEntry.create(item, content_renderer)
|
113
|
+
|
114
|
+
entry.strip_index_suffix_from_url! if @strip_index_html
|
115
|
+
entry.strip_stopwords!(stopwords, @min_length) if File.exists?(@stopwords_file)
|
116
|
+
|
117
|
+
doc = {
|
118
|
+
'id' => i,
|
119
|
+
'title' => entry.title,
|
120
|
+
'tagline' => entry.tagline,
|
121
|
+
'url' => entry.url,
|
122
|
+
'date' => entry.date,
|
123
|
+
'tags' => entry.tags,
|
124
|
+
'categories' => entry.categories,
|
125
|
+
'description' => entry.description,
|
126
|
+
'is_post' => entry.is_post,
|
127
|
+
'body' => entry.body
|
128
|
+
}
|
129
|
+
|
130
|
+
index_js << 'this.add(' << ::JSON.generate(doc, quirks_mode: true) << ');'
|
131
|
+
# reduce the size of the doc array by deleting the body key
|
132
|
+
doc.delete('body')
|
133
|
+
@docs[i] = doc
|
134
|
+
|
135
|
+
end
|
136
|
+
index_js << '});'
|
137
|
+
|
138
|
+
filename = File.join(@index_dir, "#{@index_name}")
|
139
|
+
ctx = ExecJS.compile(index_js)
|
140
|
+
index = ctx.eval('JSON.stringify(idx)')
|
141
|
+
|
142
|
+
total = {
|
143
|
+
'docs' => @docs,
|
144
|
+
'index' => ::JSON.parse(index, {:max_nesting => false})
|
145
|
+
}
|
146
|
+
|
147
|
+
filepath = File.join(site.dest, filename)
|
148
|
+
# create data path if not already exists
|
149
|
+
FileUtils.mkdir_p(File.dirname(filepath))
|
150
|
+
File.open(filepath, 'w') { |f| f.write(JSON.dump(total)) }
|
151
|
+
Jekyll.logger.info 'J1 LunrSearch:', "finished, index ready"
|
152
|
+
added_files = [filename]
|
153
|
+
|
154
|
+
# Keep the written files from being cleaned by Jekyll
|
155
|
+
#
|
156
|
+
added_files.each do |fname|
|
157
|
+
site.static_files << SearchIndexFile.new(site, site.dest, '/', fname)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
private
|
162
|
+
|
163
|
+
# load the stopwords (file)
|
164
|
+
#
|
165
|
+
def stopwords
|
166
|
+
@stopwords ||= IO.readlines(@stopwords_file).map { |l| l.strip }
|
167
|
+
end
|
168
|
+
|
169
|
+
def output_ext(doc)
|
170
|
+
if doc.is_a?(Jekyll::Document)
|
171
|
+
Jekyll::Renderer.new(@site, doc).output_ext
|
172
|
+
else
|
173
|
+
doc.output_ext
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def pages_to_index(site)
|
178
|
+
items = []
|
179
|
+
|
180
|
+
# deep copy pages and documents (all collections, including posts)
|
181
|
+
#
|
182
|
+
site.pages.each {|page| items << page.dup }
|
183
|
+
site.documents.each {|document| items << document.dup }
|
184
|
+
|
185
|
+
# process only files that will be converted to .html and only
|
186
|
+
# non excluded files
|
187
|
+
#
|
188
|
+
items.select! {|i| i.respond_to?(:output_ext) && output_ext(i) == '.html' && ! @excludes.any? {|s| (i.url =~ Regexp.new(s)) != nil } }
|
189
|
+
items.reject! {|i| i.data['exclude_from_search'] }
|
190
|
+
|
191
|
+
items
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
require 'nokogiri'
|
198
|
+
module Jekyll
|
199
|
+
module J1LunrSearch
|
200
|
+
class PageRenderer
|
201
|
+
def initialize(site)
|
202
|
+
@site = site
|
203
|
+
end
|
204
|
+
|
205
|
+
# render item, but without using its layout
|
206
|
+
#
|
207
|
+
def prepare(item)
|
208
|
+
layout = item.data['layout']
|
209
|
+
begin
|
210
|
+
item.data['layout'] = nil
|
211
|
+
|
212
|
+
if item.is_a?(Jekyll::Document)
|
213
|
+
output = Jekyll::Renderer.new(@site, item).run
|
214
|
+
else
|
215
|
+
item.render({}, @site.site_payload)
|
216
|
+
output = item.output
|
217
|
+
end
|
218
|
+
ensure
|
219
|
+
# restore original layout
|
220
|
+
#
|
221
|
+
item.data['layout'] = layout
|
222
|
+
end
|
223
|
+
|
224
|
+
output
|
225
|
+
end
|
226
|
+
|
227
|
+
# render the item, parse the output and get all text elements
|
228
|
+
#
|
229
|
+
def render(item)
|
230
|
+
layoutless = item.dup
|
231
|
+
Nokogiri::HTML(prepare(layoutless)).text
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
require 'nokogiri'
|
238
|
+
module Jekyll
|
239
|
+
module J1LunrSearch
|
240
|
+
#noinspection RubyTooManyInstanceVariablesInspection
|
241
|
+
class SearchEntry
|
242
|
+
def self.create(site, renderer)
|
243
|
+
if site.is_a?(Jekyll::Page) or site.is_a?(Jekyll::Document)
|
244
|
+
|
245
|
+
if defined?(site.date)
|
246
|
+
date = site.date
|
247
|
+
elsif defined?(site.data['date'])
|
248
|
+
date = site.data['date']
|
249
|
+
else
|
250
|
+
date = '2020-01-01 00:00:00'
|
251
|
+
end
|
252
|
+
|
253
|
+
tagline = site.data['tagline']
|
254
|
+
tags = site.data['tags']
|
255
|
+
categories = site.data['categories']
|
256
|
+
description = site.data['description']
|
257
|
+
title, url = extract_title_and_url(site)
|
258
|
+
is_post = site.is_a?(Jekyll::Document)
|
259
|
+
body = renderer.render(site)
|
260
|
+
|
261
|
+
SearchEntry.new(title, tagline, url, date, tags, categories, description, is_post, body, renderer)
|
262
|
+
else
|
263
|
+
raise 'Not supported'
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
def self.extract_title_and_url(item)
|
268
|
+
data = item.to_liquid
|
269
|
+
[ data['title'], data['url'] ]
|
270
|
+
end
|
271
|
+
|
272
|
+
attr_reader :title, :tagline, :url, :date, :tags, :categories, :description, :is_post, :body, :collection
|
273
|
+
|
274
|
+
def initialize(title, tagline, url, date, tags, categories, description, is_post, body, collection)
|
275
|
+
@title, @tagline, @url, @date,@tags, @categories, @description, @is_post, @body, @collection = title, tagline, url, date, tags, categories, description, is_post, body, collection
|
276
|
+
end
|
277
|
+
|
278
|
+
def strip_index_suffix_from_url!
|
279
|
+
@url.gsub!(/index\.html$/, '')
|
280
|
+
end
|
281
|
+
|
282
|
+
# remove anything that is in the stop words list from
|
283
|
+
# the text to be indexed
|
284
|
+
#
|
285
|
+
def strip_stopwords!(stopwords, min_length)
|
286
|
+
#noinspection RubyParenthesesAfterMethodCallInspection
|
287
|
+
@body = @body.split.delete_if() do |x|
|
288
|
+
t = x.downcase.gsub(/[^a-z]/, '')
|
289
|
+
t.length < min_length || stopwords.include?(t)
|
290
|
+
end.join(' ')
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
module Jekyll
|
297
|
+
module J1LunrSearch
|
298
|
+
class SearchIndexFile < Jekyll::StaticFile
|
299
|
+
# Override write as the lunr index file has been
|
300
|
+
# already created
|
301
|
+
#
|
302
|
+
def write(dest)
|
303
|
+
true
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
module Jekyll
|
310
|
+
module J1LunrSearch
|
311
|
+
VERSION = '1.0.0'
|
312
|
+
end
|
313
|
+
end
|
@@ -9,9 +9,7 @@
|
|
9
9
|
#
|
10
10
|
# J1 Template is licensed under the MIT License.
|
11
11
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
-
#
|
13
12
|
# ------------------------------------------------------------------------------
|
14
|
-
#
|
15
13
|
# NOTE:
|
16
14
|
# CustomFilters cannot be used in SAFE mode (e.g not usable for
|
17
15
|
# rendering pages with Jekyll on GitHub
|
@@ -23,7 +21,6 @@
|
|
23
21
|
#
|
24
22
|
# {% endcapture %}
|
25
23
|
# {{ cache_name | pretty_print }}
|
26
|
-
#
|
27
24
|
# ------------------------------------------------------------------------------
|
28
25
|
require 'nokogiri'
|
29
26
|
require 'nokogiri-pretty'
|
@@ -13,14 +13,13 @@
|
|
13
13
|
# See: https://github.com/willnorris/willnorris.com/blob/master/LICENSE
|
14
14
|
# J1 Template is licensed under the MIT License.
|
15
15
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
16
|
-
#
|
17
16
|
# ------------------------------------------------------------------------------
|
18
17
|
# NOTE:
|
19
18
|
# The symlink_watcher plugin extends jekyll-watch to listen also
|
20
19
|
# for changes in any symlinked sub-directory.
|
21
20
|
#
|
22
|
-
# For example, in _drafts directory is a symlink to a directory
|
23
|
-
# elsewhere on the filesystem. This plugin will cause jekyll to
|
21
|
+
# For example, in _drafts directory is a symlink to a directory
|
22
|
+
# elsewhere on the filesystem. This plugin will cause jekyll to
|
24
23
|
# regenerate the site when ANY file change in the drafts folder.
|
25
24
|
# ------------------------------------------------------------------------------
|
26
25
|
require "find"
|
Binary file
|
@@ -6,12 +6,10 @@ description: Jekyll URL Configuration
|
|
6
6
|
date: 2018-05-01 00:00:00
|
7
7
|
series:
|
8
8
|
adsense: false
|
9
|
-
|
10
|
-
image: /assets/images/collections/blog/featured/what-is-a-baseurl.jpg
|
9
|
+
image: /assets/images/collections/blog/featured/what-is-a-baseurl.jpg
|
11
10
|
|
12
11
|
tags: [ Jekyll, Configuration ]
|
13
|
-
|
14
|
-
categories: [ featured ]
|
12
|
+
categories: [ Featured ]
|
15
13
|
|
16
14
|
regenerate: false
|
17
15
|
|
@@ -9,9 +9,9 @@ adsense: false
|
|
9
9
|
image: /assets/images/modules/attics/building-blocks-1920x1280-bw.jpg
|
10
10
|
|
11
11
|
tags: [ Jekyll, Generators ]
|
12
|
-
|
13
|
-
categories: []
|
12
|
+
categories: [ Featured ]
|
14
13
|
|
14
|
+
toc: true
|
15
15
|
regenerate: false
|
16
16
|
|
17
17
|
resources: []
|
@@ -72,6 +72,8 @@ That means fetching the content from a database to pass them over to a template
|
|
72
72
|
system for adding the required structure information (e.g. CSS styles).
|
73
73
|
This means each page is assembled on demand.
|
74
74
|
|
75
|
+
=== Is an CMS needed?
|
76
|
+
|
75
77
|
For many, many websites dynamic page generation is entirely unnecessary and
|
76
78
|
adds unwanted risks in terms of complexity, performance losses and security
|
77
79
|
issues. After all, the content of most websites changes only, when the content
|