Skip to content

Commit 20e614c

Browse files
Fix Ghost 6.x compatibility issues
- Remove incompatible Handlebars syntax for tag filtering - Use JavaScript-based approach to hide 'All Posts' tags - Improve PDF spacing and layout for resume generation - Fix theme validation errors for deployment
1 parent bef5b6d commit 20e614c

File tree

7 files changed

+35
-9
lines changed

7 files changed

+35
-9
lines changed

assets/built/main.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/screen.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,12 @@ hr {
715715
border-color: var(--tag-color, var(--color-darker-gray));
716716
}
717717

718+
/* Hide "All Posts" tag - handled by JavaScript */
719+
.gh-article-tag.hide-all-posts,
720+
.gh-card-tag.hide-all-posts {
721+
display: none !important;
722+
}
723+
718724
/* Responsive tag styling */
719725
@media (max-width: 768px) {
720726
.gh-article-tags,

assets/js/main.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@ function initParallax() {
5353
pagination(true, initParallax);
5454
})();
5555

56+
// Hide "All Posts" tags
57+
(function () {
58+
function hideAllPostsTags() {
59+
const tags = document.querySelectorAll('.gh-article-tag, .gh-card-tag');
60+
tags.forEach(tag => {
61+
if (tag.textContent.trim() === 'All Posts') {
62+
tag.classList.add('hide-all-posts');
63+
}
64+
});
65+
}
66+
67+
// Run on page load
68+
if (document.readyState === 'loading') {
69+
document.addEventListener('DOMContentLoaded', hideAllPostsTags);
70+
} else {
71+
hideAllPostsTags();
72+
}
73+
74+
// Run after pagination (for dynamic content)
75+
document.addEventListener('DOMContentLoaded', function() {
76+
setTimeout(hideAllPostsTags, 100);
77+
});
78+
})();
79+
5680
// Resume PDF generation functionality
5781
(function () {
5882
const pdfButton = document.getElementById('download-pdf');

partials/loop.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
{{#if tags}}
33
<div class="gh-card-tags">
44
{{#foreach tags}}
5-
{{#unless (eq name "All Posts")}}
6-
<a class="gh-card-tag" href="{{url}}" style="--tag-color: {{accent_color}}">{{name}}</a>
7-
{{/unless}}
5+
<a class="gh-card-tag" href="{{url}}" style="--tag-color: {{accent_color}}">{{name}}</a>
86
{{/foreach}}
97
</div>
108
{{/if}}

post.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@
4646
{{#if tags}}
4747
<div class="gh-article-tags">
4848
{{#foreach tags}}
49-
{{#unless (eq name "All Posts")}}
50-
<a class="gh-article-tag" href="{{url}}" style="--tag-color: {{accent_color}}">{{name}}</a>
51-
{{/unless}}
49+
<a class="gh-article-tag" href="{{url}}" style="--tag-color: {{accent_color}}">{{name}}</a>
5250
{{/foreach}}
5351
</div>
5452
{{/if}}

0 commit comments

Comments
 (0)