abqari 1.1.2 → 1.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +157 -1
- data/README.md +26 -12
- data/app/views/partials/_head.html.erb +10 -18
- data/lib/abqari/audit/csp.rb +178 -0
- data/lib/abqari/audit.rb +4 -2
- data/lib/abqari/cli/headers.rb +95 -0
- data/lib/abqari/cli.rb +3 -0
- data/lib/abqari/headers_file.rb +28 -11
- data/lib/abqari/hooks.rb +59 -4
- data/lib/abqari/renderer.rb +95 -13
- data/lib/abqari/server.rb +28 -1
- data/lib/abqari/site.rb +9 -0
- data/lib/abqari/speculation_rules.rb +83 -0
- data/lib/abqari/templates/site_skeleton/.github/workflows/deploy-cloudflare.yml +9 -0
- data/lib/abqari/templates/site_skeleton/.github/workflows/deploy-github-pages.yml +8 -0
- data/lib/abqari/templates/site_skeleton/.github/workflows/deploy-render.yml +16 -5
- data/lib/abqari/version.rb +1 -1
- data/lib/abqari.rb +1 -0
- metadata +4 -1
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
#
|
|
6
6
|
# (A) Render's own GitHub integration (simplest — no workflow needed):
|
|
7
7
|
# In the Render dashboard, create a Static Site, connect this repo,
|
|
8
|
-
# set build command
|
|
9
|
-
# `
|
|
10
|
-
#
|
|
8
|
+
# set build command
|
|
9
|
+
# `bundle install && bundle exec bin/fetch-fonts && bundle exec bin/build`,
|
|
10
|
+
# publish directory `_site`, environment variable
|
|
11
|
+
# `ABQARI_ENV=production`. Render polls GitHub and rebuilds on push.
|
|
12
|
+
# (`bin/fetch-fonts` because vendor/fonts/ is git-ignored.)
|
|
11
13
|
#
|
|
12
14
|
# (B) GitHub Actions → Render deploy hook (this workflow). Use when:
|
|
13
15
|
# - You want CI gates (audit, tests) to block deploys.
|
|
@@ -23,8 +25,9 @@
|
|
|
23
25
|
# - Variables (tab): add `ENABLE_RENDER = true`
|
|
24
26
|
#
|
|
25
27
|
# When triggered, Render fetches the latest commit and builds in its
|
|
26
|
-
# own environment
|
|
27
|
-
#
|
|
28
|
+
# own environment with the build command from option (A) — so that
|
|
29
|
+
# command needs `bin/fetch-fonts` too. This workflow only pings the
|
|
30
|
+
# deploy hook — it doesn't push artifacts. If you need Actions-built artifacts shipped
|
|
28
31
|
# to Render, use Render's REST API directly (more setup; not covered).
|
|
29
32
|
#
|
|
30
33
|
# Three deploy options ship in this repo. Each is independently gated
|
|
@@ -63,6 +66,14 @@ jobs:
|
|
|
63
66
|
with:
|
|
64
67
|
bundler-cache: true
|
|
65
68
|
|
|
69
|
+
- name: Fetch fonts
|
|
70
|
+
# vendor/fonts/ is git-ignored, so a fresh checkout has no font
|
|
71
|
+
# files and the build would ship the site in fallback fonts.
|
|
72
|
+
# No-op when config/site.yml has no `fonts:`.
|
|
73
|
+
env:
|
|
74
|
+
ABQARI_ENV: production
|
|
75
|
+
run: bundle exec bin/fetch-fonts
|
|
76
|
+
|
|
66
77
|
- name: Build site (CI verification)
|
|
67
78
|
# Build locally as a smoke test so Render's build won't run
|
|
68
79
|
# against code that fails at our own gates. Doesn't ship the
|
data/lib/abqari/version.rb
CHANGED
data/lib/abqari.rb
CHANGED
|
@@ -141,6 +141,7 @@ require_relative 'abqari/minifier'
|
|
|
141
141
|
require_relative 'abqari/search'
|
|
142
142
|
require_relative 'abqari/syntax_highlighter'
|
|
143
143
|
require_relative 'abqari/theme_bootstrap'
|
|
144
|
+
require_relative 'abqari/speculation_rules'
|
|
144
145
|
require_relative 'abqari/speculation_rules_guard'
|
|
145
146
|
require_relative 'abqari/plausible_script'
|
|
146
147
|
require_relative 'abqari/visualizations'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: abqari
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grant Rayner
|
|
@@ -220,6 +220,7 @@ files:
|
|
|
220
220
|
- lib/abqari/audit.rb
|
|
221
221
|
- lib/abqari/audit/a11y.rb
|
|
222
222
|
- lib/abqari/audit/content.rb
|
|
223
|
+
- lib/abqari/audit/csp.rb
|
|
223
224
|
- lib/abqari/audit/dependencies.rb
|
|
224
225
|
- lib/abqari/audit/links.rb
|
|
225
226
|
- lib/abqari/audit/performance.rb
|
|
@@ -228,6 +229,7 @@ files:
|
|
|
228
229
|
- lib/abqari/audit/seo.rb
|
|
229
230
|
- lib/abqari/bundle_assets.rb
|
|
230
231
|
- lib/abqari/cli.rb
|
|
232
|
+
- lib/abqari/cli/headers.rb
|
|
231
233
|
- lib/abqari/cli/new.rb
|
|
232
234
|
- lib/abqari/cli/theme.rb
|
|
233
235
|
- lib/abqari/erbi_template.rb
|
|
@@ -281,6 +283,7 @@ files:
|
|
|
281
283
|
- lib/abqari/site_config.rb
|
|
282
284
|
- lib/abqari/site_loader.rb
|
|
283
285
|
- lib/abqari/sitemap.rb
|
|
286
|
+
- lib/abqari/speculation_rules.rb
|
|
284
287
|
- lib/abqari/speculation_rules_guard.rb
|
|
285
288
|
- lib/abqari/syndication.rb
|
|
286
289
|
- lib/abqari/syntax_highlighter.rb
|