Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _plugins/cache-bust.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def bust_file_cache(file_name)
end

def bust_css_cache(file_name)
CacheDigester.new(file_name: file_name, directory: 'assets/_sass').digest!
CacheDigester.new(file_name: file_name, directory: '_sass').digest!
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include main.scss in CSS cache digest

When the generated stylesheet changes because assets/css/main.scss changes (for example the Liquid $max-content-width assignment or the import order/list), this new digest still hashes only _sass, so the URL emitted by _includes/head.liquid can stay unchanged while /assets/css/main.css has different content. Since assets/css/main.scss is the entry point for that stylesheet, include it (or the compiled CSS) in the digest along with _sass to avoid serving stale CSS.

Useful? React with 👍 / 👎.

end
end
end

Liquid::Template.register_filter(Jekyll::CacheBust)
Liquid::Template.register_filter(Jekyll::CacheBust)
14 changes: 12 additions & 2 deletions _sass/_publication-badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--publication-badge-gap: 0rem;
--dimensions-badge-scale: 0.92;
--dimensions-badge-offset-y: 1px;
--openalex-scholar-gap: 0.8rem;
--openalex-scholar-gap: 0.9rem;

align-items: center;
gap: var(--publication-badge-gap);
Expand All @@ -29,8 +29,18 @@
}
}

.openalex-badge,
.google-scholar-badge {
display: inline-flex;
align-items: center;

img {
display: block;
}
}

.openalex-badge ~ .google-scholar-badge {
margin-left: var(--openalex-scholar-gap);
margin-left: var(--openalex-scholar-gap, 0.9rem) !important;
}
}
}
Expand Down
Loading