pagecord-cli 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99eebd4d84788c1c5176bca0d7b1f036bb54ec2acb9e5f6a9f9fef7b63fc5d1d
4
- data.tar.gz: 78d6e0b1623c066f1b9f992cf87e7e80c997ef7abfa2d2f4e6893ba6e34c0f8f
3
+ metadata.gz: 691c38a950d1636ababf3611ca1d767046570a2558673fafe649c0c82712da57
4
+ data.tar.gz: d49abbd1d948cf7ed4e52b56a31e32aa091eaa3a826780ade9b57c663d74cac4
5
5
  SHA512:
6
- metadata.gz: 27842bcc27c07553c69ee4664aad327ab1d1f6155b3eaccc64d66fbcc699d73d543ae09bf2b406f568e6fca1eab83e0976d8f0ed08f62bd30ec63f57e5836796
7
- data.tar.gz: 245f7e50410b5b93daca45d14ead9268f447cd9bada1bf580db1c73d3c5ec5d39207f7dacbf09fb21c98cc2debfba5d0b97f39b8e3b931b2d183dee9ead935cd
6
+ metadata.gz: dc466f620c67a38c614ce658d755f6c9f8e775f62a2d133bbc986246aaea38e4a039d2b55f02664bd0d7906b53eb57a82c15814283713e5147c8fb9382e48321
7
+ data.tar.gz: 45b006d11a1a4be80e3a8d8728032c8500f41422e9a33c44a59c0dc24cf726e554f1448cafd7c6a1e572fd916e6b06b73a122f58a9e489f2902e03580a9844ea
data/README.md CHANGED
@@ -8,6 +8,12 @@ Publish local Markdown and HTML files to [Pagecord](https://pagecord.com).
8
8
  gem install pagecord-cli
9
9
  ```
10
10
 
11
+ Needs Ruby 3.2 or newer. The Ruby that ships with macOS is too old, so:
12
+
13
+ - **macOS**: `brew install ruby`, or a version manager like [mise](https://mise.jdx.dev)
14
+ - **Windows**: [RubyInstaller](https://rubyinstaller.org)
15
+ - **Linux**: your package manager, if it offers 3.2 or newer; otherwise [mise](https://mise.jdx.dev)
16
+
11
17
  ## Login
12
18
 
13
19
  Generate an API key from **Settings > API** in Pagecord, then save it locally:
@@ -194,6 +194,10 @@ module PagecordCLI
194
194
  settings = client_for(resolve_blog).update_custom_code(params)
195
195
  options[:json] ? print_json(settings) : say("Updated custom code")
196
196
  0
197
+ rescue Client::Error => e
198
+ raise unless e.status == 422 && params.key?("custom_css")
199
+
200
+ raise Error, "#{e.message}.\nCommon causes: nested CSS, or @import from a host other than Google Fonts or Bunny Fonts.\nSee https://help.pagecord.com/custom-css"
197
201
  end
198
202
 
199
203
  def publish(status)
@@ -337,6 +341,9 @@ module PagecordCLI
337
341
  Custom code options:
338
342
  --css, --footer-html, --head-html, --body-html (each takes a file path)
339
343
  --enabled true|false
344
+
345
+ Custom CSS reference:
346
+ https://help.pagecord.com/custom-css
340
347
  HELP
341
348
  0
342
349
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PagecordCLI
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagecord-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olly Headey