ultimate-jekyll-manager 0.0.103 → 0.0.104
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.
- package/dist/commands/setup.js +76 -0
- package/dist/config/_config_default.yml +2 -2
- package/dist/defaults/Gemfile +2 -2
- package/dist/defaults/dist/_includes/core/foot.html +7 -7
- package/dist/defaults/dist/_includes/core/head.html +10 -10
- package/dist/defaults/dist/_includes/themes/classy/backend/sections/sidebar.html +2 -2
- package/dist/defaults/dist/_includes/themes/classy/frontend/sections/footer.html +3 -3
- package/dist/defaults/dist/_includes/themes/classy/frontend/sections/nav.html +1 -1
- package/dist/defaults/dist/_layouts/blueprint/legal/cookies.md +2 -2
- package/dist/defaults/dist/_layouts/blueprint/legal/privacy.md +2 -2
- package/dist/defaults/dist/_layouts/blueprint/legal/terms.md +2 -2
- package/dist/defaults/dist/_layouts/modules/utilities/redirect.html +1 -1
- package/dist/defaults/dist/_layouts/themes/classy/admin/core/iframe.html +4 -4
- package/dist/defaults/dist/_layouts/themes/classy/backend/core/base.html +1 -1
- package/dist/defaults/dist/_layouts/themes/classy/backend/core/minimal.html +1 -1
- package/dist/defaults/dist/_layouts/themes/classy/frontend/core/base.html +1 -1
- package/dist/defaults/dist/feeds/posts.json +2 -2
- package/dist/defaults/dist/feeds/posts.xml +1 -1
- package/dist/defaults/dist/pages/test/translation/index.md +2 -2
- package/dist/defaults/dist/pages.json +5 -5
- package/dist/gulp/tasks/setup.js +1 -0
- package/dist/gulp/tasks/utils/detect-github-repo.js +42 -0
- package/dist/gulp/tasks/utils/github-cache.js +4 -20
- package/firebase-debug.log +28 -0
- package/package.json +6 -5
package/dist/commands/setup.js
CHANGED
|
@@ -10,6 +10,9 @@ const { execute, template } = require('node-powertools');
|
|
|
10
10
|
const NPM = require('npm-api');
|
|
11
11
|
const glob = require('glob').globSync;
|
|
12
12
|
const { minimatch } = require('minimatch');
|
|
13
|
+
const detectGitHubRepository = require('../gulp/tasks/utils/detect-github-repo');
|
|
14
|
+
const { Octokit } = require('@octokit/rest');
|
|
15
|
+
const sodium = require('libsodium-wrappers');
|
|
13
16
|
|
|
14
17
|
// Load package
|
|
15
18
|
const package = Manager.getPackage('main');
|
|
@@ -37,6 +40,7 @@ module.exports = async function (options) {
|
|
|
37
40
|
options.fetchFirebaseAuth = options.fetchFirebaseAuth !== 'false';
|
|
38
41
|
options.checkLocality = options.checkLocality !== 'false';
|
|
39
42
|
options.updateBundle = options.updateBundle !== 'false';
|
|
43
|
+
options.publishGitHubToken = options.publishGitHubToken !== 'false';
|
|
40
44
|
|
|
41
45
|
// Log
|
|
42
46
|
logger.log(`Welcome to ${package.name} v${package.version}!`);
|
|
@@ -50,6 +54,9 @@ module.exports = async function (options) {
|
|
|
50
54
|
// Log current working directory
|
|
51
55
|
await logCWD();
|
|
52
56
|
|
|
57
|
+
// Detect GitHub repository early so it's available to all tasks/functions
|
|
58
|
+
await detectGitHubRepository(logger);
|
|
59
|
+
|
|
53
60
|
// Ensure this package is up-to-date
|
|
54
61
|
if (options.checkManager) {
|
|
55
62
|
await updateManager();
|
|
@@ -103,6 +110,11 @@ module.exports = async function (options) {
|
|
|
103
110
|
await checkLocality();
|
|
104
111
|
}
|
|
105
112
|
|
|
113
|
+
// Publish GH_TOKEN as repository secret
|
|
114
|
+
if (options.publishGitHubToken) {
|
|
115
|
+
await publishGitHubToken();
|
|
116
|
+
}
|
|
117
|
+
|
|
106
118
|
// Check which locality we are using
|
|
107
119
|
if (options.updateBundle && !Manager.isServer()) {
|
|
108
120
|
await updateBundle();
|
|
@@ -422,3 +434,67 @@ function logVersionCheck(name, installedVersion, latestVersion, isUpToDate) {
|
|
|
422
434
|
// Log
|
|
423
435
|
logger.log(`Checking if ${name} is up to date (${logger.format.bold(installedVersion)} >= ${logger.format.bold(latestVersion)}): ${isUpToDate ? logger.format.green('Yes') : logger.format.red('No')}`);
|
|
424
436
|
}
|
|
437
|
+
|
|
438
|
+
// Publish GH_TOKEN as repository secret
|
|
439
|
+
async function publishGitHubToken() {
|
|
440
|
+
// Check if GH_TOKEN is available
|
|
441
|
+
if (!process.env.GH_TOKEN) {
|
|
442
|
+
logger.warn('⚠️ GH_TOKEN not found in environment variables. Skipping secret publication.');
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Check if GITHUB_REPOSITORY is available
|
|
447
|
+
if (!process.env.GITHUB_REPOSITORY) {
|
|
448
|
+
logger.warn('⚠️ GITHUB_REPOSITORY not detected. Skipping secret publication.');
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// Quit if in build mode
|
|
453
|
+
if (Manager.isBuildMode()) {
|
|
454
|
+
logger.log('⚠️ Skipping GH_TOKEN publication in build mode.');
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
try {
|
|
459
|
+
// Parse owner and repo
|
|
460
|
+
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
|
|
461
|
+
|
|
462
|
+
// Initialize Octokit
|
|
463
|
+
const octokit = new Octokit({
|
|
464
|
+
auth: process.env.GH_TOKEN,
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
logger.log(`🔐 Publishing GH_TOKEN as repository secret for ${owner}/${repo}...`);
|
|
468
|
+
|
|
469
|
+
// Initialize sodium
|
|
470
|
+
await sodium.ready;
|
|
471
|
+
|
|
472
|
+
// Get repository public key for encrypting secrets
|
|
473
|
+
const { data: publicKeyData } = await octokit.actions.getRepoPublicKey({
|
|
474
|
+
owner,
|
|
475
|
+
repo,
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
// Convert secret to Uint8Array
|
|
479
|
+
const secretBytes = Buffer.from(process.env.GH_TOKEN);
|
|
480
|
+
const keyBytes = Buffer.from(publicKeyData.key, 'base64');
|
|
481
|
+
|
|
482
|
+
// Encrypt the secret using libsodium
|
|
483
|
+
const encryptedBytes = sodium.crypto_box_seal(secretBytes, keyBytes);
|
|
484
|
+
const encryptedValue = Buffer.from(encryptedBytes).toString('base64');
|
|
485
|
+
|
|
486
|
+
// Create or update the repository secret
|
|
487
|
+
await octokit.actions.createOrUpdateRepoSecret({
|
|
488
|
+
owner,
|
|
489
|
+
repo,
|
|
490
|
+
secret_name: 'GH_TOKEN',
|
|
491
|
+
encrypted_value: encryptedValue,
|
|
492
|
+
key_id: publicKeyData.key_id,
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
logger.log(`✅ Successfully published GH_TOKEN as repository secret`);
|
|
496
|
+
} catch (error) {
|
|
497
|
+
logger.error(`❌ Failed to publish GH_TOKEN as repository secret: ${error.message}`);
|
|
498
|
+
// Don't throw - this is not critical for setup to continue
|
|
499
|
+
}
|
|
500
|
+
}
|
package/dist/defaults/Gemfile
CHANGED
|
@@ -14,9 +14,9 @@ gem "jekyll", "= 4.4.1"
|
|
|
14
14
|
group :jekyll_plugins do
|
|
15
15
|
# Master Plugins
|
|
16
16
|
gem "jekyll-paginate-v2", "= 3.0.0"
|
|
17
|
-
gem "jekyll-liquify", "= 0.0.2" # ❌ Version 0.0.3 breaks the site
|
|
17
|
+
# gem "jekyll-liquify", "= 0.0.2" # ❌ Version 0.0.3 breaks the site
|
|
18
18
|
gem "jekyll-uj-powertools", { ujPowertoolsVersion }
|
|
19
|
-
gem "jekyll-truthyfalsy", "~> 1.0"
|
|
19
|
+
# gem "jekyll-truthyfalsy", "~> 1.0"
|
|
20
20
|
|
|
21
21
|
# Project Plugins
|
|
22
22
|
end
|
|
@@ -307,9 +307,9 @@
|
|
|
307
307
|
"@type": "BlogPosting",
|
|
308
308
|
"@id": "{{ page.canonical.url }}#BlogPosting",
|
|
309
309
|
"url": "{{ page.canonical.url }}",
|
|
310
|
-
"name": "{{ page.resolved.post.title |
|
|
311
|
-
"description": "{{ page.resolved.post.description |
|
|
312
|
-
"headline": "{{ page.resolved.post.title |
|
|
310
|
+
"name": "{{ page.resolved.post.title | uj_liquify }}",
|
|
311
|
+
"description": "{{ page.resolved.post.description | uj_liquify }} ",
|
|
312
|
+
"headline": "{{ page.resolved.post.title | uj_liquify }}",
|
|
313
313
|
"datePublished": "{{ page.date | date_to_xmlschema }}",
|
|
314
314
|
"dateModified": "{{ site.time | date_to_xmlschema }}",
|
|
315
315
|
"author": {
|
|
@@ -377,8 +377,8 @@
|
|
|
377
377
|
"@type": "Product",
|
|
378
378
|
"@id": "{{ page.canonical.url }}#Product",
|
|
379
379
|
"url": "{{ page.canonical.url }}",
|
|
380
|
-
"name": "{{ page.product.title |
|
|
381
|
-
"description": "{{ page.product.description |
|
|
380
|
+
"name": "{{ page.product.title | uj_liquify }}",
|
|
381
|
+
"description": "{{ page.product.description | uj_liquify }}",
|
|
382
382
|
"image": [
|
|
383
383
|
"{{ site.url }}/assets/images/products/product-{{ page.product.id }}/{{ page.url | split: '/' | last }}.jpg"
|
|
384
384
|
],
|
|
@@ -405,8 +405,8 @@
|
|
|
405
405
|
"@type": "ContactPage",
|
|
406
406
|
"@id": "{{ page.canonical.url }}#ContactPage",
|
|
407
407
|
"url": "{{ page.canonical.url }}",
|
|
408
|
-
"name": "{{ page.resolved.meta.title |
|
|
409
|
-
"description": "{{ page.resolved.meta.description |
|
|
408
|
+
"name": "{{ page.resolved.meta.title | uj_liquify }}",
|
|
409
|
+
"description": "{{ page.resolved.meta.description | uj_liquify }}",
|
|
410
410
|
"mainEntity": {
|
|
411
411
|
"@type": "Organization",
|
|
412
412
|
"@id": "{{ site.url }}#{{ site.brand.type }}"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<!-- Meta Variables -->
|
|
2
2
|
{% assign page-viewport = "width=device-width, initial-scale=1.0, user-scalable=yes, shrink-to-fit=no" %}
|
|
3
3
|
{%- iftruthy page.resolved.meta.viewport -%}
|
|
4
|
-
{% assign page-viewport = page.resolved.meta.viewport |
|
|
4
|
+
{% assign page-viewport = page.resolved.meta.viewport | uj_liquify %}
|
|
5
5
|
{% endiftruthy %}
|
|
6
6
|
|
|
7
7
|
{% assign page-referrer = "strict-origin-when-cross-origin" %}
|
|
8
8
|
{%- iftruthy page.resolved.meta.referrer -%}
|
|
9
|
-
{% assign page-referrer = page.resolved.meta.referrer |
|
|
9
|
+
{% assign page-referrer = page.resolved.meta.referrer | uj_liquify %}
|
|
10
10
|
{%- endiftruthy -%}
|
|
11
11
|
|
|
12
12
|
{% assign page-keywords = "" %}
|
|
13
13
|
{%- iftruthy page.resolved.meta.keywords -%}
|
|
14
|
-
{% assign page-keywords = page.resolved.meta.keywords |
|
|
14
|
+
{% assign page-keywords = page.resolved.meta.keywords | uj_liquify %}
|
|
15
15
|
{%- endiftruthy -%}
|
|
16
16
|
|
|
17
17
|
{% assign favicon-path = site.url | append: "/assets/images/favicon" %}
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
{% endiffalsy %}
|
|
37
37
|
|
|
38
38
|
<!-- Assign Default Dynamic Variables -->
|
|
39
|
-
{% assign page-title = page.resolved.meta.title |
|
|
40
|
-
{% assign page-description = page.resolved.meta.description |
|
|
41
|
-
{% assign page-image = page.resolved.meta.image |
|
|
39
|
+
{% assign page-title = page.resolved.meta.title | uj_liquify %}
|
|
40
|
+
{% assign page-description = page.resolved.meta.description | uj_liquify %}
|
|
41
|
+
{% assign page-image = page.resolved.meta.image | uj_liquify %}
|
|
42
42
|
{% assign page-og-type = "website" %}
|
|
43
43
|
|
|
44
44
|
<!-- Assign Post Dynamic Variables -->
|
|
45
45
|
{%- iftruthy page.resolved.post.id -%}
|
|
46
|
-
{% assign page-title = page.resolved.post.title |
|
|
47
|
-
{% assign page-description = page.resolved.post.description |
|
|
46
|
+
{% assign page-title = page.resolved.post.title | uj_liquify %}
|
|
47
|
+
{% assign page-description = page.resolved.post.description | uj_liquify %}
|
|
48
48
|
{% capture page-image %}{%- uj_post page.resolved.post.id, "image" -%}{% endcapture %}
|
|
49
49
|
{% assign page-og-type = "article" %}
|
|
50
50
|
{% endiftruthy %}
|
|
51
51
|
|
|
52
52
|
<!-- Assign Member Dynamic Variables -->
|
|
53
53
|
{%- iftruthy page.resolved.member.id -%}
|
|
54
|
-
{% assign page-title = page.resolved.member.name |
|
|
55
|
-
{% assign page-description = page.resolved.member.description |
|
|
54
|
+
{% assign page-title = page.resolved.member.name | uj_liquify %}
|
|
55
|
+
{% assign page-description = page.resolved.member.description | uj_liquify %}
|
|
56
56
|
{% capture page-image %}{%- uj_member page.resolved.member.id, "image" -%}{% endcapture %}
|
|
57
57
|
{% assign page-og-type = "profile" %}
|
|
58
58
|
{% endiftruthy %}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Logo Section -->
|
|
4
4
|
{% capture logo_href %}{% assign temp_href = data.logo.href | default: site.brand.href | default: '/dashboard' %}{% if temp_href and temp_href != '' and temp_href != 'null' %}{{ temp_href }}{% else %}javascript:void(0){% endif %}{% endcapture %}
|
|
5
5
|
{% capture logo_src %}{% if data.logo.src %}{{ data.logo.src }}{% else %}{{ site.brand.images.brandmark | default: null }}{% endif %}{% endcapture %}
|
|
6
|
-
{% capture logo_text %}{{ data.logo.text | default: site.brand.name |
|
|
6
|
+
{% capture logo_text %}{{ data.logo.text | default: site.brand.name | uj_liquify }}{% endcapture %}
|
|
7
7
|
{% capture logo_class %}{{ data.logo.class }}{% endcapture %}
|
|
8
8
|
|
|
9
9
|
<div class="sidebar-logo d-flex align-items-center px-3 py-2 border-bottom">
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
<div class="offcanvas-header border-bottom">
|
|
127
127
|
{% capture logo_href %}{% assign temp_href = data.logo.href | default: site.brand.href | default: '/dashboard' %}{% if temp_href and temp_href != '' and temp_href != 'null' %}{{ temp_href }}{% else %}javascript:void(0){% endif %}{% endcapture %}
|
|
128
128
|
{% capture logo_src %}{% if data.logo.src %}{{ data.logo.src }}{% else %}{{ site.brand.images.brandmark | default: null }}{% endif %}{% endcapture %}
|
|
129
|
-
{% capture logo_text %}{{ data.logo.text | default: site.brand.name |
|
|
129
|
+
{% capture logo_text %}{{ data.logo.text | default: site.brand.name | uj_liquify }}{% endcapture %}
|
|
130
130
|
|
|
131
131
|
<h5 class="offcanvas-title d-flex align-items-center" id="mobileSidebarLabel">
|
|
132
132
|
{% iftruthy logo_src %}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<div class="col-12 col-lg-3 mb-4 mb-lg-0">
|
|
7
7
|
{% capture logo_href %}{% assign temp_href = data.logo.href | default: site.brand.href | default: '/' %}{% if temp_href and temp_href != '' and temp_href != 'null' %}{{ temp_href }}{% else %}javascript:void(0){% endif %}{% endcapture %}
|
|
8
8
|
{% capture logo_src %}{% if data.logo.src %}{{ data.logo.src }}{% else %}{{ site.brand.images.brandmark | default: null }}{% endif %}{% endcapture %}
|
|
9
|
-
{% capture logo_text %}{{ data.logo.text | default: site.brand.name |
|
|
10
|
-
{% capture logo_description %}{{ data.logo.description | default: site.brand.description |
|
|
9
|
+
{% capture logo_text %}{{ data.logo.text | default: site.brand.name | uj_liquify }}{% endcapture %}
|
|
10
|
+
{% capture logo_description %}{{ data.logo.description | default: site.brand.description | uj_liquify }}{% endcapture %}
|
|
11
11
|
{% capture logo_class %}{{ data.logo.class }}{% endcapture %}
|
|
12
12
|
|
|
13
13
|
<div class="h5 mb-3">
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
By using this site and our services, you agree to our <a href="/terms">Terms</a> & <a href="/privacy">Privacy Policy</a>.
|
|
151
151
|
{% endcapture %}
|
|
152
152
|
{% endif %}
|
|
153
|
-
<span class="text-body-secondary">{{ copyright_text |
|
|
153
|
+
<span class="text-body-secondary">{{ copyright_text | uj_liquify }}</span>
|
|
154
154
|
</div>
|
|
155
155
|
</div>
|
|
156
156
|
{% endif %}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Logo -->
|
|
4
4
|
{% capture logo_href %}{% assign temp_href = data.logo.href | default: site.brand.href | default: '/' %}{% if temp_href and temp_href != '' and temp_href != 'null' %}{{ temp_href }}{% else %}javascript:void(0){% endif %}{% endcapture %}
|
|
5
5
|
{% capture logo_src %}{% if data.logo.src %}{{ data.logo.src }}{% else %}{{ site.brand.images.brandmark | default: null }}{% endif %}{% endcapture %}
|
|
6
|
-
{% capture logo_text %}{{ data.logo.text | default: site.brand.name |
|
|
6
|
+
{% capture logo_text %}{{ data.logo.text | default: site.brand.name | uj_liquify }}{% endcapture %}
|
|
7
7
|
{% capture logo_class %}{{ data.logo.class }}{% endcapture %}
|
|
8
8
|
|
|
9
9
|
<a class="navbar-brand d-inline-flex align-items-center" href="{{ logo_href }}">
|
|
@@ -14,8 +14,8 @@ web_manager:
|
|
|
14
14
|
enabled: false
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
{% capture brand %}**{{ site.brand.name |
|
|
18
|
-
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb |
|
|
17
|
+
{% capture brand %}**{{ site.brand.name | uj_liquify }}**{% endcapture %}
|
|
18
|
+
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb | uj_liquify }}{% endcapture %}
|
|
19
19
|
|
|
20
20
|
### Effective date: <span class="text-primary">8th of April, 2017</span>
|
|
21
21
|
<hr>
|
|
@@ -14,8 +14,8 @@ web_manager:
|
|
|
14
14
|
enabled: false
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
{% capture brand %}**{{ site.brand.name |
|
|
18
|
-
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb |
|
|
17
|
+
{% capture brand %}**{{ site.brand.name | uj_liquify }}**{% endcapture %}
|
|
18
|
+
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb | uj_liquify }}{% endcapture %}
|
|
19
19
|
|
|
20
20
|
### Effective date: <span class="text-primary">8th of April, 2017</span>
|
|
21
21
|
<hr>
|
|
@@ -14,8 +14,8 @@ web_manager:
|
|
|
14
14
|
enabled: false
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
{% capture brand %}**{{ site.brand.name |
|
|
18
|
-
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb |
|
|
17
|
+
{% capture brand %}**{{ site.brand.name | uj_liquify }}**{% endcapture %}
|
|
18
|
+
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb | uj_liquify }}{% endcapture %}
|
|
19
19
|
|
|
20
20
|
### Effective date: <span class="text-primary">8th of April, 2017</span>
|
|
21
21
|
<hr>
|
|
@@ -9,7 +9,7 @@ sitemap:
|
|
|
9
9
|
meta:
|
|
10
10
|
index: false
|
|
11
11
|
---
|
|
12
|
-
{% capture url %}{{ page.resolved.redirect.url | default: site.url |
|
|
12
|
+
{% capture url %}{{ page.resolved.redirect.url | default: site.url | uj_liquify }}{% endcapture %}
|
|
13
13
|
{% capture querystring %}{{ page.resolved.redirect.querystring }}{% endcapture %}
|
|
14
14
|
{% capture modifier %}{{ page.resolved.redirect.modifier | default: "" }}{% endcapture %}
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ web_manager:
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
<!-- Main Content -->
|
|
24
|
-
<main id="main-content" class="p-0 {{ page.resolved.theme.main.class |
|
|
24
|
+
<main id="main-content" class="p-0 {{ page.resolved.theme.main.class | uj_liquify }}" aria-label="Main content">
|
|
25
25
|
<div class="container-fluid p-0">
|
|
26
26
|
{{ content | uj_content_format }}
|
|
27
27
|
</div>
|
|
@@ -51,9 +51,9 @@ web_manager:
|
|
|
51
51
|
|
|
52
52
|
// Meta information from the iframe
|
|
53
53
|
meta: {
|
|
54
|
-
title: "{{ page.resolved.meta.title |
|
|
55
|
-
description: "{{ page.resolved.meta.description |
|
|
56
|
-
breadcrumb: "{{ page.resolved.meta.breadcrumb |
|
|
54
|
+
title: "{{ page.resolved.meta.title | uj_liquify | escape }}",
|
|
55
|
+
description: "{{ page.resolved.meta.description | uj_liquify | escape }}",
|
|
56
|
+
breadcrumb: "{{ page.resolved.meta.breadcrumb | uj_liquify | escape }}",
|
|
57
57
|
},
|
|
58
58
|
}
|
|
59
59
|
}, '*');
|
|
@@ -48,7 +48,7 @@ web_manager:
|
|
|
48
48
|
{% endunless %}
|
|
49
49
|
|
|
50
50
|
<!-- Main Content -->
|
|
51
|
-
<main id="main-content" class="flex-fill overflow-auto p-3 p-lg-4 {{ page.resolved.theme.main.class |
|
|
51
|
+
<main id="main-content" class="flex-fill overflow-auto p-3 p-lg-4 {{ page.resolved.theme.main.class | uj_liquify }}" aria-label="Main content">
|
|
52
52
|
{{ content | uj_content_format }}
|
|
53
53
|
</main>
|
|
54
54
|
</div>
|
|
@@ -36,7 +36,7 @@ theme:
|
|
|
36
36
|
{% if page.resolved.theme.header.title.icon %}
|
|
37
37
|
{% uj_icon page.resolved.theme.header.title.icon, "me-2" %}
|
|
38
38
|
{% endif %}
|
|
39
|
-
{{- page.resolved.theme.header.title.content | default: page.resolved.meta.title |
|
|
39
|
+
{{- page.resolved.theme.header.title.content | default: page.resolved.meta.title | uj_liquify -}}
|
|
40
40
|
</h1>
|
|
41
41
|
{% endunless %}
|
|
42
42
|
|
|
@@ -21,7 +21,7 @@ theme:
|
|
|
21
21
|
{% endunless %}
|
|
22
22
|
|
|
23
23
|
<!-- Main Content -->
|
|
24
|
-
<main id="main-content" class="flex-fill {{ page.resolved.theme.main.class |
|
|
24
|
+
<main id="main-content" class="flex-fill {{ page.resolved.theme.main.class | uj_liquify }}" aria-label="Main content">
|
|
25
25
|
{{ content | uj_content_format }}
|
|
26
26
|
</main>
|
|
27
27
|
|
|
@@ -27,8 +27,8 @@ permalink: /feeds/posts.json
|
|
|
27
27
|
"title": "{{ post.title | strip_html | strip_newlines | uj_json_escape }}",
|
|
28
28
|
"date_published": "{{ post.date | date: "%Y-%m-%dT%H:%M:%S" }}.000Z",
|
|
29
29
|
"image": "{{ post.image }}",
|
|
30
|
-
"content_text": "{{ post.content |
|
|
31
|
-
"content_html": "{{ post.content | uj_strip_ads |
|
|
30
|
+
"content_text": "{{ post.content | uj_liquify | markdownify | strip_html | uj_json_escape | replace: '\n', ' ' | replace: '\r', ' ' | strip_newlines }}",
|
|
31
|
+
"content_html": "{{ post.content | uj_strip_ads | uj_liquify | markdownify | uj_strip_ads | uj_json_escape | replace: '\n', ' ' | replace: '\r', ' ' | strip_newlines }}",
|
|
32
32
|
"authors": [
|
|
33
33
|
{
|
|
34
34
|
"name": "{{ site.brand.name }}"
|
|
@@ -79,7 +79,7 @@ permalink: /feeds/posts.xml
|
|
|
79
79
|
</description>
|
|
80
80
|
<content:encoded>
|
|
81
81
|
<![CDATA[
|
|
82
|
-
{{ post.content | uj_strip_ads |
|
|
82
|
+
{{ post.content | uj_strip_ads | uj_liquify | markdownify | uj_strip_ads }}
|
|
83
83
|
]]>
|
|
84
84
|
</content:encoded>
|
|
85
85
|
<dc:creator>
|
|
@@ -18,8 +18,8 @@ web_manager:
|
|
|
18
18
|
enabled: false
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
{% capture brand %}**{{ site.brand.name |
|
|
22
|
-
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb |
|
|
21
|
+
{% capture brand %}**{{ site.brand.name | uj_liquify }}**{% endcapture %}
|
|
22
|
+
{% capture breadcrumb %}{{ page.resolved.meta.breadcrumb | uj_liquify }}{% endcapture %}
|
|
23
23
|
|
|
24
24
|
### Effective date: <span class="text-primary">8th of April, 2017</span>
|
|
25
25
|
<hr>
|
|
@@ -33,11 +33,11 @@ meta:
|
|
|
33
33
|
|
|
34
34
|
{
|
|
35
35
|
"url": "{{ site.url }}{{ item.url }}",
|
|
36
|
-
"title": "{{ item.meta.title |
|
|
37
|
-
"desc": "{{ item.meta.description |
|
|
38
|
-
"breadcrumb": "{{ item.meta.breadcrumb |
|
|
39
|
-
"category": "{{ item.search.category | default: item.post.category |
|
|
40
|
-
"type": "{{ page-type | default: item.settings.page-type |
|
|
36
|
+
"title": "{{ item.meta.title | uj_liquify }}",
|
|
37
|
+
"desc": "{{ item.meta.description | uj_liquify }}",
|
|
38
|
+
"breadcrumb": "{{ item.meta.breadcrumb | uj_liquify }}",
|
|
39
|
+
"category": "{{ item.search.category | default: item.post.category | uj_liquify }}",
|
|
40
|
+
"type": "{{ page-type | default: item.settings.page-type | uj_liquify }}"
|
|
41
41
|
}{% unless forloop.last %},{% endunless %}
|
|
42
42
|
{% endfor %}
|
|
43
43
|
]
|
package/dist/gulp/tasks/setup.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const Manager = new (require('../../build.js'));
|
|
3
3
|
const logger = Manager.logger('setup');
|
|
4
4
|
const { execute } = require('node-powertools');
|
|
5
|
+
const detectGitHubRepository = require('./utils/detect-github-repo');
|
|
5
6
|
|
|
6
7
|
// Load package
|
|
7
8
|
const package = Manager.getPackage('main');
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// GitHub Repository Detection Utility
|
|
2
|
+
// Shared function for auto-detecting GitHub repository from git remote
|
|
3
|
+
// Can be called from any gulp task or utility
|
|
4
|
+
|
|
5
|
+
const { execute } = require('node-powertools');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Detects and sets GITHUB_REPOSITORY environment variable if not already set
|
|
9
|
+
* @param {Object} logger - Logger instance for output
|
|
10
|
+
* @returns {Promise<string|null>} - Repository in format "owner/repo" or null if detection fails
|
|
11
|
+
*/
|
|
12
|
+
async function detectGitHubRepository(logger = console) {
|
|
13
|
+
// If already set, return it
|
|
14
|
+
if (process.env.GITHUB_REPOSITORY) {
|
|
15
|
+
return process.env.GITHUB_REPOSITORY;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const result = await execute('git remote get-url origin', { log: false });
|
|
20
|
+
|
|
21
|
+
// Parse GitHub repository from remote URL
|
|
22
|
+
// Supports: https://github.com/owner/repo.git, git@github.com:owner/repo.git
|
|
23
|
+
const match = result.match(/github\.com[:/]([^/]+\/[^.\s]+)/);
|
|
24
|
+
|
|
25
|
+
if (match) {
|
|
26
|
+
process.env.GITHUB_REPOSITORY = match[1];
|
|
27
|
+
logger.log(`Auto-detected repository from git remote: ${process.env.GITHUB_REPOSITORY}`);
|
|
28
|
+
return process.env.GITHUB_REPOSITORY;
|
|
29
|
+
} else {
|
|
30
|
+
logger.warn(`⚠️ Could not parse GitHub repository from git remote URL: ${result}`);
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// Ignore errors from git command (e.g., not a git repo, no remote)
|
|
35
|
+
if (logger.warn) {
|
|
36
|
+
logger.warn(`⚠️ Could not auto-detect repository from git remote: ${e.message}`);
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = detectGitHubRepository;
|
|
@@ -6,7 +6,7 @@ const jetpack = require('fs-jetpack');
|
|
|
6
6
|
const crypto = require('crypto');
|
|
7
7
|
const { Octokit } = require('@octokit/rest');
|
|
8
8
|
const AdmZip = require('adm-zip');
|
|
9
|
-
const
|
|
9
|
+
const detectGitHubRepository = require('./detect-github-repo');
|
|
10
10
|
|
|
11
11
|
class GitHubCache {
|
|
12
12
|
constructor(options = {}) {
|
|
@@ -28,31 +28,15 @@ class GitHubCache {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// Auto-detect repository if not set
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
const result = await execute('git remote get-url origin', { log: false });
|
|
34
|
-
|
|
35
|
-
// Parse GitHub repository from remote URL
|
|
36
|
-
// Supports: https://github.com/owner/repo.git, git@github.com:owner/repo.git
|
|
37
|
-
const match = result.match(/github\.com[:/]([^/]+\/[^.\s]+)/);
|
|
38
|
-
|
|
39
|
-
if (match) {
|
|
40
|
-
process.env.GITHUB_REPOSITORY = match[1];
|
|
41
|
-
this.logger.log(`📦 Auto-detected repository from git remote: ${process.env.GITHUB_REPOSITORY}`);
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {
|
|
44
|
-
// Ignore errors from git command
|
|
45
|
-
this.logger.warn(`⚠️ Could not auto-detect repository from git remote: ${e.message}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
31
|
+
const repository = await detectGitHubRepository(this.logger);
|
|
48
32
|
|
|
49
33
|
// Final check
|
|
50
|
-
if (!
|
|
34
|
+
if (!repository) {
|
|
51
35
|
throw new Error('GITHUB_REPOSITORY environment variable not set and could not auto-detect from git remote');
|
|
52
36
|
}
|
|
53
37
|
|
|
54
38
|
// Set owner and repo
|
|
55
|
-
[this.owner, this.repo] =
|
|
39
|
+
[this.owner, this.repo] = repository.split('/');
|
|
56
40
|
|
|
57
41
|
// Initialize Octokit
|
|
58
42
|
if (!this.octokit) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[debug] [2025-10-26T09:34:21.889Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
2
|
+
[debug] [2025-10-26T09:34:21.890Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
3
|
+
[debug] [2025-10-26T09:34:21.892Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
4
|
+
[debug] [2025-10-26T09:34:21.892Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
5
|
+
[debug] [2025-10-26T09:34:21.892Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
6
|
+
[debug] [2025-10-26T09:34:21.906Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
7
|
+
[debug] [2025-10-26T09:34:21.907Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
8
|
+
[debug] [2025-10-26T09:34:21.893Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
9
|
+
[debug] [2025-10-26T09:34:21.893Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
10
|
+
[debug] [2025-10-26T09:34:21.893Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
11
|
+
[debug] [2025-10-26T09:34:21.907Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
12
|
+
[debug] [2025-10-26T09:34:21.907Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
13
|
+
[debug] [2025-10-26T09:34:22.055Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
14
|
+
[debug] [2025-10-26T09:34:22.055Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
15
|
+
[debug] [2025-10-26T09:34:22.056Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
16
|
+
[debug] [2025-10-26T09:34:22.056Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
17
|
+
[debug] [2025-10-26T09:34:22.058Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
18
|
+
[debug] [2025-10-26T09:34:22.058Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
19
|
+
[debug] [2025-10-26T09:34:22.058Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
20
|
+
[debug] [2025-10-26T09:34:22.058Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
21
|
+
[debug] [2025-10-26T09:34:22.059Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
22
|
+
[debug] [2025-10-26T09:34:22.059Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
23
|
+
[debug] [2025-10-26T09:34:22.059Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
24
|
+
[debug] [2025-10-26T09:34:22.059Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
25
|
+
[debug] [2025-10-26T09:34:22.061Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
26
|
+
[debug] [2025-10-26T09:34:22.061Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
27
|
+
[debug] [2025-10-26T09:34:22.061Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
28
|
+
[debug] [2025-10-26T09:34:22.061Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-jekyll-manager",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104",
|
|
4
4
|
"description": "Ultimate Jekyll dependency manager",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"sharp": "0.23.1 (sometime before 2021ish): Hard lock because later versions had issues. Possibly solved in higher node versions"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@babel/core": "^7.28.
|
|
63
|
-
"@babel/preset-env": "^7.28.
|
|
62
|
+
"@babel/core": "^7.28.5",
|
|
63
|
+
"@babel/preset-env": "^7.28.5",
|
|
64
64
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
65
|
-
"@minify-html/node": "^0.
|
|
65
|
+
"@minify-html/node": "^0.18.1",
|
|
66
66
|
"@octokit/rest": "^22.0.0",
|
|
67
67
|
"@popperjs/core": "^2.11.8",
|
|
68
68
|
"@prettier/plugin-xml": "^3.4.2",
|
|
@@ -82,10 +82,11 @@
|
|
|
82
82
|
"gulp-responsive-modern": "^1.0.0",
|
|
83
83
|
"gulp-sass": "^6.0.1",
|
|
84
84
|
"html-minifier-terser": "^7.2.0",
|
|
85
|
-
"html-validate": "^10.1
|
|
85
|
+
"html-validate": "^10.2.1",
|
|
86
86
|
"itwcw-package-analytics": "^1.0.6",
|
|
87
87
|
"js-yaml": "^4.1.0",
|
|
88
88
|
"json5": "^2.2.3",
|
|
89
|
+
"libsodium-wrappers": "^0.7.15",
|
|
89
90
|
"lighthouse": "^12.2.1",
|
|
90
91
|
"lodash": "^4.17.21",
|
|
91
92
|
"minimatch": "^10.0.3",
|