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
2 changes: 2 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
# its mark on the posts (script/check-plugin-output.rb). Each check maps
# to a defect that shipped here or would ship silently.
run: script/validate-site.sh ./_site
env:
BASE_PATH: ${{ steps.pages.outputs.base_path }}
- name: Upload artifact
# Nothing to publish from a PR run; the gates above are the whole point.
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
Expand Down
4 changes: 3 additions & 1 deletion _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,10 @@ blockquote {
transition: none !important;
}

// !important: html[data-theme="dark"] is as specific and loads later, and its
// dark color-scheme had Chrome print the page margins near-black.
html {
color-scheme: light;
color-scheme: light !important;
background: #fff !important;
}

Expand Down
11 changes: 8 additions & 3 deletions script/check-plugin-output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

site_dir = File.expand_path(ARGV.fetch(0))
root = File.expand_path("..", __dir__)
config = Jekyll.configuration("source" => root, "destination" => site_dir, "quiet" => true)
# The base path the site was built with (CI passes the Pages one), or its links
# and image paths would match nothing here.
overrides = { "source" => root, "destination" => site_dir, "quiet" => true }
overrides["baseurl"] = ENV["BASE_PATH"] if ENV["BASE_PATH"]
config = Jekyll.configuration(overrides)
site = Jekyll::Site.new(config)
site.reset
site.read
Expand Down Expand Up @@ -81,8 +85,9 @@
# Not a hook: the cover's credit, which its CC BY license wants visible, and
# which the layout leaves out without a word when _data/covers.yml lacks it.
if (cover = post.data["cover"])
if !site.data.dig("covers", cover)
problems << "#{name}: no credit for #{cover} in _data/covers.yml"
source = site.data.dig("covers", cover)
if !source.is_a?(Hash) || %w[title credit url].any? { |k| source[k].to_s.strip.empty? }
problems << "#{name}: no title, credit and url for #{cover} in _data/covers.yml"
elsif !html.include?(%(class="cover-credit"))
problems << "#{name}: the cover credit is not on the page"
end
Expand Down