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 +4 -4
- data/README.md +6 -0
- data/lib/pagecord_cli/cli.rb +7 -0
- data/lib/pagecord_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 691c38a950d1636ababf3611ca1d767046570a2558673fafe649c0c82712da57
|
|
4
|
+
data.tar.gz: d49abbd1d948cf7ed4e52b56a31e32aa091eaa3a826780ade9b57c663d74cac4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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:
|
data/lib/pagecord_cli/cli.rb
CHANGED
|
@@ -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
|
data/lib/pagecord_cli/version.rb
CHANGED