insights4you-jekyll-theme 0.4.0 → 0.5.0

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +144 -56
  4. data/_data/i4y-strings.yml +32 -0
  5. data/_includes/ui/button.html +1 -1
  6. data/_includes/ui/empty.html +3 -3
  7. data/_includes/utils/comments.html +34 -0
  8. data/_includes/utils/projects.html +250 -0
  9. data/_includes/utils/search.html +33 -0
  10. data/_includes/utils/settings.html +162 -132
  11. data/_layouts/base.html +26 -21
  12. data/_layouts/default.html +28 -28
  13. data/_layouts/error.html +9 -6
  14. data/_layouts/post.html +26 -0
  15. data/_sass/bootstrap/scss/vendor/_rfs.scss +348 -0
  16. data/insights4you-jekyll-theme.gemspec +34 -40
  17. metadata +39 -82
  18. data/_sass/bootstrap/README.md +0 -246
  19. data/_sass/bootstrap/js/index.esm.js +0 -19
  20. data/_sass/bootstrap/js/index.umd.js +0 -34
  21. data/_sass/bootstrap/js/src/alert.js +0 -87
  22. data/_sass/bootstrap/js/src/base-component.js +0 -85
  23. data/_sass/bootstrap/js/src/button.js +0 -72
  24. data/_sass/bootstrap/js/src/carousel.js +0 -474
  25. data/_sass/bootstrap/js/src/collapse.js +0 -297
  26. data/_sass/bootstrap/js/src/dom/data.js +0 -55
  27. data/_sass/bootstrap/js/src/dom/event-handler.js +0 -317
  28. data/_sass/bootstrap/js/src/dom/manipulator.js +0 -71
  29. data/_sass/bootstrap/js/src/dom/selector-engine.js +0 -126
  30. data/_sass/bootstrap/js/src/dropdown.js +0 -455
  31. data/_sass/bootstrap/js/src/modal.js +0 -378
  32. data/_sass/bootstrap/js/src/offcanvas.js +0 -282
  33. data/_sass/bootstrap/js/src/popover.js +0 -97
  34. data/_sass/bootstrap/js/src/scrollspy.js +0 -296
  35. data/_sass/bootstrap/js/src/tab.js +0 -315
  36. data/_sass/bootstrap/js/src/toast.js +0 -225
  37. data/_sass/bootstrap/js/src/tooltip.js +0 -633
  38. data/_sass/bootstrap/js/src/util/backdrop.js +0 -151
  39. data/_sass/bootstrap/js/src/util/component-functions.js +0 -35
  40. data/_sass/bootstrap/js/src/util/config.js +0 -65
  41. data/_sass/bootstrap/js/src/util/focustrap.js +0 -115
  42. data/_sass/bootstrap/js/src/util/index.js +0 -306
  43. data/_sass/bootstrap/js/src/util/sanitizer.js +0 -117
  44. data/_sass/bootstrap/js/src/util/scrollbar.js +0 -114
  45. data/_sass/bootstrap/js/src/util/swipe.js +0 -146
  46. data/_sass/bootstrap/js/src/util/template-factory.js +0 -160
  47. data/_sass/bootstrap/package.json +0 -184
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e7de0952caad7e7ba6bdb9650aaa40e8a343c177967a0cdbf42801a46f1d738
4
- data.tar.gz: 727f114144cd5246336b73239b9cc285d8240cd7bbf68b6ec42479185040096f
3
+ metadata.gz: 4409020af0e3cbe25b0aa6f1563daa55e07a1d96150e85518897ddff5c621d05
4
+ data.tar.gz: 99f9c2b937854c1d8425a671f373f1c683dfca6461a771a7393d4bac9c2a93a1
5
5
  SHA512:
6
- metadata.gz: 804f08bc79666cc67596b3bf0ab5cafcf61a6279f18e10c4852c1fadd4f57ef6e6b501f0cea1154c421e9251bc2a9c856699f1992f5493ee2bf6269e16e09478
7
- data.tar.gz: c00d4da9f2ac0caf0fa15acc27426a0d8e5f9065d35223a62238eae69c614afb35db0bc6f507817ed559e7566513f12bbb9eb052344f59b245f64d270fa1a242
6
+ metadata.gz: e0041ca8bcace71229e8db0e7dd8d4a9ec9df4c30298597e9baf29d77dbaeb4daa6b473c77ed51a13af62294c1c7d808e2e228865d349a21d91c1d060b54cadd
7
+ data.tar.gz: a84cca38a95e45848a6acee9c48c4ac129280f7275d1df3c99a6954f78e620d79d8d386901de67ba13cbca2fddeda570d1579e9822fa4c67b4a2fe181ee616e8
data/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0]
9
+
10
+ ### Added
11
+ - **Blog**: `_layouts/post.html` and a card-based blog listing pattern (see the example site's `pages/blog.html`) - the theme previously had no working blog at all.
12
+ - **Local Projects**: the "Local Projects" section of `utils/projects.html` was a static empty placeholder; it now renders real cards from a site's `projects` collection (`name`, `tools`, `image`, `description`, `external_url`), alongside the existing auto-generated GitHub-starred-repos grid.
13
+ - **Comments**: optional Giscus (GitHub Discussions) comments on posts, via `_includes/utils/comments.html` and a `giscus:` block in `_config.yml`.
14
+ - **i18n**: `_data/i4y-strings.yml` makes every hardcoded UI string (project page headings, empty/error states, search placeholder) overridable by a consuming site.
15
+ - **Instant search**: `_includes/utils/search.html`, a dependency-free client-side filter over any card grid - closes the gap with the long-standing "Search Functionality" feature claim in the README, which was never actually implemented.
16
+ - Simple tags page pattern (groups posts by `site.tags`).
17
+
18
+ ### Fixed
19
+ - `_layouts/error.html` never actually read `_data/i4y-errors.json`: it referenced an undefined `errors` variable, and separately indexed it with an unconverted integer front-matter value against string JSON keys. Error pages always fell back to generic text/icon instead of the configured copy and illustration.
20
+ - `_includes/ui/button.html` built internal links with `site.base`, a variable that doesn't exist anywhere in the theme, producing `href="//path"` (a protocol-relative URL pointing at a fake host) for every internal button. Switched to the `relative_url` filter.
21
+ - `_sass/bootstrap/scss/vendor/_rfs.scss` was missing from the vendored Bootstrap 5.3.3 copy, so `bundle exec jekyll build` failed on **every** site using this theme with a real Sass compiler. Root cause: `.gitignore` had a bare `vendor/` entry, which ignores a folder named `vendor` at *any* depth, not just the repo root - it was silently dropping this file from every commit. Fixed to `/vendor/`.
22
+ - README badge pointed at a non-existent `.github/workflows/gem-build.yml` (the real file is `gem.yml`).
23
+ - `spec.description` in the gemspec was `File.read('README.md')`, so the RubyGems.org listing showed raw Markdown/HTML instead of a normal description.
24
+ - `example-site/about.markdown` and `pages/blog.html` used `layout: home` / `layout: post`, neither of which existed in the theme - both silently rendered without any layout at all.
25
+ - `example-site/pages/404.html` rendered its error illustration twice (once via the layout, once via an extra include in the page body).
26
+ - `example-site/_config.yml` set `theme:` and `remote_theme:` at the same time, and used a `github: user:` key that `jekyll-github-metadata` doesn't recognize (the real key is `repository:`).
27
+
28
+ ### Changed
29
+ - `spec.files` in the gemspec no longer packages the vendored Bootstrap's JS source or `package.json` - only the `.scss` partials Jekyll actually needs, and the Bootstrap `LICENSE` for compliance. Shrinks the published gem.
30
+ - README rewritten to document what the theme actually does today (including the GitHub Pages native-build incompatibility and the GitHub Actions deploy workaround), replacing several `[WIP]` sections and one feature claim ("Search Functionality") that had never been implemented.
31
+ - Removed `docs/` - it described a considerably more elaborate, never-implemented version of the projects feature (a separate fetch script, on-disk cache, dedicated local-projects collection). Superseded by the simpler real implementation, now documented in the README.
32
+
8
33
  ## [0.4.0]
9
34
 
10
35
  ### Added
@@ -104,6 +129,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
104
129
  - **N/A**: No files or features were removed in this release.
105
130
 
106
131
 
132
+ [0.5.0]: https://github.com/marciopaiva/insights4you-jekyll-theme/compare/v0.4.0...v0.5.0
107
133
  [0.4.0]: https://github.com/marciopaiva/insights4you-jekyll-theme/compare/v0.3.0...v0.4.0
108
134
  [0.3.0]: https://github.com/marciopaiva/insights4you-jekyll-theme/compare/v0.2.3...v0.3.0
109
135
  [0.2.3]: https://github.com/marciopaiva/insights4you-jekyll-theme/compare/v0.2.2...v0.2.3
data/README.md CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Insights4YOU Jekyll Theme
4
4
 
5
- A sleek and modern Jekyll theme inspired by the [Tabler Admin Dashboard](https://github.com/tabler/tabler). This theme offers a clean, professional, and responsive interface, making it ideal for developers, content creators, and businesses. Whether you're building documentation sites, admin panels, or project showcases, this theme provides a minimal-effort solution with customizable layouts and modern design elements.
5
+ A sleek and modern Jekyll theme inspired by the [Tabler Admin Dashboard](https://github.com/tabler/tabler). This theme offers a clean, professional, and responsive interface, making it ideal for developers, content creators, and businesses. Whether you're building a personal site, a blog, or a project showcase, this theme provides a minimal-effort solution with customizable layouts and modern design elements.
6
6
 
7
7
  ![Theme Preview](assets/images/preview-dark.png)
8
8
 
9
9
  [![last commit](https://img.shields.io/github/last-commit/marciopaiva/insights4you-jekyll-theme?logo=github)][repo]
10
- [![gem build](https://github.com/marciopaiva/insights4you-jekyll-theme/actions/workflows/gem-build.yml/badge.svg)][build]
10
+ [![gem build](https://github.com/marciopaiva/insights4you-jekyll-theme/actions/workflows/gem.yml/badge.svg)][build]
11
11
  [![codacy badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy]
12
12
  [![gem version](https://img.shields.io/gem/v/insights4you-jekyll-theme?&logo=rubygems&logoColor=ghostwhite&label=gem&color=orange)][gem]
13
13
  [![downloads](https://img.shields.io/gem/dt/insights4you-jekyll-theme?logo=rubygems&color=blue)][gem]
@@ -17,69 +17,134 @@ A sleek and modern Jekyll theme inspired by the [Tabler Admin Dashboard](https:/
17
17
 
18
18
  ## 🌟 Features
19
19
 
20
- - 🌙 **Dark and Light Themes**: Switch between dark and light modes for a personalized experience
21
- - 📱 **Responsive Design**: Fully optimized for mobile, tablet, and desktop devices
22
- - 🔧 **Customizable Layouts**: Easily modify layouts to suit your needs
23
- - 🚀 **SEO Optimized**: Built-in support for Jekyll SEO tags to improve search engine visibility
24
- - 📦 **Gem-Based Installation**: Simple installation via RubyGems
25
- - 📝 **Markdown Support**: Write content using Markdown for simplicity and flexibility
26
- - 🎨 **Modern Design**: Inspired by the Tabler Admin Dashboard for a sleek and professional look
27
- - 📊 **Analytics Ready**: Add analytics scripts easily for tracking user interactions
28
- - 🔍 **Search Functionality**: Built-in search capabilities for content discovery
29
- - 🎯 **Clean Code**: Well-documented and maintainable codebase
30
- - 🛠️ **Developer Friendly**: Easy to extend and customize
31
- - 📱 **Mobile First**: Designed with mobile devices in mind
20
+ - 🌙 **Dark and Light Themes**: A "Theme Builder" panel lets visitors switch color mode, accent color, font family, gray base and corner radius on the fly (saved in `localStorage`)
21
+ - 📱 **Responsive Design**: Built on Bootstrap 5 / Tabler, fully usable on mobile, tablet and desktop
22
+ - ✍️ **Blog**: `_posts` support with a ready-to-use post layout and a card-based listing page
23
+ - 🔍 **Instant Search**: Client-side filtering over any card grid (e.g. the blog listing) as you type - no build step or external service
24
+ - 📦 **Projects, two ways**: a `projects` collection for hand-curated local project cards, plus an auto-generated grid of your GitHub repositories that have at least one star (via `jekyll-github-metadata`)
25
+ - 💬 **Comments via Giscus**: optional, GitHub Discussions-based comments on posts - no third-party ads or tracking
26
+ - 🌐 **Translatable UI strings**: every built-in label (project page headings, error pages, empty states, search placeholder) can be overridden by your own `_data/i4y-strings.yml` and `_data/i4y-errors.json`
27
+ - 🚀 **SEO Ready**: ships with `jekyll-seo-tag`, `jekyll-sitemap` and `jekyll-feed` support
28
+ - 📦 **Gem-Based Installation**: install via RubyGems, or track the repo directly with Bundler's `github:` source
29
+ - 🎨 **200+ bundled icons**: Tabler's icon set, inlined as SVG by default (or as an icon font, if you prefer)
32
30
 
33
31
  ## 📋 Requirements
34
32
 
35
- - Ruby >= 2.7.0
36
- - Jekyll ~> 4.2
37
- - Bundler ~> 2.3
33
+ - Ruby >= 3.2.2
34
+ - Jekyll >= 4.4, < 5.0
35
+ - Bundler ~> 2.4
38
36
 
39
- ## 🚀 Quick Start
37
+ ⚠️ **This theme will not build on GitHub Pages' native "Deploy from a branch" option.** GitHub Pages' native build pins Jekyll to 3.10 and its Sass converter to the legacy Ruby Sass line, which cannot compile the Dart-Sass module syntax (`@use`, `color.adjust(...)`) that Bootstrap 5.3+ uses. Deploy via **GitHub Actions** instead - see [Deploying to GitHub Pages](#-deploying-to-github-pages) below.
40
38
 
41
- 1. **Install the theme:**
42
- ```ruby
43
- gem install insights4you-jekyll-theme
44
- ```
39
+ ## 🚀 Quick Start
45
40
 
46
- 2. **Create a new Jekyll site:**
47
- ```ruby
48
- jekyll new my-website
41
+ 1. **Create a new Jekyll site** (or use an existing one):
42
+ ```bash
43
+ jekyll new my-website && cd my-website
49
44
  ```
50
45
 
51
- 3. **Add the theme to your Jekyll site's `Gemfile`:**
46
+ 2. **Add the theme to your `Gemfile`:**
52
47
  ```ruby
53
48
  gem "insights4you-jekyll-theme"
49
+
50
+ group :jekyll_plugins do
51
+ gem "jekyll-feed"
52
+ gem "jekyll-seo-tag"
53
+ gem "jekyll-sitemap"
54
+ gem "jekyll-github-metadata"
55
+ gem "jekyll-paginate" # required by the theme's own dependencies, even if unused
56
+ gem "jemoji"
57
+ end
54
58
  ```
55
59
 
56
- 4. **Update your `_config.yml`:**
60
+ 3. **Update your `_config.yml`:**
57
61
  ```yaml
58
62
  theme: insights4you-jekyll-theme
63
+ repository: your-username/your-repo # NWO used by jekyll-github-metadata
64
+
65
+ plugins:
66
+ - jemoji
67
+ - jekyll-seo-tag
68
+ - jekyll-sitemap
69
+ - jekyll-feed
70
+ - jekyll-github-metadata
71
+
72
+ author:
73
+ name: Your Name
74
+ bio: Your one-line bio
75
+ image: https://example.com/your-avatar.jpg
76
+ email: you@example.com
77
+ github: your-username # matched against _data/i4y-social-media.yml
78
+ linkedin: your-linkedin-slug
59
79
  ```
60
80
 
61
- 5. **Install dependencies:**
81
+ 4. **Install dependencies and start your site:**
62
82
  ```bash
63
83
  bundle install
84
+ bundle exec jekyll serve
64
85
  ```
65
86
 
66
- 6. **Start your site:**
67
- ```bash
68
- bundle exec jekyll serve
87
+ ## 🚢 Deploying to GitHub Pages
88
+
89
+ Because of the Sass constraint above, set your repository's **Settings → Pages → Source** to **"GitHub Actions"**, and add a workflow like this (adjust the ruby version/paths as needed):
90
+
91
+ ```yaml
92
+ name: Deploy Jekyll site to Pages
93
+
94
+ on:
95
+ push:
96
+ branches: ["main"]
97
+ workflow_dispatch:
98
+
99
+ permissions:
100
+ contents: read
101
+ pages: write
102
+ id-token: write
103
+
104
+ concurrency:
105
+ group: "pages"
106
+ cancel-in-progress: false
107
+
108
+ jobs:
109
+ build:
110
+ runs-on: ubuntu-latest
111
+ steps:
112
+ - uses: actions/checkout@v4
113
+ - uses: ruby/setup-ruby@v1
114
+ with:
115
+ ruby-version: "3.2"
116
+ bundler-cache: true
117
+ - id: pages
118
+ uses: actions/configure-pages@v5
119
+ - env:
120
+ JEKYLL_ENV: production
121
+ PAGES_REPO_NWO: ${{ github.repository }}
122
+ JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123
+ run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
124
+ - uses: actions/upload-pages-artifact@v3
125
+ with:
126
+ path: _site
127
+
128
+ deploy:
129
+ environment:
130
+ name: github-pages
131
+ url: ${{ steps.deployment.outputs.page_url }}
132
+ runs-on: ubuntu-latest
133
+ needs: build
134
+ steps:
135
+ - id: deployment
136
+ uses: actions/deploy-pages@v4
69
137
  ```
70
138
 
139
+ `JEKYLL_GITHUB_TOKEN` gives `jekyll-github-metadata` a 5,000 requests/hour budget instead of the unauthenticated 60/hour limit - without it, the GitHub-repositories grid may silently come up empty on repeated builds.
140
+
71
141
  ## 🎯 Demo Site
72
142
 
73
143
  To see the theme in action, check out the included example site:
74
144
 
75
145
  ```bash
76
- # Clone the repository
77
146
  git clone https://github.com/marciopaiva/insights4you-jekyll-theme.git
78
-
79
- # Navigate to theme directory
80
147
  cd insights4you-jekyll-theme
81
-
82
- # build and test
83
148
  make dev
84
149
  ```
85
150
 
@@ -87,27 +152,50 @@ Visit `http://localhost:4000` to see the demo site in action.
87
152
 
88
153
  ## 🎨 Customization
89
154
 
90
- ### Theme Configuration
91
- [WIP]
92
-
93
- ### Available Layouts
94
- - `default`: Standard page layout
155
+ ### Layouts
156
+ | Layout | Use it for |
157
+ |---|---|
158
+ | `base` | Root HTML document. You won't use this directly. |
159
+ | `default` | Standard pages (home, about, projects...). Set `layout-wrapper-full: true` in front matter for a centered "card" wrapper instead of the full-width container - handy for long-form content. |
160
+ | `post` | Blog posts. Renders title, date, tags, content, and Giscus comments (if enabled and `page.comments: true`). |
161
+ | `error` | Error pages (404, etc). Set `page-error: "404"` in front matter to pull text/illustration from `_data/i4y-errors.json`. |
162
+
163
+ ### Front matter reference
164
+ | Key | Where | Effect |
165
+ |---|---|---|
166
+ | `weight` | any page | Order in the navbar (lower first) |
167
+ | `icon` | any page | Tabler icon name shown next to its navbar entry |
168
+ | `external_url` | any page | Makes its navbar entry link elsewhere instead of `page.url` |
169
+ | `no-container` | page/layout | Removes the `.container-xl` around the page body |
170
+ | `layout-wrapper-full` | page/layout | Centered card wrapper (see `default` layout above) |
171
+ | `custom_css` / `custom_js` | any page | Arrays of extra `/assets/{css,js}/<name>.{css,js}` files to load |
172
+ | `comments` | posts | Show the Giscus widget on this post (also needs `site.giscus.enabled: true`) |
173
+
174
+ ### Translating the UI
175
+ Every hardcoded label lives in `_data/i4y-strings.yml`. Copy the theme's version into your own site's `_data/i4y-strings.yml` and translate it - your site's file takes precedence over the theme's. Error-page copy (`_data/i4y-errors.json`) works the same way.
176
+
177
+ ### Adding local projects
178
+ Declare a `projects` collection in `_config.yml`:
179
+ ```yaml
180
+ collections:
181
+ projects:
182
+ output: true
183
+ permalink: /projects/:name
184
+ ```
185
+ Then add files under `_projects/`:
186
+ ```yaml
187
+ ---
188
+ name: My Project
189
+ tools: [Rust, Tauri]
190
+ image: /assets/images/my-project.png # optional
191
+ description: One or two sentences about it.
192
+ external_url: https://github.com/you/my-project # omit to link to this file's own body instead
193
+ ---
194
+ Optional markdown body, rendered as the project's own detail page when there's no `external_url`.
195
+ ```
95
196
 
96
197
  ### Custom Styling
97
- Create a new file `assets/css/custom.scss` to add your own styles:
98
-
99
- [WIP]
100
-
101
- ## 📝 Documentation
102
-
103
- ### Directory Structure
104
- [WIP]
105
-
106
- ### Creating Posts
107
- [WIP]
108
-
109
- ### Creating Pages
110
- [WIP]
198
+ Add your own `_sass` partials and `@import` them from a site-level `assets/css/custom.scss`, then reference it from a page's `custom_css` front matter key.
111
199
 
112
200
  ## 🤝 Contributing
113
201
 
@@ -130,7 +218,7 @@ This project is licensed under the MIT License - see the LICENSE file for detail
130
218
  - All contributors who help improve this theme
131
219
 
132
220
  [repo]: https://github.com/marciopaiva/insights4you-jekyll-theme
133
- [build]: https://github.com/marciopaiva/insights4you-jekyll-theme/actions/workflows/gem-build.yml
221
+ [build]: https://github.com/marciopaiva/insights4you-jekyll-theme/actions/workflows/gem.yml
134
222
  [codacy]: https://app.codacy.com/gh/marciopaiva/insights4you-jekyll-theme/dashboard
135
223
  [gem]: https://rubygems.org/gems/insights4you-jekyll-theme
136
224
  [license]: https://github.com/marciopaiva/insights4you-jekyll-theme/blob/master/LICENSE
@@ -0,0 +1,32 @@
1
+ # UI strings used by theme includes/layouts. Override this whole file in
2
+ # your own site's _data/i4y-strings.yml to translate the theme (Jekyll site
3
+ # data takes precedence over the theme's bundled data file of the same name).
4
+
5
+ projects:
6
+ title: "Projects"
7
+ description: "Here you'll find a collection of my projects, experiments, and learning."
8
+ unable_to_load_title: "Unable to load repositories"
9
+ unable_to_load_description: "There was a problem fetching the repository data. Please try again later."
10
+ no_starred_title: "No starred repositories found"
11
+ no_starred_description: "Repositories with at least one star will appear here."
12
+ uncategorized: "Uncategorized"
13
+ stars: "Stars"
14
+ watchers: "Watchers"
15
+ forks: "Forks"
16
+ issues: "Issues"
17
+ no_description: "No description available"
18
+ view_repository: "View Repository"
19
+ local_projects: "Local Projects"
20
+ view_project: "View Project"
21
+
22
+ empty:
23
+ title: "No results found"
24
+ subtitle: "Try adjusting your search or filter to find what you're looking for."
25
+ button_text: "Search again"
26
+
27
+ error:
28
+ default_header: "Oops… You just found an error page"
29
+ home_button: "Take me home"
30
+
31
+ search:
32
+ placeholder: "Search..."
@@ -13,7 +13,7 @@
13
13
  {% if include.external %}
14
14
  {% assign href = include.href %}
15
15
  {% else %}
16
- {% assign href = site.base | append: '/' | append: include.href %}
16
+ {% assign href = include.href | relative_url %}
17
17
  {% endif %}
18
18
  {% endif %}
19
19
 
@@ -11,12 +11,12 @@
11
11
  {% endif %}
12
12
 
13
13
 
14
- <p class="empty-title">{{ include.title | default: "No results found" }}</p>
14
+ <p class="empty-title">{{ include.title | default: site.data.i4y-strings.empty.title | default: "No results found" }}</p>
15
15
  <p class="empty-subtitle text-secondary">
16
- {{ include.subtitle | default: "Try adjusting your search or filter to find what you're looking for." }}
16
+ {{ include.subtitle | default: site.data.i4y-strings.empty.subtitle | default: "Try adjusting your search or filter to find what you're looking for." }}
17
17
  </p>
18
18
  <div class="empty-action">
19
- {% assign button-text = include.button-text | default: "Search again" %}
19
+ {% assign button-text = include.button-text | default: site.data.i4y-strings.empty.button_text | default: "Search again" %}
20
20
  {% assign button-icon = include.button-icon | default: "search" %}
21
21
  {% include ui/button.html text=button-text color="primary" icon=button-icon href="." %}
22
22
  </div>
@@ -0,0 +1,34 @@
1
+ {% if site.giscus.enabled and site.giscus.repo and site.giscus.repo_id and site.giscus.category_id %}
2
+ <div class="mt-5" id="giscus-comments">
3
+ <script src="https://giscus.app/client.js"
4
+ data-repo="{{ site.giscus.repo }}"
5
+ data-repo-id="{{ site.giscus.repo_id }}"
6
+ data-category="{{ site.giscus.category | default: 'Comments' }}"
7
+ data-category-id="{{ site.giscus.category_id }}"
8
+ data-mapping="{{ site.giscus.mapping | default: 'pathname' }}"
9
+ data-strict="0"
10
+ data-reactions-enabled="1"
11
+ data-emit-metadata="0"
12
+ data-input-position="bottom"
13
+ data-theme="{% if page.layout-dark or site.layout-dark %}dark{% else %}light{% endif %}"
14
+ data-lang="{{ page.lang | default: site.lang | default: 'en' }}"
15
+ crossorigin="anonymous"
16
+ async>
17
+ </script>
18
+ </div>
19
+ <script>
20
+ document.addEventListener('DOMContentLoaded', function () {
21
+ function giscusTheme() {
22
+ return (document.documentElement.classList.contains('dark') || document.body.classList.contains('theme-dark')) ? 'dark' : 'light';
23
+ }
24
+ function sendGiscusTheme() {
25
+ var iframe = document.querySelector('iframe.giscus-frame');
26
+ if (!iframe) return;
27
+ iframe.contentWindow.postMessage({ giscus: { setConfig: { theme: giscusTheme() } } }, 'https://giscus.app');
28
+ }
29
+ var observer = new MutationObserver(sendGiscusTheme);
30
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
31
+ observer.observe(document.body, { attributes: true, attributeFilter: ['class'] });
32
+ });
33
+ </script>
34
+ {% endif %}